浏览代码

First commit

/main
patrick-devarney 4 年前
当前提交
b21cfe72
共有 222 个文件被更改,包括 8079 次插入0 次删除
  1. 6
      .vsconfig
  2. 8
      Assets/AddressableAssetsData.meta
  3. 101
      Assets/AddressableAssetsData/AddressableAssetSettings.asset
  4. 8
      Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta
  5. 8
      Assets/AddressableAssetsData/AssetGroupTemplates.meta
  6. 67
      Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset
  7. 8
      Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta
  8. 8
      Assets/AddressableAssetsData/AssetGroups.meta
  9. 36
      Assets/AddressableAssetsData/AssetGroups/Built In Data.asset
  10. 8
      Assets/AddressableAssetsData/AssetGroups/Built In Data.asset.meta
  11. 53
      Assets/AddressableAssetsData/AssetGroups/Duplicate Assets Sorted By Label.asset
  12. 8
      Assets/AddressableAssetsData/AssetGroups/Duplicate Assets Sorted By Label.asset.meta
  13. 43
      Assets/AddressableAssetsData/AssetGroups/Inventory Items.asset
  14. 8
      Assets/AddressableAssetsData/AssetGroups/Inventory Items.asset.meta
  15. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas.meta
  16. 17
      Assets/AddressableAssetsData/AssetGroups/Schemas/Built In Data_PlayerDataGroupSchema.asset
  17. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas/Built In Data_PlayerDataGroupSchema.asset.meta
  18. 41
      Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_BundledAssetGroupSchema.asset
  19. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_BundledAssetGroupSchema.asset.meta
  20. 16
      Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_ContentUpdateGroupSchema.asset
  21. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_ContentUpdateGroupSchema.asset.meta
  22. 41
      Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_BundledAssetGroupSchema.asset
  23. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_BundledAssetGroupSchema.asset.meta
  24. 16
      Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_ContentUpdateGroupSchema.asset
  25. 8
      Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_ContentUpdateGroupSchema.asset.meta
  26. 8
      Assets/AddressableAssetsData/DataBuilders.meta
  27. 20
      Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset
  28. 8
      Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta
  29. 20
      Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset
  30. 8
      Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta
  31. 20
      Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset
  32. 8
      Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta
  33. 20
      Assets/AddressableAssetsData/DataBuilders/BuildScriptVirtualMode.asset
  34. 8
      Assets/AddressableAssetsData/DataBuilders/BuildScriptVirtualMode.asset.meta
  35. 15
      Assets/AddressableAssetsData/DefaultObject.asset
  36. 8
      Assets/AddressableAssetsData/DefaultObject.asset.meta
  37. 8
      Assets/AddressableAssetsData/Windows.meta
  38. 4
      Assets/AddressableAssetsData/Windows/addressables_content_state.bin
  39. 7
      Assets/AddressableAssetsData/Windows/addressables_content_state.bin.meta
  40. 8
      Assets/Editor.meta
  41. 251
      Assets/Editor/CheckBundleDupeDependenciesV2.cs
  42. 11
      Assets/Editor/CheckBundleDupeDependenciesV2.cs.meta
  43. 458
      Assets/Editor/MyBundleRuleBase.cs
  44. 11
      Assets/Editor/MyBundleRuleBase.cs.meta
  45. 31
      Assets/InventorySystem.cs
  46. 11
      Assets/InventorySystem.cs.meta
  47. 78
      Assets/InventorySystemAddressable.cs
  48. 11
      Assets/InventorySystemAddressable.cs.meta
  49. 8
      Assets/Scenes.meta
  50. 1001
      Assets/Scenes/Example_Addressables.unity
  51. 7
      Assets/Scenes/Example_Addressables.unity.meta
  52. 1001
      Assets/Scenes/Example_NoAddressables.unity
  53. 7
      Assets/Scenes/Example_NoAddressables.unity.meta
  54. 8
      Assets/TextMesh Pro.meta
  55. 8
      Assets/TextMesh Pro/Documentation.meta
  56. 1001
      Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf
  57. 7
      Assets/TextMesh Pro/Documentation/TextMesh Pro User Guide 2016.pdf.meta
  58. 8
      Assets/TextMesh Pro/Fonts.meta
  59. 46
      Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt
  60. 8
      Assets/TextMesh Pro/Fonts/LiberationSans - OFL.txt.meta
  61. 1001
      Assets/TextMesh Pro/Fonts/LiberationSans.ttf
  62. 19
      Assets/TextMesh Pro/Fonts/LiberationSans.ttf.meta
  63. 8
      Assets/TextMesh Pro/Resources.meta
  64. 9
      Assets/TextMesh Pro/Resources/Fonts & Materials.meta
  65. 106
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat
  66. 8
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Drop Shadow.mat.meta
  67. 337
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
  68. 8
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset.meta
  69. 104
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat
  70. 8
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Outline.mat.meta
  71. 1001
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset
  72. 8
      Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset.meta
  73. 1
      Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt
  74. 8
      Assets/TextMesh Pro/Resources/LineBreaking Following Characters.txt.meta
  75. 1
      Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt
  76. 8
      Assets/TextMesh Pro/Resources/LineBreaking Leading Characters.txt.meta
  77. 9
      Assets/TextMesh Pro/Resources/Sprite Assets.meta
  78. 659
      Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset
  79. 8
      Assets/TextMesh Pro/Resources/Sprite Assets/EmojiOne.asset.meta
  80. 9
      Assets/TextMesh Pro/Resources/Style Sheets.meta
  81. 68
      Assets/TextMesh Pro/Resources/Style Sheets/Default Style Sheet.asset

6
.vsconfig


