Merge branch 'develop' into feature/EP_normal_attack

This commit is contained in:
Tungdv
2025-10-22 17:15:07 +07:00
51 changed files with 1382 additions and 43 deletions
+14
View File
@@ -0,0 +1,14 @@
---
alwaysApply: true
---
When convert cpp to c#
- unsigned long convert to uint
- unsigned char to byte
- task_char to ushort
- Keeps all the naming
- keeps all the original chinese comments. But add a translated English version side by side
- struct has to be public
- struct has to be use [StructLayout(LayoutKind.Sequential, Pack = 1)]
- all field in struct has to be public
- array has to be use [MarshalAs(UnmanagedType.ByValArray, SizeConst = )] to fix the array size
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7d7e684e812854b7393956bf4c8f0486
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,17 @@
%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: dea69d41f90c6ea4fa55c27c1d60c145, type: 3}
m_Name: AddressableAssetGroupSortSettings
m_EditorClassIdentifier:
sortOrder:
- af2f31e34f6644749bdd552abb39cb07
- 712e3991f28e549e7a56ee582a977810
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 68f618775716f498d8a54cfd1754d53a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,117 @@
%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: 712e3991f28e549e7a56ee582a977810
m_currentHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_OptimizeCatalogSize: 0
m_BuildRemoteCatalog: 0
m_CatalogRequestsTimeout: 0
m_DisableCatalogUpdateOnStart: 0
m_InternalIdNamingMode: 0
m_InternalBundleIdMode: 1
m_AssetLoadMode: 0
m_BundledAssetProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.BundledAssetProvider
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_IgnoreUnsupportedFilesInBuild: 0
m_UniqueBundleIds: 0
m_EnableJsonCatalog: 0
m_NonRecursiveBuilding: 1
m_AllowNestedBundleFolders: 0
m_CCDEnabled: 0
m_maxConcurrentWebRequests: 3
m_UseUWRForLocalBundles: 0
m_BundleTimeout: 0
m_BundleRetryCount: 0
m_BundleRedirectLimit: -1
m_SharedBundleSettings: 0
m_SharedBundleSettingsCustomGroupIndex: 0
m_ContiguousBundles: 1
m_StripUnityVersionFromBundleBuild: 0
m_DisableVisibleSubAssetRepresentations: 0
m_BuiltInBundleNaming: 0
mBuiltInBundleCustomNaming:
m_MonoScriptBundleNaming: 0
m_CheckForContentUpdateRestrictionsOption: 0
m_MonoScriptBundleCustomNaming:
m_RemoteCatalogBuildPath:
m_Id:
m_RemoteCatalogLoadPath:
m_Id:
m_ContentStateBuildPathProfileVariableName:
m_CustomContentStateBuildPath:
m_ContentStateBuildPath:
m_BuildAddressablesWithPlayerBuild: 0
m_overridePlayerVersion: '[UnityEditor.PlayerSettings.bundleVersion]'
m_GroupAssets:
- {fileID: 11400000, guid: 86ad1216662b54841a182d663f54030d, type: 2}
- {fileID: 11400000, guid: 5c7374bc56a9447e88024b8d10f93d58, type: 2}
m_BuildSettings:
m_LogResourceManagerExceptions: 1
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
m_ProfileSettings:
m_Profiles:
- m_InheritedParent:
m_Id: 617cd374f19c94126a94e1084a222d2e
m_ProfileName: Default
m_Values:
- m_Id: 34adf6382ec474539b4e701c0e724177
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
- m_Id: 506465302ec864e8eb6eb8e0d2ee7b2c
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Id: 582fe8bc0f8094a09bdaed41f1c12713
m_Value: <undefined>
- m_Id: 71015b41342024feebebb329061472f1
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
- m_Id: d6597e59c6cc746899e8cdbac61cceec
m_Value: 'ServerData/[BuildTarget]'
m_ProfileEntryNames:
- m_Id: 34adf6382ec474539b4e701c0e724177
m_Name: BuildTarget
m_InlineUsage: 0
- m_Id: 506465302ec864e8eb6eb8e0d2ee7b2c
m_Name: Local.BuildPath
m_InlineUsage: 0
- m_Id: 582fe8bc0f8094a09bdaed41f1c12713
m_Name: Remote.LoadPath
m_InlineUsage: 0
- m_Id: 71015b41342024feebebb329061472f1
m_Name: Local.LoadPath
m_InlineUsage: 0
- m_Id: d6597e59c6cc746899e8cdbac61cceec
m_Name: Remote.BuildPath
m_InlineUsage: 0
m_ProfileVersion: 1
m_LabelTable:
m_LabelNames:
- default
- models
m_SchemaTemplates: []
m_GroupTemplateObjects:
- {fileID: 11400000, guid: 857a3a7598ede4ebd853a58e581a28d3, type: 2}
m_InitializationObjects: []
m_CertificateHandlerType:
m_AssemblyName:
m_ClassName:
m_ActivePlayerDataBuilderIndex: 2
m_DataBuilders:
- {fileID: 11400000, guid: 3857336a397c241e4ae6fe78eff7f4e9, type: 2}
- {fileID: 11400000, guid: 86992f834ece14f909047c1936d0da6d, type: 2}
- {fileID: 11400000, guid: 02d83f2622013403d98d08fb94f2dd2d, type: 2}
m_ActiveProfileId: 617cd374f19c94126a94e1084a222d2e
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 070edb522e6e54c14a99055900003890
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 97c6762c3a2e4484b93375df5dc4581c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9b784dd232f6c4e24b95ab83512c4835
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,79 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7550729973563355561
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_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 0
m_IncludeInBuild: 1
m_BundledAssetProviderType:
m_AssemblyName:
m_ClassName:
m_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
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_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 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: -7550729973563355561}
- {fileID: 6521969340658721883}
m_Description: Pack assets into asset bundles.
m_Settings: {fileID: 11400000, guid: 070edb522e6e54c14a99055900003890, type: 2}
--- !u!114 &6521969340658721883
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
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 857a3a7598ede4ebd853a58e581a28d3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 72a2c792220e448e598aa11687da3196
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,23 @@
%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: Default Local Group
m_EditorClassIdentifier:
m_GroupName: Default Local Group
m_GUID: 712e3991f28e549e7a56ee582a977810
m_SerializeEntries: []
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 070edb522e6e54c14a99055900003890, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: c5a05fc34950a4b54b235cdf64d5d3f4, type: 2}
- {fileID: 11400000, guid: fe6fda0c6cb5846abb15159ba5f2c3fb, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86ad1216662b54841a182d663f54030d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c71543d672ce64e2d8a93c17f87f28ff
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,48 @@
%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: Default Local Group_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 86ad1216662b54841a182d663f54030d, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 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_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 506465302ec864e8eb6eb8e0d2ee7b2c
m_LoadPath:
m_Id: 71015b41342024feebebb329061472f1
m_BundleMode: 0
m_AssetBundleProviderType:
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.AssetBundleProvider
m_UseDefaultSchemaSettings: 0
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c5a05fc34950a4b54b235cdf64d5d3f4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,16 @@
%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: Default Local Group_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 86ad1216662b54841a182d663f54030d, type: 2}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fe6fda0c6cb5846abb15159ba5f2c3fb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,48 @@
%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: Packed Assets_BundledAssetGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 5c7374bc56a9447e88024b8d10f93d58, type: 2}
m_InternalBundleIdMode: 1
m_Compression: 1
m_IncludeAddressInCatalog: 1
m_IncludeGUIDInCatalog: 1
m_IncludeLabelsInCatalog: 1
m_InternalIdNamingMode: 0
m_CacheClearBehavior: 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_StripDownloadOptions: 0
m_ForceUniqueProvider: 0
m_UseAssetBundleCache: 1
m_UseAssetBundleCrc: 1
m_UseAssetBundleCrcForCachedBundles: 1
m_UseUWRForLocalBundles: 0
m_Timeout: 0
m_ChunkedTransfer: 0
m_RedirectLimit: -1
m_RetryCount: 0
m_BuildPath:
m_Id: 506465302ec864e8eb6eb8e0d2ee7b2c
m_LoadPath:
m_Id: 71015b41342024feebebb329061472f1
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_UseDefaultSchemaSettings: 1
m_SelectedPathPairIndex: 0
m_BundleNaming: 0
m_AssetLoadMode: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dbf8c3b629de4458fa5ba751e1a7d2ca
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,16 @@
%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: models_ContentUpdateGroupSchema
m_EditorClassIdentifier:
m_Group: {fileID: 11400000, guid: 5c7374bc56a9447e88024b8d10f93d58, type: 2}
m_StaticContent: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2e4a904b2f4b94f368b560a39c88a27e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,215 @@
%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: models
m_EditorClassIdentifier:
m_GroupName: models
m_GUID: af2f31e34f6644749bdd552abb39cb07
m_SerializeEntries:
- m_GUID: 03e5dab5f51374e55904db72229b775e
m_Address: "models/npcs/npc/2014\u65B0\u79CD\u65CF\u9886\u8896/2014\u65B0\u79CD\u65CF\u9886\u8896/2014\u65B0\u79CD\u65CF\u9886\u8896.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 04e8f383637dd42a58a6a23c48c64eb5
m_Address: "models/npcs/npc/2014\u65B0\u624B\u6751\u8D27\u90CE/2014\u65B0\u624B\u6751\u8D27\u90CE/2014\u65B0\u624B\u6751\u8D27\u90CE.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 09a50785f77bc43369476f9ab93a9b3a
m_Address: "models/npcs/npc/2014\u65B0\u624B\u6751\u88C1\u7F1D/2014\u65B0\u624B\u6751\u88C1\u7F1D/2014\u65B0\u624B\u6751\u88C1\u7F1D.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 0fb08f2ce83384471ac95b41dc602ace
m_Address: "models/npcs/\u602A\u7269/2014/\u5251\u80CC\u72FC/\u5251\u80CC\u72FC/\u5251\u80CC\u72FC.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 12e232ba9bff147e3bc0cc208f8b78a0
m_Address: "models/npcs/\u602A\u7269/38\u9972\u517B\u517D/\u5154\u5E7C\u5E74/\u5154\u5E7C\u5E74/\u5154\u5E7C\u5E74.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 19ef711ad91474765a847a631f5da9ca
m_Address: "models/npcs/npc/2014\u65B0\u79CD\u65CF\u5DE7\u5320/2014\u65B0\u79CD\u65CF\u5DE7\u5320/2014\u65B0\u79CD\u65CF\u5DE7\u5320.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 28a9794edd04941a6ba1ab1a6e87bbd4
m_Address: "models/npcs/npc/2011\u5723\u7075\u4F7F\u8005/\u5723\u7075\u4F7F\u8005/\u5723\u7075\u4F7F\u8005.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 39e34e0b093c74c65a24bcfa1a655c51
m_Address: "models/npcs/npc/2014\u65B0\u624B\u6751\u5546\u57CE\u7BA1\u7406\u5458\u84DD\u8272/2014\u65B0\u624B\u6751\u5546\u57CE\u7BA1\u7406\u5458\u84DD\u8272/2014\u65B0\u624B\u6751\u5546\u57CE\u7BA1\u7406\u5458\u84DD\u8272.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 3e3944509a65042eb8a31cfb74a0edf5
m_Address: "models/\u573A\u666F\u6D3B\u7269/2017\u79FB\u52A8\u6807\u9776\u8725\u8734/2017\u79FB\u52A8\u6807\u9776\u8725\u8734/2017\u79FB\u52A8\u6807\u9776\u8725\u8734.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 46453b542df6540ae817c89b1dfff21e
m_Address: "models/npcs/npc/\u7075\u65CF\u5973\u738B/\u7075\u65CF\u5973\u738B/\u7075\u65CF\u5973\u738B.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 47002ca46d55c4938b9315f763d1d66c
m_Address: "models/npcs/npc/npc\u4ED9\u5973/npc\u4ED9\u5973/npc\u7FBD\u7075.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 4dcc3634bebc24bebb88a7ba3e23753c
m_Address: "models/npcs/npc/2014\u62FF\u6247\u5B50\u7684\u4EBA/2014\u62FF\u6247\u5B50\u7684\u4EBA/2014\u62FF\u6247\u5B50\u7684\u4EBA.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 576e84b3fd877477eb7f0a424f30d5df
m_Address: "models/\u573A\u666F\u6D3B\u7269/\u51E4\u7FBD\u9E7F/\u96C4\u6027\u51E4\u7FBD\u9E7F/\u96CC\u6027\u51E4\u7FBD\u9E7F.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 5e76cb69b081a4673a5816fd9da89533
m_Address: "models/\u573A\u666F\u6D3B\u7269/\u4E09\u4E2A\u8774\u8776/\u4E09\u4E2A\u8774\u8776/\u4E09\u4E2A\u8774\u8776.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 62555210fd2944f329f43aa25b44d2c4
m_Address: "models/npcs/npc/2014\u94B1\u5E84\u8001\u677F/2014\u94B1\u5E84\u8001\u677F/2014\u94B1\u5E84\u8001\u677F.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 64b5a0083181a4d30911efb9c3059678
m_Address: "models/npcs/npc/2011\u725B\u9996\u5996\u738B/\u725B\u9996\u5996\u738B/\u725B\u9996\u5996\u738B.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 6858c050d424a416a9a6aed20d93a150
m_Address: "models/npcs/\u602A\u7269/18\u72FC/\u7CBE\u7075\u72FC/a\u8EAB\u9AD8/\u7CBE\u7075\u72FC/\u8352\u539F\u7CBE\u7075\u72FC.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 6be116f35d3d446c7b8d3d61ca617690
m_Address: "models/npcs/npc/2014npc\u94C1\u5320/2014npc\u94C1\u5320/2014npc\u94C1\u5320.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 70f8fa699f9ed4f88b1c335f2ccbb198
m_Address: "models/npcs/npc/2011\u6C34\u884C\u8005/\u6C34\u884C\u8005/\u6C34\u884C\u8005.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7cc56a2fa301a46db92681b17c10d6b0
m_Address: "models/npcs/npc/2014\u5439\u7B1B\u5B50\u7684\u4EBA\u7EA2\u8272/2014\u5439\u7B1B\u5B50\u7684\u4EBA\u7EA2\u8272/\u5439\u7B1B\u5B50\u7684\u4EBA\u7EA2\u8272\u8774\u8776.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 7daa10b47beb04798927c05cc7148951
m_Address: "models/\u573A\u666F\u6D3B\u7269/\u677E\u9F20/\u7EA2\u8272\u677E\u9F20/\u7EFF\u8272\u677E\u9F20.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 91928ba4c1a3643b98bfadeb477ec8af
m_Address: "models/\u573A\u666F\u52A8\u753B\u6A21\u578B/\u65B0\u624B\u6751\u80E7\u65CF\u5EFA\u7B51/\u65B0\u624B\u6751\u80E7\u65CF\u5EFA\u7B51.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a32fc20843e62442ab1494d8a8e48794
m_Address: "models/npcs/npc/2014\u65B0\u624B\u6751\u4F20\u9001\u5E08/2014\u65B0\u624B\u6751\u4F20\u9001\u5E08/2014\u65B0\u624B\u6751\u4F20\u9001\u5E08.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: a5922b6b6f63f46e7b047300c07948fa
m_Address: "models/npcs/\u602A\u7269/2014/\u5C0F\u661F\u661F/\u5C0F\u661F\u661F/\u5C0F\u661F\u661F.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: b058f8968d5aa4a8f9285fa891b7b9ba
m_Address: "models/npcs/npc/\u5973npc14/\u5973npc14/\u5973npc14.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: b2aa264cdbd9d4fb18f8df100175f4c3
m_Address: "models/npcs/npc/\u7537npc21/\u7537npc21/\u7537npc21.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: bc0279413de8f43fb899a8761a22f4f3
m_Address: "models/npcs/npc/2014\u6559\u4E66\u5148\u751F/2014\u6559\u4E66\u5148\u751F/2014\u6559\u4E66\u5148\u751F.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: c9c25f71f361f43f1aa0510d4f96312d
m_Address: "models/\u573A\u666F\u6D3B\u7269/\u957F\u7FCE\u8D64\u7FBD\u9E1F/\u957F\u7FCE\u8D64\u7FBD\u9E1F/\u957F\u7FCE\u8D64\u7FBD\u9E1F.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d14e87db729e843a4b31c7b1065ab677
m_Address: "models/npcs/npc/2014\u90AE\u7BB1/2014\u90AE\u7BB1/2014\u90AE\u7BB1.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: d865ad4bc902a4a299da74aaba68e9eb
m_Address: "models/npcs/npc/2014\u836F\u5E08/2014\u836F\u5E08/2014\u836F\u5E08.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: ed84be8c5044746ca895fb75aca9bc66
m_Address: "models/npcs/npc/2014\u65B0\u624B\u6751\u5BFB\u5B9D\u4E13\u5458/2014\u65B0\u624B\u6751\u5BFB\u5B9D\u4E13\u5458/2014\u65B0\u624B\u6751\u5BFB\u5B9D\u4E13\u5458.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: fd4b330a3588f40a18d44e22798e3ddc
m_Address: "models/npcs/npc/\u9B45\u7075\u9996\u9886/\u9B45\u7075\u9996\u9886/\u9B45\u7075\u9996\u9886.ecm"
m_ReadOnly: 0
m_SerializedLabels:
- models
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 070edb522e6e54c14a99055900003890, type: 2}
m_SchemaSet:
m_Schemas:
- {fileID: 11400000, guid: dbf8c3b629de4458fa5ba751e1a7d2ca, type: 2}
- {fileID: 11400000, guid: 2e4a904b2f4b94f368b560a39c88a27e, type: 2}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5c7374bc56a9447e88024b8d10f93d58
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 104537991a353416c95bab1fac15da61
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%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
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3857336a397c241e4ae6fe78eff7f4e9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%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
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02d83f2622013403d98d08fb94f2dd2d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,20 @@
%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
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86992f834ece14f909047c1936d0da6d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,15 @@
%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: 070edb522e6e54c14a99055900003890
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 224e456928aaa4603b0c4a9ec48ee013
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,28 @@
%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: 7e3976da977cb49238499ea3b4c237ae, type: 3}
m_Name: ProfileDataSourceSettings
m_EditorClassIdentifier:
profileGroupTypes:
- m_GroupTypePrefix: Built-In
m_Variables:
- m_Suffix: BuildPath
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
- m_Suffix: LoadPath
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
environments: []
currentEnvironment:
id:
projectId:
projectGenesisId:
name:
isDefault: 0
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b2c8c6768dfb44ab1b084ce5f7d23bc6
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
@@ -543,6 +543,56 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &764685605
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 764685607}
- component: {fileID: 764685606}
m_Layer: 0
m_Name: Addressable
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &764685606
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 764685605}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e855af6acaff54a44988808bf9cfdeb0, type: 3}
m_Name:
m_EditorClassIdentifier:
assetLabelReference:
m_AssetGUID: 03e5dab5f51374e55904db72229b775e
m_SubObjectName:
m_SubObjectType:
m_SubObjectGUID:
m_EditorAssetChanged: 0
--- !u!4 &764685607
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 764685605}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &778320213
GameObject:
m_ObjectHideFlags: 0
@@ -1993,3 +2043,4 @@ SceneRoots:
m_Roots:
- {fileID: 1873075676}
- {fileID: 678266405}
- {fileID: 764685607}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c8ed4910a09a841858ab5f2ceefa9b18
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,29 @@
using UnityEngine;
namespace PerfectWorld.Addressable
{
/// <summary>
/// Configuration for the Addressable system
/// </summary>
public static class AddressableConfig
{
// CDN base URL for downloading bundles
public const string CDN_BASE_URL = "https://your-cdn.com/bundles/";
// Maximum retry attempts for failed downloads
public const int MAX_RETRIES = 3;
// Delay between retry attempts in seconds
public const float RETRY_DELAY = 2f;
// Download timeout in seconds
public const int DOWNLOAD_TIMEOUT = 30;
// Cache location for downloaded bundles
public static string CachePath => Application.persistentDataPath + "/AddressableBundles";
// Catalog file name
public const string CATALOG_FILENAME = "catalog.json";
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 16c9f694f557b4df8ac49b611b67c6a2
@@ -0,0 +1,80 @@
using System;
namespace PerfectWorld.Addressable
{
/// <summary>
/// Download progress information
/// </summary>
public struct DownloadProgress
{
// Bytes downloaded so far
public long BytesDownloaded;
// Total bytes to download
public long TotalBytes;
// Download percentage (0-100)
public float Percentage;
// Currently downloading file
public string CurrentFile;
// Current state description
public string Status;
}
/// <summary>
/// Events for addressable system
/// </summary>
public static class AddressableEvents
{
// Fired when download starts
public static event Action OnDownloadStarted;
// Fired when download progresses
public static event Action<DownloadProgress> OnDownloadProgress;
// Fired when download completes successfully
public static event Action OnDownloadCompleted;
// Fired when download fails
public static event Action<string> OnDownloadFailed;
// Fired when an asset is loaded successfully
public static event Action<string> OnAssetLoaded;
// Fired when an asset fails to load
public static event Action<string, string> OnAssetLoadFailed;
internal static void InvokeDownloadStarted()
{
OnDownloadStarted?.Invoke();
}
internal static void InvokeDownloadProgress(DownloadProgress progress)
{
OnDownloadProgress?.Invoke(progress);
}
internal static void InvokeDownloadCompleted()
{
OnDownloadCompleted?.Invoke();
}
internal static void InvokeDownloadFailed(string error)
{
OnDownloadFailed?.Invoke(error);
}
internal static void InvokeAssetLoaded(string address)
{
OnAssetLoaded?.Invoke(address);
}
internal static void InvokeAssetLoadFailed(string address, string error)
{
OnAssetLoadFailed?.Invoke(address, error);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: c9412e3f036904470beb52510bbd7f20
@@ -0,0 +1,64 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.AddressableAssets.ResourceLocators;
using UnityEngine.ResourceManagement.AsyncOperations;
using UnityEngine.ResourceManagement.ResourceLocations;
namespace BrewMonster.Scripts
{
public class AddressableManager : MonoSingleton<AddressableManager>
{
private bool _isInitialized = false;
private Dictionary<string, AsyncOperationHandle<GameObject>> _loadedAssets = new();
protected override void Initialize()
{
base.Initialize();
_isInitialized = false;
Addressables.InitializeAsync().Completed += OnInitializeComplete;
}
void OnInitializeComplete(AsyncOperationHandle<IResourceLocator> handle)
{
if (handle.Status == AsyncOperationStatus.Succeeded)
{
_isInitialized = true;
BMLogger.Log($"AddressableManager: Initialized");
}
else
{
// print out the error
BMLogger.LogError($"AddressableManager: Failed to initialize: {handle.OperationException?.Message} {handle.OperationException?.StackTrace}");
}
}
/// <summary>
/// Load an asset asynchronously. The address should look like this: "models/npcs/npc/魅灵首领/魅灵首领/魅灵首领.prefab"
/// </summary>
/// <returns></returns>
public async Task<GameObject> LoadPrefabAsync(string assetPath)
{
if (_loadedAssets.ContainsKey(assetPath))
{
return _loadedAssets[assetPath].Result;
}
var handle = Addressables.LoadAssetAsync<GameObject>(assetPath);
await handle.Task;
_loadedAssets[assetPath] = handle;
return handle.Result;
}
/// <summary>
/// When the asset is no longer needed, call this method to unload it.
/// </summary>
/// <param name="assetPath"></param>
public void UnloadAsset(string assetPath)
{
Addressables.Release(assetPath);
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: e855af6acaff54a44988808bf9cfdeb0
@@ -68,27 +68,27 @@ public class CinemachineTouchOrbit : MonoSingleton<CinemachineTouchOrbit>
return Vector2.zero;
#else
// Mobile: xử lý touch tương tự code bạn đã có
foreach (Touch t in Input.touches)
{
if (t.phase == TouchPhase.Began)
{
lastPointerPos = t.position;
isDragging = true;
}
else if (t.phase == TouchPhase.Moved && isDragging)
{
Vector2 cur = t.position;
Vector2 delta = cur - lastPointerPos;
lastPointerPos = cur;
if (RectTransformUtility.RectangleContainsScreenPoint(joystickArea, cur))
return Vector2.zero;
return delta;
}
else if (t.phase == TouchPhase.Ended || t.phase == TouchPhase.Canceled)
{
isDragging = false;
}
}
// foreach (Touch t in Input.touches)
// {
// if (t.phase == TouchPhase.Began)
// {
// lastPointerPos = t.position;
// isDragging = true;
// }
// else if (t.phase == TouchPhase.Moved && isDragging)
// {
// Vector2 cur = t.position;
// Vector2 delta = cur - lastPointerPos;
// lastPointerPos = cur;
// if (RectTransformUtility.RectangleContainsScreenPoint(joystickArea, cur))
// return Vector2.zero;
// return delta;
// }
// else if (t.phase == TouchPhase.Ended || t.phase == TouchPhase.Canceled)
// {
// isDragging = false;
// }
// }
return Vector2.zero;
#endif
}
@@ -1,10 +1,3 @@
using System;
using Unity.VisualScripting;
using UnityEditor.ShaderGraph.Internal;
using UnityEngine;
using UnityEngine.UIElements;
using static CECNPC;
public class CECModel
{
private const uint COMACT_FLAG_MODE_NONE = 0;
+13 -14
View File
@@ -1,25 +1,24 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using BrewMonster;
#endif
#if UNITY_EDITOR
using Animancer; // Bo đm bn có Animancer package
using Animancer; // B?o đ?m b?n có Animancer package
#endif
public class NPCBuilder : MonoSingleton<NPCBuilder>
{
[Header("📦 Danh sách prefab NPC đưc quét t động")]
[Header("📦 Danh sách prefab NPC đư?c quét t? động")]
[SerializeField] private List<GameObject> modelNPCList = new List<GameObject>();
#if UNITY_EDITOR
[Header("📁 Kéo thư mc chứa Prefab NPC vào đây")]
[Header("📁 Kéo thư m?c chứa Prefab NPC vào đây")]
[SerializeField] private DefaultAsset npcFolder;
#endif
@@ -29,7 +28,7 @@ public class NPCBuilder : MonoSingleton<NPCBuilder>
{
if (modelNPCList == null || modelNPCList.Count == 0)
{
Debug.LogError("[NPCBuilder] modelNPCList rỗng hãy quét li prefab! " + transform.gameObject.name);
Debug.LogError("[NPCBuilder] modelNPCList rỗng ? hãy quét l?i prefab! " + transform.gameObject.name);
}
modelNPCDic = modelNPCList
@@ -48,21 +47,21 @@ public class NPCBuilder : MonoSingleton<NPCBuilder>
// --------------------------
// 📌 ContextMenu 1: Quét Prefab
// --------------------------
[ContextMenu("🔄 Quét Prefab trong thư mc")]
[ContextMenu("🔄 Quét Prefab trong thư m?c")]
private void ScanPrefabsInFolder()
{
modelNPCList.Clear();
if (npcFolder == null)
{
Debug.LogWarning("[NPCBuilder] Vui lòng kéo thư mc Prefab NPC vào trường npcFolder.");
Debug.LogWarning("[NPCBuilder] Vui lòng kéo thư m?c Prefab NPC vào trường npcFolder.");
return;
}
string folderPath = AssetDatabase.GetAssetPath(npcFolder);
if (!AssetDatabase.IsValidFolder(folderPath))
{
Debug.LogWarning("[NPCBuilder] Thư mc không hp l.");
Debug.LogWarning("[NPCBuilder] Thư m?c không h?p l?.");
return;
}
@@ -84,13 +83,13 @@ public class NPCBuilder : MonoSingleton<NPCBuilder>
EditorUtility.SetDirty(this);
AssetDatabase.SaveAssets();
Debug.Log($"[NPCBuilder] Đã quét {modelNPCList.Count} prefab t {folderPath}");
Debug.Log($"[NPCBuilder] ? Đã quét {modelNPCList.Count} prefab t? {folderPath}");
}
// --------------------------
// 📌 ContextMenu 2: Thêm NamedAnimancerComponent & Animation Clip
// --------------------------
[ContextMenu("🎬 Đm bo Prefab có NamedAnimancerComponent và Add Animations")]
[ContextMenu("🎬 Đ?m b?o Prefab có NamedAnimancerComponent và Add Animations")]
private void EnsureNamedAnimancerAndAddAnimations()
{
int processed = 0;
@@ -113,7 +112,7 @@ public class NPCBuilder : MonoSingleton<NPCBuilder>
addedComponent++;
}
// 🔹 Clear list hiện ti (tránh duplicate)
// 🔹 Clear list hiện t?i (tránh duplicate)
if (animancer.Animations != null)
animancer.Animations = null;
@@ -135,14 +134,14 @@ public class NPCBuilder : MonoSingleton<NPCBuilder>
Debug.LogWarning($"[NPCBuilder] ⚠️ Prefab {prefab.name} không có Animator hoặc Controller!");
}
// Ghi đè li prefab
// Ghi đè l?i prefab
PrefabUtility.SaveAsPrefabAsset(prefabRoot, path);
PrefabUtility.UnloadPrefabContents(prefabRoot);
processed++;
}
AssetDatabase.SaveAssets();
Debug.Log($"[NPCBuilder] Đã x lý {processed} prefab. Thêm mới {addedComponent} component, tổng {totalClips} clip animation đưc ghi li.");
Debug.Log($"[NPCBuilder] ? Đã x? lý {processed} prefab. Thêm mới {addedComponent} component, tổng {totalClips} clip animation đư?c ghi l?i.");
}
#endif
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d0c06c588e2a6442488a3542551fb243
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,227 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
namespace BrewMonster
{
public static class AddressableTools
{
private static string _modelPathPrefixToRemove = "Assets/ModelRenderer/Art/Models";
[MenuItem("Tools/Addressable/Get All Asset Name")]
public static void GetAllAssetName()
{
AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null)
{
Debug.LogWarning("Addressable settings not found.");
return;
}
var groupNameToEntries = new Dictionary<string, List<AddressableAssetEntry>>();
foreach (var group in settings.groups)
{
if (group == null) continue;
var entries = group.entries; // available in most Addressables versions
if (entries == null) continue;
string groupName = group.Name;
if (!groupNameToEntries.TryGetValue(groupName, out var list))
{
list = new List<AddressableAssetEntry>();
groupNameToEntries[groupName] = list;
}
foreach (var entry in entries)
{
if (entry == null) continue;
list.Add(entry);
}
}
var sb = new StringBuilder();
int totalCount = 0;
foreach (var kvp in groupNameToEntries.OrderBy(k => k.Key))
{
sb.AppendLine($"[Group] {kvp.Key} ({kvp.Value.Count})");
foreach (var e in kvp.Value.OrderBy(e => e.address))
{
sb.AppendLine($"- {e.address}");
}
sb.AppendLine();
totalCount += kvp.Value.Count;
}
if (totalCount == 0)
{
sb.Append("No addressable assets found.");
}
Debug.Log(sb.ToString());
EditorUtility.DisplayDialog("Get All Asset Name", $"Printed {totalCount} addressable assets to Console.", "OK");
}
[MenuItem("Tools/Addressable/Remove Prefix")]
public static void RemovePrefixFromAddresses()
{
AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null)
{
Debug.LogWarning("Addressable settings not found.");
return;
}
int updatedCount = 0;
foreach (var group in settings.groups)
{
if (group == null) continue;
var entries = group.entries;
if (entries == null) continue;
foreach (var entry in entries)
{
if (entry == null) continue;
var address = entry.address;
if (string.IsNullOrEmpty(address)) continue;
string newAddress = address;
// Remove prefix if present
if (newAddress.StartsWith(_modelPathPrefixToRemove))
{
newAddress = newAddress.Substring(_modelPathPrefixToRemove.Length);
if (newAddress.StartsWith("/")) newAddress = newAddress.Substring(1);
}
// Change suffix from .prefab to .ecm if applicable
if (newAddress.EndsWith(".prefab"))
{
newAddress = newAddress.Substring(0, newAddress.Length - ".prefab".Length) + ".ecm";
}
if (newAddress != address)
{
entry.SetAddress(newAddress);
updatedCount++;
}
}
}
if (updatedCount > 0)
{
EditorUtility.SetDirty(settings);
AssetDatabase.SaveAssets();
}
Debug.Log($"Remove Prefix: Updated {updatedCount} entries.");
EditorUtility.DisplayDialog("Remove Prefix", $"Updated {updatedCount} entries.", "OK");
}
/// <summary>
/// Sets the address of all addressable assets to match their asset path (relative to Assets folder)
/// This allows you to load assets using their file path as the key
/// </summary>
[MenuItem("Tools/Addressable/Set Address To Asset Path")]
public static void SetAddressToAssetPath()
{
AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null)
{
Debug.LogWarning("Addressable settings not found.");
return;
}
int updatedCount = 0;
var sb = new StringBuilder();
sb.AppendLine("Setting addresses to asset paths:");
sb.AppendLine();
foreach (var group in settings.groups)
{
if (group == null) continue;
var entries = group.entries;
if (entries == null) continue;
foreach (var entry in entries)
{
if (entry == null) continue;
// Get the asset path (e.g., "Assets/ModelRenderer/Art/Models/...")
string assetPath = entry.AssetPath;
if (string.IsNullOrEmpty(assetPath)) continue;
// Remove "Assets/" prefix to get a cleaner path
string newAddress = assetPath;
if (newAddress.StartsWith("Assets/"))
{
newAddress = newAddress.Substring("Assets/".Length);
}
// Only update if the address is different
if (newAddress != entry.address)
{
string oldAddress = entry.address;
entry.SetAddress(newAddress);
sb.AppendLine($"[{group.Name}] {oldAddress} ¡ú {newAddress}");
updatedCount++;
}
}
}
if (updatedCount > 0)
{
settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, null, true);
AssetDatabase.SaveAssets();
}
sb.AppendLine();
sb.AppendLine($"Updated {updatedCount} entries.");
Debug.Log(sb.ToString());
EditorUtility.DisplayDialog("Set Address To Asset Path", $"Updated {updatedCount} entries to use their asset paths.", "OK");
}
/// <summary>
/// Prints the address and GUID for all addressable assets - useful for debugging
/// </summary>
[MenuItem("Tools/Addressable/Print Address and GUID")]
public static void PrintAddressAndGUID()
{
AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings;
if (settings == null)
{
Debug.LogWarning("Addressable settings not found.");
return;
}
var sb = new StringBuilder();
sb.AppendLine("Addressable Assets (Address ¡ú GUID ¡ú Path):");
sb.AppendLine();
int totalCount = 0;
foreach (var group in settings.groups)
{
if (group == null) continue;
var entries = group.entries;
if (entries == null) continue;
sb.AppendLine($"[Group: {group.Name}]");
foreach (var entry in entries)
{
if (entry == null) continue;
sb.AppendLine($" Address: {entry.address}");
sb.AppendLine($" GUID: {entry.guid}");
sb.AppendLine($" Path: {entry.AssetPath}");
sb.AppendLine();
totalCount++;
}
}
sb.AppendLine($"Total: {totalCount} addressable assets");
Debug.Log(sb.ToString());
EditorUtility.DisplayDialog("Print Address and GUID", $"Printed {totalCount} addressable assets to Console.", "OK");
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1921e950306294fb687b2d389794b235
+4 -1
View File
@@ -34,7 +34,10 @@ GraphicsSettings:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
- {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
- {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3}
m_PreloadedShaders:
- {fileID: 0}
m_PreloadShadersBatchTimeLimit: -1
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_CustomRenderPipeline: {fileID: 11400000, guid: 4b83569d67af61e458304325a23e5dfd, type: 2}
@@ -0,0 +1,14 @@
{
"useBuildCacheServer": false,
"cacheServerHost": "",
"cacheServerPort": 8126,
"threadedArchiving": true,
"logCacheMiss": false,
"logAssetWarnings": true,
"slimWriteResults": true,
"maximumCacheSize": 20,
"useDetailedBuildLog": false,
"useV2Hasher": true,
"fileIDHashSeed": 0,
"prefabPackedHeaderSize": 2
}