浏览代码

Removal of the auto build addressables and now using the built in functionality of latest addressables package

/testing-automation
Andrem 3 年前
当前提交
74481ec4
共有 8 个文件被更改,包括 24 次插入50 次删除
  1. 2
      Assets/AddressableAssetsData/AddressableAssetSettings.asset
  2. 1
      Assets/Scripts/Editor/Benchmark/BenchmarkWindow.cs
  3. 4
      Packages/manifest.json
  4. 6
      Packages/packages-lock.json
  5. 4
      ProjectSettings/ProjectVersion.txt
  6. 15
      ProjectSettings/TimelineSettings.asset
  7. 31
      Assets/Scripts/Editor/AutoBuildAddressables.cs
  8. 11
      Assets/Scripts/Editor/AutoBuildAddressables.cs.meta

2
Assets/AddressableAssetsData/AddressableAssetSettings.asset


m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_NonRecursiveBuilding: 0
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 500
m_ContiguousBundles: 0
m_StripUnityVersionFromBundleBuild: 0

m_RemoteCatalogLoadPath:
m_Id:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 1
m_overridePlayerVersion:
m_GroupAssets:
- {fileID: 11400000, guid: 283cfc36cc7e3476c947ddc708efef12, type: 2}

1
Assets/Scripts/Editor/Benchmark/BenchmarkWindow.cs


{
EditorUserBuildSettings.SwitchActiveBuildTarget(options.targetGroup, options.target);
}
AutoBuildAddressables.Popup();
var report = BuildPipeline.BuildPlayer(options);
var summary = report.summary;

4
Packages/manifest.json


{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.addressables": "1.18.16",
"com.unity.addressables": "1.19.6",
"com.unity.mathematics": "1.2.1",
"com.unity.mathematics": "1.2.4",
"com.unity.memoryprofiler": "0.4.1-preview.1",
"com.unity.render-pipelines.universal": "10.6.0",
"com.unity.test-framework": "1.1.29",

6
Packages/packages-lock.json


"dependencies": {}
},
"com.unity.addressables": {
"version": "1.18.16",
"version": "1.19.6",
"depth": 0,
"source": "registry",
"dependencies": {

"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.2.1",
"version": "1.2.4",
"depth": 0,
"source": "registry",
"dependencies": {},

}
},
"com.unity.xr.legacyinputhelpers": {
"version": "2.1.7",
"version": "2.1.8",
"depth": 1,
"source": "registry",
"dependencies": {

4
ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2020.3.14f1
m_EditorVersionWithRevision: 2020.3.14f1 (d0d1bb862f9d)
m_EditorVersion: 2020.3.19f1
m_EditorVersionWithRevision: 2020.3.19f1 (68f137dc9bbe)

15
ProjectSettings/TimelineSettings.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 61
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
m_Name:
m_EditorClassIdentifier:
assetDefaultFramerate: 60

31
Assets/Scripts/Editor/AutoBuildAddressables.cs


using UnityEditor;
using UnityEditor.AddressableAssets.Settings;
public static class AutoBuildAddressables
{
private const string Title = "Adressables";
private const string Message = "This project uses Addressables for it's content, if you havent built these already the player will fail to function correctly.";
private const string Agree = "Build Adressables Now";
private const string Disagree = "Ignore";
[InitializeOnLoadMethod]
private static void Initialize()
{
BuildPlayerWindow.RegisterBuildPlayerHandler(BuildPlayerHandler);
}
private static void BuildPlayerHandler(BuildPlayerOptions options)
{
Popup();
BuildPlayerWindow.DefaultBuildMethods.BuildPlayer(options);
}
public static void Popup()
{
if (EditorUtility.DisplayDialog(Title, Message, Agree, Disagree))
{
AddressableAssetSettings.BuildPlayerContent();
}
}
}

11
Assets/Scripts/Editor/AutoBuildAddressables.cs.meta


fileFormatVersion: 2
guid: dc9577da99836c947b831d20ee1d276b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存