{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

8
Assets/AddressableAssetsData.meta


fileFormatVersion: 2
guid: 0f4af74f951181145810ec84a4564aa8
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

101
Assets/AddressableAssetsData/AddressableAssetSettings.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 468a46d0ae32c3544b7d98094e6448a9, type: 3}
m_Name: AddressableAssetSettings
m_EditorClassIdentifier:
m_DefaultGroup: dd25db6221211a24d979b31d50184201
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_BundleLocalCatalog: 0
m_DisableCatalogUpdateOnStart: 0
m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_maxConcurrentWebRequests: 500
m_ContiguousBundles: 0
m_RemoteCatalogBuildPath:
m_Id:
m_RemoteCatalogLoadPath:
m_Id:
m_overridePlayerVersion:
m_GroupAssets:
- {fileID: 11400000, guid: 87a11cac04906994781d663609506dd5, type: 2}
- {fileID: 11400000, guid: c833a04a0e0d3704bbb624fa91be57de, type: 2}
- {fileID: 11400000, guid: 7164094f98ba29146a59f05570dad988, type: 2}
m_BuildSettings:
m_CompileScriptsInVirtualMode: 0
m_CleanupStreamingAssetsAfterBuilds: 1
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: 9ce4c4b3bc9717a458c51d822dcc5d26
m_ProfileName: Default
m_Values:
- m_Id: edec2c29d1b8e204b894d9f912297a02
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: da4da2b7edb627346975640e562ba2e6
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: e0f962fae37b7a04fab7082e8eecb630
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_Id: b51ca85c0d34ddd419cf07e5dce0ca0b
m_Value: ServerData/[BuildTarget]
- m_Id: 4388e163ab6da5b41a1eca55a62ef267
m_Value: http://localhost/[BuildTarget]
m_ProfileEntryNames:
- m_Id: edec2c29d1b8e204b894d9f912297a02
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: da4da2b7edb627346975640e562ba2e6
m_Name: LocalBuildPath
m_InlineUsage: 0
- m_Id: e0f962fae37b7a04fab7082e8eecb630
m_Name: LocalLoadPath
m_InlineUsage: 0
- m_Id: b51ca85c0d34ddd419cf07e5dce0ca0b
m_Name: RemoteBuildPath
m_InlineUsage: 0
- m_Id: 4388e163ab6da5b41a1eca55a62ef267
m_Name: RemoteLoadPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
- Bundle2
- Bundle4
- Bundle1
- Bundle3
- Bundle5
- Bundle6
- Bundle7
- Bundle8
- Bundle9
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: 7165fa7bd7c7d724093c87a5b4ea15c5, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 3
m_DataBuilders:
- {fileID: 11400000, guid: 8bfa1f1942b9b04439c7d3d6d39d40ce, type: 2}
- {fileID: 11400000, guid: c38659bb239935b4cac66bb42ae334b7, type: 2}
- {fileID: 11400000, guid: 96097f028bad387429de04c23f777f0e, type: 2}
- {fileID: 11400000, guid: 0a4b1b88aff429e40bf9a7e75cdd8d00, type: 2}
m_ActiveProfileId: 9ce4c4b3bc9717a458c51d822dcc5d26
m_HostingServicesManager:
m_HostingServiceInfos: []
m_Settings: {fileID: 11400000}
m_NextInstanceId: 0
m_RegisteredServiceTypeRefs: []

8
Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta


fileFormatVersion: 2
guid: 99c87e75b523bd14e9f70b3966d71316
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AddressableAssetsData/AssetGroupTemplates.meta


fileFormatVersion: 2
guid: 9ce8d661a9846424ebec8d41e6421bc4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

67
Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6091799034813373174
MonoBehaviour:
m_ObjectHideFlags: 1
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_StaticContent: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
m_Name: Packed Assets
m_EditorClassIdentifier:
m_SchemaObjects:
- {fileID: 7583811352990887104}
- {fileID: -6091799034813373174}
m_Description: Pack assets into asset bundles.
m_Settings: {fileID: 0}
--- !u!114 &7583811352990887104
MonoBehaviour:
m_ObjectHideFlags: 1
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_Compression: 1
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id:
m_LoadPath:
m_Id:
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName:
m_ClassName:
m_BundleNaming: 0

8
Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta


fileFormatVersion: 2
guid: 7165fa7bd7c7d724093c87a5b4ea15c5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AddressableAssetsData/AssetGroups.meta


fileFormatVersion: 2
guid: 24fe911cc01d00148bef4d76a41e1ae3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

36
Assets/AddressableAssetsData/AssetGroups/Built In Data.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Built In Data
m_EditorClassIdentifier:
m_GroupName: Built In Data
m_Data:
m_SerializedData: []
m_GUID: 33048a4baf2f5424c9f6a554d7c4202c
m_SerializeEntries:
- m_GUID: EditorSceneList
m_Address: EditorSceneList
m_ReadOnly: 1
m_SerializedLabels: []
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: Resources
m_Address: Resources
m_ReadOnly: 1
m_SerializedLabels: []
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_ReadOnly: 1
m_Settings: {fileID: 11400000, guid: 99c87e75b523bd14e9f70b3966d71316, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: eaeccca70e02aff4b9d5b13cd2bcced7, type: 2}

8
Assets/AddressableAssetsData/AssetGroups/Built In Data.asset.meta


fileFormatVersion: 2
guid: 87a11cac04906994781d663609506dd5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

53
Assets/AddressableAssetsData/AssetGroups/Duplicate Assets Sorted By Label.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Duplicate Assets Sorted By Label
m_EditorClassIdentifier:
m_GroupName: Duplicate Assets Sorted By Label
m_Data:
m_SerializedData: []
m_GUID: 5e0778dcaba1d254884e2b6d262961a5
m_SerializeEntries:
- m_GUID: 530fec31288b3514183ea010b38b36e1
m_Address: Assets/Weapons/Sword/Textures/Sword_N.tif
m_ReadOnly: 0
m_SerializedLabels:
- Bundle1
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: a269cfc47281f3749a982c9a0ea65117
m_Address: Assets/Weapons/Sword/Textures/Sword_D.tif
m_ReadOnly: 0
m_SerializedLabels:
- Bundle1
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: 5cdbb5effeab4db45a17845dd1d1289d
m_Address: Assets/Weapons/Sword/Model/Sword_MD.fbx
m_ReadOnly: 0
m_SerializedLabels:
- Bundle1
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: ab3b772d9719bea4ca0228c4a76a4f3b
m_Address: Assets/Weapons/MyStandardShader.shader
m_ReadOnly: 0
m_SerializedLabels:
- Bundle2
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 99c87e75b523bd14e9f70b3966d71316, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 2dd7cb69b753d234e80a520e45d31de5, type: 2}
- {fileID: 11400000, guid: 780d42600b59b83408ab600ee106f1b9, type: 2}

8
Assets/AddressableAssetsData/AssetGroups/Duplicate Assets Sorted By Label.asset.meta


fileFormatVersion: 2
guid: 7164094f98ba29146a59f05570dad988
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

43
Assets/AddressableAssetsData/AssetGroups/Inventory Items.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
m_Name: Inventory Items
m_EditorClassIdentifier:
m_GroupName: Inventory Items
m_Data:
m_SerializedData: []
m_GUID: dd25db6221211a24d979b31d50184201
m_SerializeEntries:
- m_GUID: f3d193f927f5b554aa865c1e645f7457
m_Address: Assets/Weapons/Prefabs/BossSword.prefab
m_ReadOnly: 0
m_SerializedLabels: []
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: 24a423ef19c294449b84f4728c309501
m_Address: Assets/Weapons/Prefabs/Shield.prefab
m_ReadOnly: 0
m_SerializedLabels: []
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
- m_GUID: 8d937e227d331c74d9136971897d6aeb
m_Address: Assets/Weapons/Prefabs/Sword.prefab
m_ReadOnly: 0
m_SerializedLabels: []
m_MainAsset: {fileID: 0}
m_TargetAsset: {fileID: 0}
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 99c87e75b523bd14e9f70b3966d71316, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: 8d027989ad7cf8948af277ba1b6a08a2, type: 2}
- {fileID: 11400000, guid: d0be1143ad407f94d94fa33fb4d9341b, type: 2}

8
Assets/AddressableAssetsData/AssetGroups/Inventory Items.asset.meta


fileFormatVersion: 2
guid: c833a04a0e0d3704bbb624fa91be57de
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AddressableAssetsData/AssetGroups/Schemas.meta


fileFormatVersion: 2
guid: 7c87d35602bb61043bf483246bb730c1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

17
Assets/AddressableAssetsData/AssetGroups/Schemas/Built In Data_PlayerDataGroupSchema.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: b1487f5d688e4f94f828f879d599dbdc, type: 3}
m_Name: Built In Data_PlayerDataGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_IncludeResourcesFolders: 1
m_IncludeBuildSettingsScenes: 1

8
Assets/AddressableAssetsData/AssetGroups/Schemas/Built In Data_PlayerDataGroupSchema.asset.meta


fileFormatVersion: 2
guid: eaeccca70e02aff4b9d5b13cd2bcced7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

41
Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_BundledAssetGroupSchema.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Duplicate Assets Sorted By Label_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 7164094f98ba29146a59f05570dad988, type: 2}
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: da4da2b7edb627346975640e562ba2e6
m_LoadPath:
m_Id: e0f962fae37b7a04fab7082e8eecb630
m_BundleMode: 2
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 0

8
Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_BundledAssetGroupSchema.asset.meta


fileFormatVersion: 2
guid: 2dd7cb69b753d234e80a520e45d31de5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

16
Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_ContentUpdateGroupSchema.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Duplicate Assets Sorted By Label_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 0}
m_StaticContent: 0

8
Assets/AddressableAssetsData/AssetGroups/Schemas/Duplicate Assets Sorted By Label_ContentUpdateGroupSchema.asset.meta


fileFormatVersion: 2
guid: 780d42600b59b83408ab600ee106f1b9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

41
Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_BundledAssetGroupSchema.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: e5d17a21594effb4e9591490b009e7aa, type: 3}
m_Name: Inventory Items_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: c833a04a0e0d3704bbb624fa91be57de, type: 2}
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: da4da2b7edb627346975640e562ba2e6
m_LoadPath:
m_Id: e0f962fae37b7a04fab7082e8eecb630
m_BundleMode: 1
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_BundleNaming: 0

8
Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_BundledAssetGroupSchema.asset.meta


fileFormatVersion: 2
guid: 8d027989ad7cf8948af277ba1b6a08a2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

16
Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_ContentUpdateGroupSchema.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
m_Name: Inventory Items_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: c833a04a0e0d3704bbb624fa91be57de, type: 2}
m_StaticContent: 0

8
Assets/AddressableAssetsData/AssetGroups/Schemas/Inventory Items_ContentUpdateGroupSchema.asset.meta


fileFormatVersion: 2
guid: d0be1143ad407f94d94fa33fb4d9341b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AddressableAssetsData/DataBuilders.meta


fileFormatVersion: 2
guid: a82465c49504dc04c998f84ce6c2619b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

20
Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 88d21199f5d473f4db36845f2318f180, type: 3}
m_Name: BuildScriptFastMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

8
Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta


fileFormatVersion: 2
guid: 8bfa1f1942b9b04439c7d3d6d39d40ce
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
m_Name: BuildScriptPackedMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

8
Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta


fileFormatVersion: 2
guid: 0a4b1b88aff429e40bf9a7e75cdd8d00
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
m_Name: BuildScriptPackedPlayMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

8
Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta


fileFormatVersion: 2
guid: 96097f028bad387429de04c23f777f0e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

20
Assets/AddressableAssetsData/DataBuilders/BuildScriptVirtualMode.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bb0e4994b34add1409fd8ccaf4a82de5, type: 3}
m_Name: BuildScriptVirtualMode
m_EditorClassIdentifier:
instanceProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
sceneProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider

8
Assets/AddressableAssetsData/DataBuilders/BuildScriptVirtualMode.asset.meta


fileFormatVersion: 2
guid: c38659bb239935b4cac66bb42ae334b7
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

15
Assets/AddressableAssetsData/DefaultObject.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 3a189bb168d8d90478a09ea08c2f3d72, type: 3}
m_Name: DefaultObject
m_EditorClassIdentifier:
m_AddressableAssetSettingsGuid: 99c87e75b523bd14e9f70b3966d71316

8
Assets/AddressableAssetsData/DefaultObject.asset.meta


fileFormatVersion: 2
guid: 6f14b26544cc35540846b833d1515300
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

8
Assets/AddressableAssetsData/Windows.meta


fileFormatVersion: 2
guid: c4322e261be993d40b9fc600668ad647
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

4
Assets/AddressableAssetsData/Windows/addressables_content_state.bin


���� PUnity.Addressables.Editor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null<UnityEditor.AddressableAssets.Build.AddressablesContentState playerVersion editorVersion cachedInfosremoteCatalogLoadPath cachedBundles6UnityEditor.AddressableAssets.Build.CachedAssetState[]7UnityEditor.AddressableAssets.Build.CachedBundleState[]2021.03.11.18.12.58
2020.3.0f1  4UnityEditor.AddressableAssets.Build.CachedAssetState5UnityEditor.AddressableAssets.Build.CachedBundleState 
LUnity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null5UnityEditor.AddressableAssets.Build.CachedBundleState bundleFileIddata �{UnityEngine.AddressableAssets.Addressables.RuntimePath}/StandaloneWindows/inventoryitems_assets_all_b36e8ea648e85002568077eab4ec3683.bundle   �{UnityEngine.AddressableAssets.Addressables.RuntimePath}/StandaloneWindows/inventoryitems_unitybuiltinshaders_5bc69cb19bbef1c16ae41b20042c1476.bundle  JUnityEngine.ResourceManagement.ResourceProviders.AssetBundleRequestOptions m_Hashm_Crc m_Timeoutm_ChunkedTransferm_RedirectLimit m_RetryCount m_BundleName m_BundleSizem_UseCrcForCachedBundles 
 b36e8ea648e85002568077eab4ec3683��o+���� ca84588e015a04b2ce70e7b05dc66552̤;  5bc69cb19bbef1c16ae41b20042c14763�j����49e295f9829e6a4d1ee812e5c015bcbe4_unitybuiltinshaders�?

7
Assets/AddressableAssetsData/Windows/addressables_content_state.bin.meta


fileFormatVersion: 2
guid: 92788003dc45252468ed67ecc74a14a1
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Editor.meta


fileFormatVersion: 2
guid: eb695e23b79024145beabf7d8d8a2a41
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

251
Assets/Editor/CheckBundleDupeDependenciesV2.cs


/// This AnalyzeRule is based on the built-in rule CheckBundleDupeDependencies
/// This rule finds assets in Addressables that will be duplicated across multiple AssetBundles
/// Instead of placing all problematic assets in a shared Group, this rule results in fewer AssetBundles
/// being created by placing assets with the same AssetBundle parents into the same label and AssetBundle
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.AddressableAssets.Build;
using UnityEditor.AddressableAssets.Build.DataBuilders;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.AddressableAssets.Settings.GroupSchemas;
using UnityEditor.Build.Pipeline;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEditor;
using UnityEditor.AddressableAssets.Build.AnalyzeRules;
class CheckBundleDupeDependenciesV2 : MyBundleRuleBase
{
internal struct CheckDupeResult
{
public AddressableAssetGroup Group;
public string DuplicatedFile;
public string AssetPath;
public GUID DuplicatedGroupGuid;
}
public override bool CanFix
{
get { return true; }
}
public override string ruleName
{ get { return "Check Duplicate Bundle Dependencies V2"; } }
[NonSerialized]
internal readonly Dictionary<string, Dictionary<string, List<string>>> m_AllIssues = new Dictionary<string, Dictionary<string, List<string>>>();
[SerializeField]
internal Dictionary<List<string>, List<string>> duplicateAssetsAndParents = new Dictionary<List<string>, List<string>>();
public override List<AnalyzeResult> RefreshAnalysis(AddressableAssetSettings settings)
{
ClearAnalysis();
return CheckForDuplicateDependencies(settings);
}
List<AnalyzeResult> CheckForDuplicateDependencies(AddressableAssetSettings settings)
{
List<AnalyzeResult> retVal = new List<AnalyzeResult>();
if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo())
{
Debug.LogError("Cannot run Analyze with unsaved scenes");
retVal.Add(new AnalyzeResult { resultName = ruleName + "Cannot run Analyze with unsaved scenes" });
return retVal;
}
CalculateInputDefinitions(settings);
if (m_AllBundleInputDefs.Count > 0)
{
var context = GetBuildContext(settings);
ReturnCode exitCode = RefreshBuild(context);
if (exitCode < ReturnCode.Success)
{
Debug.LogError("Analyze build failed. " + exitCode);
retVal.Add(new AnalyzeResult { resultName = ruleName + "Analyze build failed. " + exitCode });
return retVal;
}
var implicitGuids = GetImplicitGuidToFilesMap();
var checkDupeResults = CalculateDuplicates(implicitGuids, context);
BuildImplicitDuplicatedAssetsSet(checkDupeResults);
retVal = (from issueGroup in m_AllIssues
from bundle in issueGroup.Value
from item in bundle.Value
select new AnalyzeResult
{
resultName = ruleName + kDelimiter +
issueGroup.Key + kDelimiter +
ConvertBundleName(bundle.Key, issueGroup.Key) + kDelimiter +
item,
severity = MessageType.Warning
}).ToList();
}
if (retVal.Count == 0)
retVal.Add(noErrors);
return retVal;
}
internal IEnumerable<CheckDupeResult> CalculateDuplicates(Dictionary<GUID, List<string>> implicitGuids, AddressableAssetsBuildContext aaContext)
{
//Get all guids that have more than one bundle referencing them
IEnumerable<KeyValuePair<GUID, List<string>>> validGuids =
from dupeGuid in implicitGuids
where dupeGuid.Value.Distinct().Count() > 1
where IsValidPath(AssetDatabase.GUIDToAssetPath(dupeGuid.Key.ToString()))
select dupeGuid;
// Key = bundle parents
// Value = asset paths that share the same bundle parents
duplicateAssetsAndParents.Clear();
foreach (var entry in validGuids)
{
string assetPath = AssetDatabase.GUIDToAssetPath(entry.Key.ToString());
List<string> assetParents = entry.Value;
// Purge duplicate parents (assets inside a Scene can show multiple copies of the Scene AssetBundle as a parent)
List<string> nonDupeParents = new List<string>();
foreach (var parent in assetParents)
{
if (nonDupeParents.Contains(parent))
continue;
nonDupeParents.Add(parent);
}
assetParents = nonDupeParents;
bool found = false;
// Try to find assetParents in existing dictionary
foreach (var bundleParentSetup in duplicateAssetsAndParents.Keys)
{
if (Enumerable.SequenceEqual(bundleParentSetup, assetParents))
{
duplicateAssetsAndParents[bundleParentSetup].Add(assetPath);
found = true;
break;
}
}
if (!found)
{
duplicateAssetsAndParents.Add(assetParents, new List<string>() { assetPath });
}
}
return
from guidToFile in validGuids
from file in guidToFile.Value
//Get the files that belong to those guids
let fileToBundle = m_ExtractData.WriteData.FileToBundle[file]
//Get the bundles that belong to those files
let bundleToGroup = aaContext.bundleToAssetGroup[fileToBundle]
//Get the asset groups that belong to those bundles
let selectedGroup = aaContext.Settings.FindGroup(findGroup => findGroup != null && findGroup.Guid == bundleToGroup)
select new CheckDupeResult
{
Group = selectedGroup,
DuplicatedFile = file,
AssetPath = AssetDatabase.GUIDToAssetPath(guidToFile.Key.ToString()),
DuplicatedGroupGuid = guidToFile.Key
};
}
internal void BuildImplicitDuplicatedAssetsSet(IEnumerable<CheckDupeResult> checkDupeResults)
{
foreach (var checkDupeResult in checkDupeResults)
{
Dictionary<string, List<string>> groupData;
// Add the data to the AllIssues container for UI display
if (!m_AllIssues.TryGetValue(checkDupeResult.Group.Name, out groupData))
{
groupData = new Dictionary<string, List<string>>();
m_AllIssues.Add(checkDupeResult.Group.Name, groupData);
}
List<string> assets;
if (!groupData.TryGetValue(m_ExtractData.WriteData.FileToBundle[checkDupeResult.DuplicatedFile], out assets))
{
assets = new List<string>();
groupData.Add(m_ExtractData.WriteData.FileToBundle[checkDupeResult.DuplicatedFile], assets);
}
assets.Add(checkDupeResult.AssetPath);
}
}
public override void FixIssues(AddressableAssetSettings settings)
{
// If we have no duplicate data, run the check again
if (duplicateAssetsAndParents == null || duplicateAssetsAndParents.Count == 0)
CheckForDuplicateDependencies(settings);
// If we have found no duplicates, return
if (duplicateAssetsAndParents.Count == 0)
return;
// Setup Addressables Group to store all our duplicate assets
string desiredGroupName = "Duplicate Assets Sorted By Label";
AddressableAssetGroup group = settings.FindGroup(desiredGroupName);
if (group == null)
{
group = settings.CreateGroup(desiredGroupName, false, false, false, null, typeof(BundledAssetGroupSchema), typeof(ContentUpdateGroupSchema));
var bundleSchema = group.GetSchema<BundledAssetGroupSchema>();
// Set to pack by label so that assets with the same label are put in the same AssetBundle
bundleSchema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogetherByLabel;
}
EditorUtility.DisplayProgressBar("Setting up De-Duplication Group...", "", 0f / duplicateAssetsAndParents.Count);
// Iterate through each duplicate asset
int bundleNumber = 1;
foreach (var entry in duplicateAssetsAndParents)
{
EditorUtility.DisplayProgressBar("Setting up De-Duplication Group...", "Creating Label Group", ((float)bundleNumber) / duplicateAssetsAndParents.Count);
string desiredLabelName = "Bundle" + bundleNumber;
List<AddressableAssetEntry> entriesToAdd = new List<AddressableAssetEntry>();
// Put each asset in the shared Group
foreach (string assetPath in entry.Value)
{
entriesToAdd.Add(settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(assetPath).ToString(), group, false, false));
}
// Set the label for this selection of assets so they get packed into the same AssetBundle
settings.AddLabel(desiredLabelName);
SetLabelValueForEntries(settings, entriesToAdd, desiredLabelName, true);
bundleNumber++;
}
settings.SetDirty(AddressableAssetSettings.ModificationEvent.BatchModification, null, true, true);
}
internal void SetLabelValueForEntries(AddressableAssetSettings settings, List<AddressableAssetEntry> entries, string label, bool value, bool postEvent = true)
{
if (value)
settings.AddLabel(label);
foreach (var e in entries)
e.SetLabel(label, value, false);
settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, entries, postEvent, true);
}
public override void ClearAnalysis()
{
m_AllIssues.Clear();
duplicateAssetsAndParents.Clear();
base.ClearAnalysis();
}
}
[InitializeOnLoad]
class RegisterCheckBundleDupeDependenciesV2
{
static RegisterCheckBundleDupeDependenciesV2()
{
AnalyzeSystem.RegisterNewRule<CheckBundleDupeDependenciesV2>();
}
}

11
Assets/Editor/CheckBundleDupeDependenciesV2.cs.meta


fileFormatVersion: 2
guid: 7b58e167734d99a48a92a78c982c26a4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

458
Assets/Editor/MyBundleRuleBase.cs


using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor.AddressableAssets.Build.BuildPipelineTasks;
using UnityEditor.AddressableAssets.Build.DataBuilders;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.AddressableAssets.Settings.GroupSchemas;
using UnityEditor.Build.Content;
using UnityEditor.Build.Pipeline;
using UnityEditor.Build.Pipeline.Interfaces;
using UnityEditor.Build.Pipeline.Tasks;
using UnityEditor.Build.Pipeline.Utilities;
using UnityEditor.Build.Utilities;
using UnityEngine;
using UnityEngine.AddressableAssets.Initialization;
using UnityEngine.AddressableAssets.ResourceLocators;
namespace UnityEditor.AddressableAssets.Build.AnalyzeRules
{
class MyBundleRuleBase : AnalyzeRule
{
[NonSerialized]
internal List<GUID> m_AddressableAssets = new List<GUID>();
[NonSerialized]
internal Dictionary<string, List<GUID>> m_ResourcesToDependencies = new Dictionary<string, List<GUID>>();
[NonSerialized]
internal readonly List<ContentCatalogDataEntry> m_Locations = new List<ContentCatalogDataEntry>();
[NonSerialized]
internal readonly List<AssetBundleBuild> m_AllBundleInputDefs = new List<AssetBundleBuild>();
[NonSerialized]
internal readonly Dictionary<string, string> m_BundleToAssetGroup = new Dictionary<string, string>();
[NonSerialized]
internal readonly List<AddressableAssetEntry> m_AssetEntries = new List<AddressableAssetEntry>();
[NonSerialized]
internal ExtractDataTask m_ExtractData = new ExtractDataTask();
internal IList<IBuildTask> RuntimeDataBuildTasks(string builtinShaderBundleName)
{
IList<IBuildTask> buildTasks = new List<IBuildTask>();
// Setup
buildTasks.Add(new SwitchToBuildPlatform());
buildTasks.Add(new RebuildSpriteAtlasCache());
// Player Scripts
buildTasks.Add(new BuildPlayerScripts());
// Dependency
buildTasks.Add(new CalculateSceneDependencyData());
buildTasks.Add(new CalculateAssetDependencyData());
buildTasks.Add(new StripUnusedSpriteSources());
buildTasks.Add(new CreateBuiltInShadersBundle(builtinShaderBundleName));
// Packing
buildTasks.Add(new GenerateBundlePacking());
buildTasks.Add(new UpdateBundleObjectLayout());
buildTasks.Add(new GenerateBundleCommands());
buildTasks.Add(new GenerateSubAssetPathMaps());
buildTasks.Add(new GenerateBundleMaps());
buildTasks.Add(new GenerateLocationListsTask());
return buildTasks;
}
internal AddressableAssetsBuildContext GetBuildContext(AddressableAssetSettings settings)
{
ResourceManagerRuntimeData runtimeData = new ResourceManagerRuntimeData();
runtimeData.LogResourceManagerExceptions = settings.buildSettings.LogResourceManagerExceptions;
var aaContext = new AddressableAssetsBuildContext
{
Settings = settings,
runtimeData = runtimeData,
bundleToAssetGroup = m_BundleToAssetGroup,
locations = m_Locations,
providerTypes = new HashSet<Type>(),
assetEntries = m_AssetEntries,
assetGroupToBundles = new Dictionary<AddressableAssetGroup, List<string>>()
};
return aaContext;
}
protected bool IsValidPath(string path)
{
return IsPathValidForEntry(path) &&
!path.ToLower().Contains("/resources/") &&
!path.ToLower().StartsWith("resources/");
}
internal static bool IsPathValidForEntry(string path)
{
if (string.IsNullOrEmpty(path))
return false;
if (!path.StartsWith("assets", StringComparison.OrdinalIgnoreCase) && !IsPathValidPackageAsset(path))
return false;
path = path.ToLower();
if (path == CommonStrings.UnityEditorResourcePath ||
path == CommonStrings.UnityDefaultResourcePath ||
path == CommonStrings.UnityBuiltInExtraPath)
return false;
var ext = Path.GetExtension(path);
if (ext == ".cs" || ext == ".js" || ext == ".boo" || ext == ".exe" || ext == ".dll" || ext == ".meta")
return false;
return true;
}
internal static bool IsPathValidPackageAsset(string path)
{
string convertPath = path.ToLower().Replace("\\", "/");
string[] splitPath = convertPath.Split('/');
if (splitPath.Length < 3)
return false;
if (splitPath[0] != "packages")
return false;
if (splitPath.Length == 3)
{
string ext = Path.GetExtension(splitPath[2]);
if (ext == ".json" || ext == ".asmdef")
return false;
}
return true;
}
internal ReturnCode RefreshBuild(AddressableAssetsBuildContext buildContext)
{
var settings = buildContext.Settings;
var context = new AddressablesDataBuilderInput(settings);
var buildTarget = context.Target;
var buildTargetGroup = context.TargetGroup;
var buildParams = new AddressableAssetsBundleBuildParameters(settings, m_BundleToAssetGroup, buildTarget,
buildTargetGroup, settings.buildSettings.bundleBuildPath);
var builtinShaderBundleName =
settings.DefaultGroup.Name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/") +
"_unitybuiltinshaders.bundle";
var buildTasks = RuntimeDataBuildTasks(builtinShaderBundleName);
buildTasks.Add(m_ExtractData);
IBundleBuildResults buildResults;
var exitCode = ContentPipeline.BuildAssetBundles(buildParams, new BundleBuildContent(m_AllBundleInputDefs),
out buildResults, buildTasks, buildContext);
return exitCode;
}
internal List<GUID> GetAllBundleDependencies()
{
var explicitGuids = m_ExtractData.WriteData.AssetToFiles.Keys;
var implicitGuids = GetImplicitGuidToFilesMap().Keys;
var allBundleGuids = explicitGuids.Union(implicitGuids);
return allBundleGuids.ToList();
}
internal void IntersectResourcesDepedenciesWithBundleDependencies(List<GUID> bundleDependencyGuids)
{
foreach (var key in m_ResourcesToDependencies.Keys)
{
var bundleDependencies = bundleDependencyGuids.Intersect(m_ResourcesToDependencies[key]).ToList();
m_ResourcesToDependencies[key].Clear();
m_ResourcesToDependencies[key].AddRange(bundleDependencies);
}
}
internal virtual void BuiltInResourcesToDependenciesMap(string[] resourcePaths)
{
foreach (string path in resourcePaths)
{
string[] dependencies = AssetDatabase.GetDependencies(path);
if (!m_ResourcesToDependencies.ContainsKey(path))
m_ResourcesToDependencies.Add(path, new List<GUID>());
m_ResourcesToDependencies[path].AddRange(from dependency in dependencies
select new GUID(AssetDatabase.AssetPathToGUID(dependency)));
}
}
internal void ConvertBundleNamesToGroupNames(AddressableAssetsBuildContext buildContext)
{
Dictionary<string, string> bundleNamesToUpdate = new Dictionary<string, string>();
foreach (var assetGroup in buildContext.Settings.groups)
{
if (assetGroup == null)
continue;
List<string> bundles;
if (buildContext.assetGroupToBundles.TryGetValue(assetGroup, out bundles))
{
foreach (string bundle in bundles)
{
var keys = m_ExtractData.WriteData.FileToBundle.Keys.Where(key => m_ExtractData.WriteData.FileToBundle[key] == bundle);
foreach (string key in keys)
bundleNamesToUpdate.Add(key, assetGroup.Name);
}
}
}
foreach (string key in bundleNamesToUpdate.Keys)
{
var bundle = m_ExtractData.WriteData.FileToBundle[key];
var inputDef = m_AllBundleInputDefs.FirstOrDefault(b => b.assetBundleName == bundle);
int index = m_AllBundleInputDefs.IndexOf(inputDef);
if (index >= 0)
{
inputDef.assetBundleName = ConvertBundleName(inputDef.assetBundleName, bundleNamesToUpdate[key]);
m_AllBundleInputDefs[index] = inputDef;
m_ExtractData.WriteData.FileToBundle[key] = inputDef.assetBundleName;
}
}
}
internal void CalculateInputDefinitions(AddressableAssetSettings settings)
{
foreach (AddressableAssetGroup group in settings.groups)
{
if (group == null)
continue;
if (group.HasSchema<BundledAssetGroupSchema>())
{
var schema = group.GetSchema<BundledAssetGroupSchema>();
List<AssetBundleBuild> bundleInputDefinitions = new List<AssetBundleBuild>();
m_AssetEntries.AddRange(PrepGroupBundlePacking(group, bundleInputDefinitions, schema.BundleMode));
for (int i = 0; i < bundleInputDefinitions.Count; i++)
{
if (m_BundleToAssetGroup.ContainsKey(bundleInputDefinitions[i].assetBundleName))
bundleInputDefinitions[i] = CreateUniqueBundle(bundleInputDefinitions[i]);
m_BundleToAssetGroup.Add(bundleInputDefinitions[i].assetBundleName, schema.Group.Guid);
}
m_AllBundleInputDefs.AddRange(bundleInputDefinitions);
}
}
}
internal static List<AddressableAssetEntry> PrepGroupBundlePacking(AddressableAssetGroup assetGroup, List<AssetBundleBuild> bundleInputDefs, BundledAssetGroupSchema.BundlePackingMode packingMode)
{
var combinedEntries = new List<AddressableAssetEntry>();
switch (packingMode)
{
case BundledAssetGroupSchema.BundlePackingMode.PackTogether:
{
var allEntries = new List<AddressableAssetEntry>();
foreach (AddressableAssetEntry a in assetGroup.entries)
a.GatherAllAssets(allEntries, true, true, false);
combinedEntries.AddRange(allEntries);
GenerateBuildInputDefinitions(allEntries, bundleInputDefs, CalculateGroupHash(allEntries), "all");
}
break;
case BundledAssetGroupSchema.BundlePackingMode.PackSeparately:
{
foreach (AddressableAssetEntry a in assetGroup.entries)
{
var allEntries = new List<AddressableAssetEntry>();
a.GatherAllAssets(allEntries, true, true, false);
combinedEntries.AddRange(allEntries);
GenerateBuildInputDefinitions(allEntries, bundleInputDefs, CalculateGroupHash(allEntries), a.address);
}
}
break;
case BundledAssetGroupSchema.BundlePackingMode.PackTogetherByLabel:
{
var labelTable = new Dictionary<string, List<AddressableAssetEntry>>();
foreach (AddressableAssetEntry a in assetGroup.entries)
{
var sb = new StringBuilder();
foreach (var l in a.labels)
sb.Append(l);
var key = sb.ToString();
List<AddressableAssetEntry> entries;
if (!labelTable.TryGetValue(key, out entries))
labelTable.Add(key, entries = new List<AddressableAssetEntry>());
entries.Add(a);
}
foreach (var entryGroup in labelTable)
{
var allEntries = new List<AddressableAssetEntry>();
foreach (var a in entryGroup.Value)
a.GatherAllAssets(allEntries, true, true, false);
combinedEntries.AddRange(allEntries);
GenerateBuildInputDefinitions(allEntries, bundleInputDefs, CalculateGroupHash(allEntries), entryGroup.Key);
}
}
break;
default:
throw new Exception("Unknown Packing Mode");
}
return combinedEntries;
}
internal static void GenerateBuildInputDefinitions(List<AddressableAssetEntry> allEntries, List<AssetBundleBuild> buildInputDefs, string groupGuid, string address)
{
var scenes = new List<AddressableAssetEntry>();
var assets = new List<AddressableAssetEntry>();
foreach (var e in allEntries)
{
if (string.IsNullOrEmpty(e.AssetPath))
continue;
if (e.IsScene)
scenes.Add(e);
else
assets.Add(e);
}
if (assets.Count > 0)
buildInputDefs.Add(GenerateBuildInputDefinition(assets, groupGuid + "_assets_" + address + ".bundle"));
if (scenes.Count > 0)
buildInputDefs.Add(GenerateBuildInputDefinition(scenes, groupGuid + "_scenes_" + address + ".bundle"));
}
internal static AssetBundleBuild GenerateBuildInputDefinition(List<AddressableAssetEntry> assets, string name)
{
var assetInternalIds = new HashSet<string>();
var assetsInputDef = new AssetBundleBuild();
assetsInputDef.assetBundleName = name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/");
assetsInputDef.assetNames = assets.Select(s => s.AssetPath).ToArray();
assetsInputDef.addressableNames = new string[0];//assets.Select(s => s.GetAssetLoadPath(true, assetInternalIds)).ToArray();
return assetsInputDef;
}
internal static string CalculateGroupHash(IEnumerable<AddressableAssetEntry> entries)
{
return HashingMethods.Calculate(new HashSet<string>(entries.Select(e => e.guid))).ToString();
}
internal AssetBundleBuild CreateUniqueBundle(AssetBundleBuild bid)
{
int count = 1;
var newName = bid.assetBundleName;
while (m_BundleToAssetGroup.ContainsKey(newName) && count < 1000)
newName = bid.assetBundleName.Replace(".bundle", string.Format("{0}.bundle", count++));
return new AssetBundleBuild
{
assetBundleName = newName,
addressableNames = bid.addressableNames,
assetBundleVariant = bid.assetBundleVariant,
assetNames = bid.assetNames
};
}
internal List<GUID> GetImplicitGuidsForBundle(string fileName)
{
List<GUID> guids = (from id in m_ExtractData.WriteData.FileToObjects[fileName]
where !m_ExtractData.WriteData.AssetToFiles.Keys.Contains(id.guid)
select id.guid).ToList();
return guids;
}
internal Dictionary<GUID, List<string>> GetImplicitGuidToFilesMap()
{
Dictionary<GUID, List<string>> implicitGuids = new Dictionary<GUID, List<string>>();
IEnumerable<KeyValuePair<ObjectIdentifier, string>> validImplicitGuids =
from fileToObject in m_ExtractData.WriteData.FileToObjects
from objectId in fileToObject.Value
where !m_ExtractData.WriteData.AssetToFiles.Keys.Contains(objectId.guid)
select new KeyValuePair<ObjectIdentifier, string>(objectId, fileToObject.Key);
//Build our Dictionary from our list of valid implicit guids (guids not already in explicit guids)
foreach (var objectIdToFile in validImplicitGuids)
{
if (!implicitGuids.ContainsKey(objectIdToFile.Key.guid))
implicitGuids.Add(objectIdToFile.Key.guid, new List<string>());
implicitGuids[objectIdToFile.Key.guid].Add(objectIdToFile.Value);
}
return implicitGuids;
}
internal List<AnalyzeResult> CalculateBuiltInResourceDependenciesToBundleDependecies(AddressableAssetSettings settings, string[] builtInResourcesPaths)
{
List<AnalyzeResult> results = new List<AnalyzeResult>();
if (!BuildUtility.CheckModifiedScenesAndAskToSave())
{
Debug.LogError("Cannot run Analyze with unsaved scenes");
results.Add(new AnalyzeResult { resultName = ruleName + "Cannot run Analyze with unsaved scenes" });
return results;
}
m_AddressableAssets = (from aaGroup in settings.groups
where aaGroup != null
from entry in aaGroup.entries
select new GUID(entry.guid)).ToList();
BuiltInResourcesToDependenciesMap(builtInResourcesPaths);
CalculateInputDefinitions(settings);
var context = GetBuildContext(settings);
ReturnCode exitCode = RefreshBuild(context);
if (exitCode < ReturnCode.Success)
{
Debug.LogError("Analyze build failed. " + exitCode);
results.Add(new AnalyzeResult { resultName = ruleName + "Analyze build failed. " + exitCode });
return results;
}
IntersectResourcesDepedenciesWithBundleDependencies(GetAllBundleDependencies());
ConvertBundleNamesToGroupNames(context);
results = (from resource in m_ResourcesToDependencies.Keys
from dependency in m_ResourcesToDependencies[resource]
let assetPath = AssetDatabase.GUIDToAssetPath(dependency.ToString())
let files = m_ExtractData.WriteData.FileToObjects.Keys
from file in files
where m_ExtractData.WriteData.FileToObjects[file].Any(oid => oid.guid == dependency)
where m_ExtractData.WriteData.FileToBundle.ContainsKey(file)
let bundle = m_ExtractData.WriteData.FileToBundle[file]
select new AnalyzeResult
{
resultName =
resource + kDelimiter +
bundle + kDelimiter +
assetPath,
severity = MessageType.Warning
}).ToList();
if (results.Count == 0)
results.Add(new AnalyzeResult { resultName = ruleName + " - No issues found." });
return results;
}
protected string ConvertBundleName(string bundleName, string groupName)
{
string[] bundleNameSegments = bundleName.Split('_');
bundleNameSegments[0] = groupName.Replace(" ", "").ToLower();
return string.Join("_", bundleNameSegments);
}
public override void ClearAnalysis()
{
m_Locations.Clear();
m_AddressableAssets.Clear();
m_AssetEntries.Clear();
m_AllBundleInputDefs.Clear();
m_BundleToAssetGroup.Clear();
m_ResourcesToDependencies.Clear();
m_ExtractData = new ExtractDataTask();
base.ClearAnalysis();
}
}
}

11
Assets/Editor/MyBundleRuleBase.cs.meta


fileFormatVersion: 2
guid: f4dbaac7572a7ff4c97ee8df724baf53
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

31
Assets/InventorySystem.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InventorySystem : MonoBehaviour
{
public GameObject[] inventoryItems;
public Transform[] spawnPositions;
GameObject[] spawnedObjects;
void Start()
{
spawnedObjects = new GameObject[inventoryItems.Length];
}
public void SpawnItem(int itemNumber)
{
if (spawnedObjects[itemNumber] != null)
return;
spawnedObjects[itemNumber] = GameObject.Instantiate(inventoryItems[itemNumber], spawnPositions[itemNumber].position, spawnPositions[itemNumber].rotation);
}
public void DespawnItem(int itemNumber)
{
if (spawnedObjects[itemNumber] == null)
return;
Destroy(spawnedObjects[itemNumber]);
}
}

11
Assets/InventorySystem.cs.meta


fileFormatVersion: 2
guid: b082ef4ece4d3bf4989e0e498dc288ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

78
Assets/InventorySystemAddressable.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AddressableAssets;
public class InventorySystemAddressable : MonoBehaviour
{
public AssetReferenceGameObject[] inventoryItems;
public Transform[] spawnPositions;
Dictionary<int, List<GameObject>> spawnedObjects = new Dictionary<int, List<GameObject>>();
public void SpawnItem(int itemNumber)
{
Debug.Log("Spawning item " + itemNumber);
if (!spawnedObjects.ContainsKey(itemNumber))
{
spawnedObjects.Add(itemNumber, new List<GameObject>());
}
if (spawnedObjects[itemNumber].Count > 0)
{
Vector3 randomPos = new Vector3(Random.Range(-0.4f, 0.4f), Random.Range(-1.5f, 1.5f), 0);
StartCoroutine(WaitForSpawnComplete(Addressables.InstantiateAsync(inventoryItems[itemNumber], spawnPositions[itemNumber].position + randomPos, spawnPositions[itemNumber].rotation), itemNumber));
}
else
{
StartCoroutine(WaitForSpawnComplete(Addressables.InstantiateAsync(inventoryItems[itemNumber], spawnPositions[itemNumber].position, spawnPositions[itemNumber].rotation), itemNumber));
}
}