diff --git a/Assets/AI/Spider_Base_Model_AI Variant RootMotion.prefab b/Assets/AI/Spider_Base_Model_AI Variant RootMotion.prefab index b0a2e871f..d01b56473 100644 --- a/Assets/AI/Spider_Base_Model_AI Variant RootMotion.prefab +++ b/Assets/AI/Spider_Base_Model_AI Variant RootMotion.prefab @@ -676,7 +676,7 @@ PrefabInstance: - target: {fileID: 8403356871782257122, guid: 3545b719df392a940ac2b114c933a71f, type: 3} propertyPath: selectedToolbar - value: 0 + value: 13 objectReference: {fileID: 0} - target: {fileID: 8403356871782257122, guid: 3545b719df392a940ac2b114c933a71f, type: 3} diff --git a/Assets/AddressableAssetsData.meta b/Assets/AddressableAssetsData.meta new file mode 100644 index 000000000..179108a5c --- /dev/null +++ b/Assets/AddressableAssetsData.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 03ecb50e7633d4b89b994e6e04a4eecd +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset new file mode 100644 index 000000000..67d3ae8e3 --- /dev/null +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -0,0 +1,121 @@ +%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: bc074d00982114f0388e9c98de91d44f + m_currentHash: + serializedVersion: 2 + Hash: ef672e941747c2eb6b19db828d740a6a + 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_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: 7ef33753e4c4e4564a0583bf3167c670, type: 2} + - {fileID: 11400000, guid: 3cf89f5225a9d478f814d47a38fc50ff, type: 2} + - {fileID: 11400000, guid: 781e582296993477f969a4a24651a786, type: 2} + - {fileID: 11400000, guid: e818f59e2e6f24728875459ab4d000a4, type: 2} + - {fileID: 11400000, guid: a0c0ca58d2104406a9d512fc398f2136, type: 2} + m_BuildSettings: + m_LogResourceManagerExceptions: 1 + m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles + m_ProfileSettings: + m_Profiles: + - m_InheritedParent: + m_Id: 80435394ae9034c0eb095d4efa81ce21 + m_ProfileName: Default + m_Values: + - m_Id: 07b02db6522aa4f6e92688ce94abe795 + m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]' + - m_Id: 81b451f2f1d5c437fbddc94eaf089f0e + m_Value: + - m_Id: b17f43ab650544e5f838e166f52ee4ca + m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]' + - m_Id: b58148b93af1a4c62babd223bbf6dd5f + m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]' + - m_Id: c1784c571d0744e06ada979b0e8d57aa + m_Value: 'ServerData/[BuildTarget]' + m_ProfileEntryNames: + - m_Id: 07b02db6522aa4f6e92688ce94abe795 + m_Name: BuildTarget + m_InlineUsage: 0 + - m_Id: 81b451f2f1d5c437fbddc94eaf089f0e + m_Name: Remote.LoadPath + m_InlineUsage: 0 + - m_Id: b17f43ab650544e5f838e166f52ee4ca + m_Name: Local.BuildPath + m_InlineUsage: 0 + - m_Id: b58148b93af1a4c62babd223bbf6dd5f + m_Name: Local.LoadPath + m_InlineUsage: 0 + - m_Id: c1784c571d0744e06ada979b0e8d57aa + m_Name: Remote.BuildPath + m_InlineUsage: 0 + m_ProfileVersion: 1 + m_LabelTable: + m_LabelNames: + - default + - Locale + - Locale-en + - Locale-pl + m_SchemaTemplates: [] + m_GroupTemplateObjects: + - {fileID: 11400000, guid: bbb5b49fb966c4e08b9f1708b581eb3e, type: 2} + m_InitializationObjects: [] + m_CertificateHandlerType: + m_AssemblyName: + m_ClassName: + m_ActivePlayerDataBuilderIndex: 2 + m_DataBuilders: + - {fileID: 11400000, guid: b9b631a28ae8c4de8a8cdb37376c1c66, type: 2} + - {fileID: 11400000, guid: 5632a9856ff034c10afcf3a1d908c5fc, type: 2} + - {fileID: 11400000, guid: 138279c83100e4b3c8dfcf3217252b41, type: 2} + m_ActiveProfileId: 80435394ae9034c0eb095d4efa81ce21 diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta b/Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta new file mode 100644 index 000000000..bab4b56e0 --- /dev/null +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b76b3bc583a8544debd5b527f9c8a9bd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroupTemplates.meta b/Assets/AddressableAssetsData/AssetGroupTemplates.meta new file mode 100644 index 000000000..3a7151f1f --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroupTemplates.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ae816e1220fc430899e6d5f948119f7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset new file mode 100644 index 000000000..1d138dfea --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset @@ -0,0 +1,78 @@ +%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: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3} + m_Name: Packed Assets + m_EditorClassIdentifier: + m_SchemaObjects: + - {fileID: 8027493076881183735} + - {fileID: 9099855026501449962} + m_Description: Pack assets into asset bundles. + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} +--- !u!114 &8027493076881183735 +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_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 &9099855026501449962 +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 diff --git a/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta new file mode 100644 index 000000000..03ea1a8bd --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroupTemplates/Packed Assets.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbb5b49fb966c4e08b9f1708b581eb3e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups.meta b/Assets/AddressableAssetsData/AssetGroups.meta new file mode 100644 index 000000000..f7d6a69d3 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 52374a24ec01b4df4a104fad750c6eaa +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset new file mode 100644 index 000000000..5b2bbf39c --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset @@ -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: bc074d00982114f0388e9c98de91d44f + m_SerializeEntries: [] + m_ReadOnly: 0 + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: ac6cc16dfe9d340f5bcdc68cfef93cfd, type: 2} + - {fileID: 11400000, guid: 662a00e7b05f44473b7848e1e009df50, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta new file mode 100644 index 000000000..05c7f08c3 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Default Local Group.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 781e582296993477f969a4a24651a786 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset b/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset new file mode 100644 index 000000000..51dbf478c --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset @@ -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: bbb281ee3bf0b054c82ac2347e9e782c, type: 3} + m_Name: Localization-Assets-Shared + m_EditorClassIdentifier: + m_GroupName: Localization-Assets-Shared + m_GUID: 91447390d3a224be8ad27940d4597ae1 + m_SerializeEntries: + - m_GUID: 73bb75577707d4557a4a4f33efb13fe2 + m_Address: Assets/Localization/Main Shared Data.asset + m_ReadOnly: 1 + m_SerializedLabels: [] + FlaggedDuringContentUpdateRestriction: 0 + m_ReadOnly: 1 + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: 037591fb085b2484f8a5179d0cfc7cdd, type: 2} + - {fileID: 11400000, guid: 6dce7518615824cdcbf7866302f7a513, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset.meta new file mode 100644 index 000000000..e12d663d5 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-Assets-Shared.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7ef33753e4c4e4564a0583bf3167c670 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset b/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset new file mode 100644 index 000000000..dd5a303b3 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset @@ -0,0 +1,35 @@ +%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: Localization-Locales + m_EditorClassIdentifier: + m_GroupName: Localization-Locales + m_GUID: cfad98b59f2da43eb90a1d943dde70b6 + m_SerializeEntries: + - m_GUID: b687dde66161f4d73b8b46022e35e6e1 + m_Address: English (en) + m_ReadOnly: 1 + m_SerializedLabels: + - Locale + FlaggedDuringContentUpdateRestriction: 0 + - m_GUID: bbdbfcab0c5ea47c99da0cf84cb6eb76 + m_Address: Polish (pl) + m_ReadOnly: 1 + m_SerializedLabels: + - Locale + FlaggedDuringContentUpdateRestriction: 0 + m_ReadOnly: 1 + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: c14b24e087b6f49eab90109bf6499f01, type: 2} + - {fileID: 11400000, guid: c9ddc2a99fb564942b4df1d681e3ce65, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset.meta new file mode 100644 index 000000000..0e55cbb0c --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-Locales.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e818f59e2e6f24728875459ab4d000a4 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset new file mode 100644 index 000000000..6aa380349 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset @@ -0,0 +1,29 @@ +%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: Localization-String-Tables-English (en) + m_EditorClassIdentifier: + m_GroupName: Localization-String-Tables-English (en) + m_GUID: afdd3c3a72b124c62971b5bca13bbe71 + m_SerializeEntries: + - m_GUID: 28f5875ddb2c34dce9e4c206c394ab3f + m_Address: Main_en + m_ReadOnly: 1 + m_SerializedLabels: + - Locale-en + FlaggedDuringContentUpdateRestriction: 0 + m_ReadOnly: 1 + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: b3b0164465e474032b4b8fa5483e949e, type: 2} + - {fileID: 11400000, guid: 3f127b1297bff402eba2c035999d3a88, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset.meta b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset.meta new file mode 100644 index 000000000..ab57a2ea6 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-English (en).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3cf89f5225a9d478f814d47a38fc50ff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset new file mode 100644 index 000000000..e616961f1 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset @@ -0,0 +1,29 @@ +%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: Localization-String-Tables-Polish (pl) + m_EditorClassIdentifier: + m_GroupName: Localization-String-Tables-Polish (pl) + m_GUID: ffa429d67982d4a168b51480dbf3df98 + m_SerializeEntries: + - m_GUID: 1cadffdfb0ea14656b889a8a0349440d + m_Address: Main_pl + m_ReadOnly: 1 + m_SerializedLabels: + - Locale-pl + FlaggedDuringContentUpdateRestriction: 0 + m_ReadOnly: 1 + m_Settings: {fileID: 11400000, guid: b76b3bc583a8544debd5b527f9c8a9bd, type: 2} + m_SchemaSet: + m_Schemas: + - {fileID: 11400000, guid: 27b3b4851831f4b8eb7d7eb3164be7ff, type: 2} + - {fileID: 11400000, guid: 78e0ca64d661b48148c99468604e7403, type: 2} diff --git a/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset.meta b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset.meta new file mode 100644 index 000000000..9bc559663 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Localization-String-Tables-Polish (pl).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a0c0ca58d2104406a9d512fc398f2136 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas.meta new file mode 100644 index 000000000..9a5404883 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6b13bd59bd25945eab62c39f3eec8432 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset new file mode 100644 index 000000000..47013c689 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%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: 781e582296993477f969a4a24651a786, 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_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: b17f43ab650544e5f838e166f52ee4ca + m_LoadPath: + m_Id: b58148b93af1a4c62babd223bbf6dd5f + 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 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta new file mode 100644 index 000000000..1f3f0cf94 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ac6cc16dfe9d340f5bcdc68cfef93cfd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset new file mode 100644 index 000000000..9c12992c5 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset @@ -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: 781e582296993477f969a4a24651a786, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 000000000..e5a3379f0 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Default Local Group_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 662a00e7b05f44473b7848e1e009df50 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset new file mode 100644 index 000000000..cd7349a5b --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%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: Localization-Assets-Shared_BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: 7ef33753e4c4e4564a0583bf3167c670, 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_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: b17f43ab650544e5f838e166f52ee4ca + m_LoadPath: + m_Id: b58148b93af1a4c62babd223bbf6dd5f + 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: 1 + m_AssetLoadMode: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset.meta new file mode 100644 index 000000000..5a1e17101 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 037591fb085b2484f8a5179d0cfc7cdd +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset new file mode 100644 index 000000000..6e46bdc2f --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset @@ -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: Localization-Assets-Shared_ContentUpdateGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: 7ef33753e4c4e4564a0583bf3167c670, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 000000000..36f3d6b03 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Assets-Shared_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6dce7518615824cdcbf7866302f7a513 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset new file mode 100644 index 000000000..a5979a122 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%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: Localization-Locales_BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: e818f59e2e6f24728875459ab4d000a4, 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_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: b17f43ab650544e5f838e166f52ee4ca + m_LoadPath: + m_Id: b58148b93af1a4c62babd223bbf6dd5f + 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: 1 + m_AssetLoadMode: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset.meta new file mode 100644 index 000000000..094558cf6 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c14b24e087b6f49eab90109bf6499f01 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset new file mode 100644 index 000000000..d270bfd06 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset @@ -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: Localization-Locales_ContentUpdateGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: e818f59e2e6f24728875459ab4d000a4, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 000000000..e2ada12ab --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-Locales_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c9ddc2a99fb564942b4df1d681e3ce65 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset new file mode 100644 index 000000000..ad128a8aa --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%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: Localization-String-Tables-English (en)_BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: 3cf89f5225a9d478f814d47a38fc50ff, 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_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: b17f43ab650544e5f838e166f52ee4ca + m_LoadPath: + m_Id: b58148b93af1a4c62babd223bbf6dd5f + 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: 1 + m_AssetLoadMode: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset.meta new file mode 100644 index 000000000..003648500 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b3b0164465e474032b4b8fa5483e949e +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset new file mode 100644 index 000000000..d0a0a081f --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset @@ -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: Localization-String-Tables-English (en)_ContentUpdateGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: 3cf89f5225a9d478f814d47a38fc50ff, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 000000000..adc576c15 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-English (en)_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3f127b1297bff402eba2c035999d3a88 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset new file mode 100644 index 000000000..cf57f12b5 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset @@ -0,0 +1,47 @@ +%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: Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: a0c0ca58d2104406a9d512fc398f2136, 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_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: b17f43ab650544e5f838e166f52ee4ca + m_LoadPath: + m_Id: b58148b93af1a4c62babd223bbf6dd5f + 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: 1 + m_AssetLoadMode: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset.meta new file mode 100644 index 000000000..e87be4811 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_BundledAssetGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 27b3b4851831f4b8eb7d7eb3164be7ff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset new file mode 100644 index 000000000..81910bf2a --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset @@ -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: Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema + m_EditorClassIdentifier: + m_Group: {fileID: 11400000, guid: a0c0ca58d2104406a9d512fc398f2136, type: 2} + m_StaticContent: 0 diff --git a/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset.meta b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset.meta new file mode 100644 index 000000000..d67d7c7d8 --- /dev/null +++ b/Assets/AddressableAssetsData/AssetGroups/Schemas/Localization-String-Tables-Polish (pl)_ContentUpdateGroupSchema.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 78e0ca64d661b48148c99468604e7403 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders.meta b/Assets/AddressableAssetsData/DataBuilders.meta new file mode 100644 index 000000000..c67c8fd9b --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7622a782e2ff34a17a0a102359b4f655 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset new file mode 100644 index 000000000..50d30dc58 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset @@ -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 diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta new file mode 100644 index 000000000..129bfdabc --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptFastMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b9b631a28ae8c4de8a8cdb37376c1c66 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset new file mode 100644 index 000000000..ec875f943 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset @@ -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 diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta new file mode 100644 index 000000000..af867a2df --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 138279c83100e4b3c8dfcf3217252b41 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset new file mode 100644 index 000000000..762884519 --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset @@ -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 diff --git a/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta new file mode 100644 index 000000000..0343c8bfc --- /dev/null +++ b/Assets/AddressableAssetsData/DataBuilders/BuildScriptPackedPlayMode.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5632a9856ff034c10afcf3a1d908c5fc +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AddressableAssetsData/DefaultObject.asset b/Assets/AddressableAssetsData/DefaultObject.asset new file mode 100644 index 000000000..c278543f1 --- /dev/null +++ b/Assets/AddressableAssetsData/DefaultObject.asset @@ -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: b76b3bc583a8544debd5b527f9c8a9bd diff --git a/Assets/AddressableAssetsData/DefaultObject.asset.meta b/Assets/AddressableAssetsData/DefaultObject.asset.meta new file mode 100644 index 000000000..49f958d9d --- /dev/null +++ b/Assets/AddressableAssetsData/DefaultObject.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 272caeb75b6504dcb987edb253f851b7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/DefaultVolumeProfile.asset b/Assets/DefaultVolumeProfile.asset index 36c3781ad..bed01558e 100644 --- a/Assets/DefaultVolumeProfile.asset +++ b/Assets/DefaultVolumeProfile.asset @@ -1,5 +1,517 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!114 &-8237483770327624080 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 6bd486065ce11414fa40e631affc4900, type: 3} + m_Name: ProbeVolumesOptions + m_EditorClassIdentifier: + active: 1 + normalBias: + m_OverrideState: 1 + m_Value: 0.05 + viewBias: + m_OverrideState: 1 + m_Value: 0.1 + scaleBiasWithMinProbeDistance: + m_OverrideState: 1 + m_Value: 0 + samplingNoise: + m_OverrideState: 1 + m_Value: 0.1 + animateSamplingNoise: + m_OverrideState: 1 + m_Value: 1 + leakReductionMode: + m_OverrideState: 1 + m_Value: 2 + minValidDotProductValue: + m_OverrideState: 1 + m_Value: 0.1 + occlusionOnlyReflectionNormalization: + m_OverrideState: 1 + m_Value: 1 + intensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + skyOcclusionIntensityMultiplier: + m_OverrideState: 1 + m_Value: 1 + worldOffset: + m_OverrideState: 1 + m_Value: {x: 0, y: 0, z: 0} +--- !u!114 &-7848585455520259389 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 5485954d14dfb9a4c8ead8edb0ded5b1, type: 3} + m_Name: LiftGammaGain + m_EditorClassIdentifier: + active: 1 + lift: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gamma: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + gain: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} +--- !u!114 &-7218634232686839927 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: ccf1aba9553839d41ae37dd52e9ebcce, type: 3} + m_Name: MotionBlur + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + quality: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + clamp: + m_OverrideState: 1 + m_Value: 0.05 +--- !u!114 &-6926778660350149068 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 97c23e3b12dc18c42a140437e53d3951, type: 3} + m_Name: Tonemapping + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + neutralHDRRangeReductionMode: + m_OverrideState: 1 + m_Value: 2 + acesPreset: + m_OverrideState: 1 + m_Value: 3 + hueShiftAmount: + m_OverrideState: 1 + m_Value: 0 + detectPaperWhite: + m_OverrideState: 1 + m_Value: 0 + paperWhite: + m_OverrideState: 1 + m_Value: 300 + detectBrightnessLimits: + m_OverrideState: 1 + m_Value: 1 + minNits: + m_OverrideState: 1 + m_Value: 0.005 + maxNits: + m_OverrideState: 1 + m_Value: 1000 +--- !u!114 &-5973178142912992280 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 06437c1ff663d574d9447842ba0a72e4, type: 3} + m_Name: ScreenSpaceLensFlare + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + tintColor: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + bloomMip: + m_OverrideState: 1 + m_Value: 1 + firstFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + secondaryFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareIntensity: + m_OverrideState: 1 + m_Value: 1 + warpedFlareScale: + m_OverrideState: 1 + m_Value: {x: 1, y: 1} + samples: + m_OverrideState: 1 + m_Value: 1 + sampleDimmer: + m_OverrideState: 1 + m_Value: 0.5 + vignetteEffect: + m_OverrideState: 1 + m_Value: 1 + startingPosition: + m_OverrideState: 1 + m_Value: 1.25 + scale: + m_OverrideState: 1 + m_Value: 1.5 + streaksIntensity: + m_OverrideState: 1 + m_Value: 0 + streaksLength: + m_OverrideState: 1 + m_Value: 0.5 + streaksOrientation: + m_OverrideState: 1 + m_Value: 0 + streaksThreshold: + m_OverrideState: 1 + m_Value: 0.25 + resolution: + m_OverrideState: 1 + m_Value: 4 + chromaticAbberationIntensity: + m_OverrideState: 1 + m_Value: 0.5 +--- !u!114 &-5097201987401250187 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: cdfbdbb87d3286943a057f7791b43141, type: 3} + m_Name: ChannelMixer + m_EditorClassIdentifier: + active: 1 + redOutRedIn: + m_OverrideState: 1 + m_Value: 100 + redOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + redOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + greenOutRedIn: + m_OverrideState: 1 + m_Value: 0 + greenOutGreenIn: + m_OverrideState: 1 + m_Value: 100 + greenOutBlueIn: + m_OverrideState: 1 + m_Value: 0 + blueOutRedIn: + m_OverrideState: 1 + m_Value: 0 + blueOutGreenIn: + m_OverrideState: 1 + m_Value: 0 + blueOutBlueIn: + m_OverrideState: 1 + m_Value: 100 +--- !u!114 &-3649038347391319097 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 3eb4b772797da9440885e8bd939e9560, type: 3} + m_Name: ColorCurves + m_EditorClassIdentifier: + active: 1 + master: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + red: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + green: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + blue: + m_OverrideState: 1 + m_Value: + k__BackingField: 2 + m_Loop: 0 + m_ZeroValue: 0 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + - serializedVersion: 3 + time: 1 + value: 1 + inSlope: 1 + outSlope: 1 + tangentMode: 0 + weightedMode: 0 + inWeight: 0 + outWeight: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsHue: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + hueVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 1 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + satVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + lumVsSat: + m_OverrideState: 1 + m_Value: + k__BackingField: 0 + m_Loop: 0 + m_ZeroValue: 0.5 + m_Range: 1 + m_Curve: + serializedVersion: 2 + m_Curve: [] + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 +--- !u!114 &-2493990712057996511 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 66f335fb1ffd8684294ad653bf1c7564, type: 3} + m_Name: ColorAdjustments + m_EditorClassIdentifier: + active: 1 + postExposure: + m_OverrideState: 1 + m_Value: 0 + contrast: + m_OverrideState: 1 + m_Value: 0 + colorFilter: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + hueShift: + m_OverrideState: 1 + m_Value: 0 + saturation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-2069783915844833247 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 81180773991d8724ab7f2d216912b564, type: 3} + m_Name: ChromaticAberration + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-1174721111587055917 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 221518ef91623a7438a71fef23660601, type: 3} + m_Name: WhiteBalance + m_EditorClassIdentifier: + active: 1 + temperature: + m_OverrideState: 1 + m_Value: 0 + tint: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &-795725197108088906 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: e021b4c809a781e468c2988c016ebbea, type: 3} + m_Name: ColorLookup + m_EditorClassIdentifier: + active: 1 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + contribution: + m_OverrideState: 1 + m_Value: 0 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -12,4 +524,272 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} m_Name: DefaultVolumeProfile m_EditorClassIdentifier: - components: [] + components: + - {fileID: -5097201987401250187} + - {fileID: -3649038347391319097} + - {fileID: 163252250065586106} + - {fileID: 3532508157838517231} + - {fileID: -7848585455520259389} + - {fileID: -7218634232686839927} + - {fileID: -2069783915844833247} + - {fileID: 5407671404817492644} + - {fileID: -5973178142912992280} + - {fileID: -1174721111587055917} + - {fileID: 1587184412783660608} + - {fileID: 8448359104196820514} + - {fileID: -2493990712057996511} + - {fileID: -6926778660350149068} + - {fileID: 379334844075652814} + - {fileID: -795725197108088906} + - {fileID: 8864338993896729463} + - {fileID: 6487580106417061324} + - {fileID: -8237483770327624080} +--- !u!114 &163252250065586106 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 899c54efeace73346a0a16faa3afe726, type: 3} + m_Name: Vignette + m_EditorClassIdentifier: + active: 1 + color: + m_OverrideState: 1 + m_Value: {r: 0, g: 0, b: 0, a: 1} + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + intensity: + m_OverrideState: 1 + m_Value: 0 + smoothness: + m_OverrideState: 1 + m_Value: 0.2 + rounded: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &379334844075652814 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 70afe9e12c7a7ed47911bb608a23a8ff, type: 3} + m_Name: SplitToning + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + highlights: + m_OverrideState: 1 + m_Value: {r: 0.5, g: 0.5, b: 0.5, a: 1} + balance: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &1587184412783660608 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 0b2db86121404754db890f4c8dfe81b2, type: 3} + m_Name: Bloom + m_EditorClassIdentifier: + active: 1 + skipIterations: + m_OverrideState: 1 + m_Value: 1 + threshold: + m_OverrideState: 1 + m_Value: 0.9 + intensity: + m_OverrideState: 1 + m_Value: 0 + scatter: + m_OverrideState: 1 + m_Value: 0.7 + clamp: + m_OverrideState: 1 + m_Value: 65472 + tint: + m_OverrideState: 1 + m_Value: {r: 1, g: 1, b: 1, a: 1} + highQualityFiltering: + m_OverrideState: 1 + m_Value: 0 + downscale: + m_OverrideState: 1 + m_Value: 0 + maxIterations: + m_OverrideState: 1 + m_Value: 6 + dirtTexture: + m_OverrideState: 1 + m_Value: {fileID: 0} + dimension: 1 + dirtIntensity: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &3532508157838517231 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 29fa0085f50d5e54f8144f766051a691, type: 3} + m_Name: FilmGrain + m_EditorClassIdentifier: + active: 1 + type: + m_OverrideState: 1 + m_Value: 0 + intensity: + m_OverrideState: 1 + m_Value: 0 + response: + m_OverrideState: 1 + m_Value: 0.8 + texture: + m_OverrideState: 1 + m_Value: {fileID: 0} +--- !u!114 &5407671404817492644 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c01700fd266d6914ababb731e09af2eb, type: 3} + m_Name: DepthOfField + m_EditorClassIdentifier: + active: 1 + mode: + m_OverrideState: 1 + m_Value: 0 + gaussianStart: + m_OverrideState: 1 + m_Value: 10 + gaussianEnd: + m_OverrideState: 1 + m_Value: 30 + gaussianMaxRadius: + m_OverrideState: 1 + m_Value: 1 + highQualitySampling: + m_OverrideState: 1 + m_Value: 0 + focusDistance: + m_OverrideState: 1 + m_Value: 10 + aperture: + m_OverrideState: 1 + m_Value: 5.6 + focalLength: + m_OverrideState: 1 + m_Value: 50 + bladeCount: + m_OverrideState: 1 + m_Value: 5 + bladeCurvature: + m_OverrideState: 1 + m_Value: 1 + bladeRotation: + m_OverrideState: 1 + m_Value: 0 +--- !u!114 &6487580106417061324 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: 558a8e2b6826cf840aae193990ba9f2e, type: 3} + m_Name: ShadowsMidtonesHighlights + m_EditorClassIdentifier: + active: 1 + shadows: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + midtones: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + highlights: + m_OverrideState: 1 + m_Value: {x: 1, y: 1, z: 1, w: 0} + shadowsStart: + m_OverrideState: 1 + m_Value: 0 + shadowsEnd: + m_OverrideState: 1 + m_Value: 0.3 + highlightsStart: + m_OverrideState: 1 + m_Value: 0.55 + highlightsEnd: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &8448359104196820514 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: c5e1dc532bcb41949b58bc4f2abfbb7e, type: 3} + m_Name: LensDistortion + m_EditorClassIdentifier: + active: 1 + intensity: + m_OverrideState: 1 + m_Value: 0 + xMultiplier: + m_OverrideState: 1 + m_Value: 1 + yMultiplier: + m_OverrideState: 1 + m_Value: 1 + center: + m_OverrideState: 1 + m_Value: {x: 0.5, y: 0.5} + scale: + m_OverrideState: 1 + m_Value: 1 +--- !u!114 &8864338993896729463 +MonoBehaviour: + m_ObjectHideFlags: 3 + 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: fb60a22f311433c4c962b888d1393f88, type: 3} + m_Name: PaniniProjection + m_EditorClassIdentifier: + active: 1 + distance: + m_OverrideState: 1 + m_Value: 0 + cropToFit: + m_OverrideState: 1 + m_Value: 1 diff --git a/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset b/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset index 82bf09272..ea48e1ff0 100644 --- a/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset +++ b/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset @@ -9087,6 +9087,200 @@ MonoBehaviour: height: 30 canvasScrollPosition: {x: 80.08296, y: 38.083904} canvasZoom: 0.72850007 + - id: 21 + fields: + - title: Title + value: Wastelands/Bark_BigSpiders + type: 0 + typeString: CustomFieldType_Text + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: CustomFieldType_Text + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + overrideSettings: + useOverrides: 0 + overrideSubtitleSettings: 0 + showNPCSubtitlesDuringLine: 1 + showNPCSubtitlesWithResponses: 1 + showPCSubtitlesDuringLine: 0 + skipPCSubtitleAfterResponseMenu: 0 + subtitleCharsPerSecond: 30 + minSubtitleSeconds: 2 + continueButton: 0 + overrideSequenceSettings: 0 + defaultSequence: + defaultPlayerSequence: + defaultResponseMenuSequence: + overrideInputSettings: 0 + alwaysForceResponseMenu: 1 + includeInvalidEntries: 0 + responseTimeout: 0 + cancelSubtitle: + key: 27 + buttonName: + cancelConversation: + key: 27 + buttonName: + nodeColor: + dialogueEntries: + - id: 0 + fields: + - title: Title + value: START + type: 0 + typeString: + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Menu Text + value: + type: 0 + typeString: + - title: Dialogue Text + value: + type: 0 + typeString: + - title: Parenthetical + value: + type: 0 + typeString: + - title: Audio Files + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Video File + value: + type: 0 + typeString: + - title: Sequence + value: None() + type: 0 + typeString: + - title: pl + value: + type: 4 + typeString: CustomFieldType_Localization + conversationID: 21 + isRoot: 0 + isGroup: 0 + nodeColor: + delaySimStatus: 0 + falseConditionAction: + conditionPriority: 2 + outgoingLinks: + - originConversationID: 21 + originDialogueID: 0 + destinationConversationID: 21 + destinationDialogueID: 1 + isConnector: 0 + priority: 2 + conditionsString: + userScript: + onExecute: + m_PersistentCalls: + m_Calls: [] + canvasRect: + serializedVersion: 2 + x: 20 + y: 30 + width: 160 + height: 30 + - id: 1 + fields: + - title: Title + value: What land is this with spiders as big as dogs? + type: 0 + typeString: CustomFieldType_Text + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: CustomFieldType_Text + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Menu Text + value: + type: 0 + typeString: CustomFieldType_Text + - title: Dialogue Text + value: What land is this with spiders as big as dogs? + type: 0 + typeString: CustomFieldType_Text + - title: Parenthetical + value: + type: 0 + typeString: CustomFieldType_Text + - title: Audio Files + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Video File + value: + type: 0 + typeString: CustomFieldType_Text + - title: Sequence + value: + type: 0 + typeString: CustomFieldType_Text + - title: pl + value: + type: 4 + typeString: CustomFieldType_Localization + conversationID: 21 + isRoot: 0 + isGroup: 0 + nodeColor: + delaySimStatus: 0 + falseConditionAction: Block + conditionPriority: 2 + outgoingLinks: [] + conditionsString: + userScript: + onExecute: + m_PersistentCalls: + m_Calls: [] + canvasRect: + serializedVersion: 2 + x: 20 + y: 80 + width: 160 + height: 30 + canvasScrollPosition: {x: 0.41666254, y: 0.5533047} + canvasZoom: 1.0045004 syncInfo: syncActors: 0 syncItems: 0 @@ -9096,13 +9290,15 @@ MonoBehaviour: syncItemsDatabase: {fileID: 0} syncLocationsDatabase: {fileID: 0} syncVariablesDatabase: {fileID: 0} - templateJson: '{"treatItemsAsQuests":true,"actorFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"IsPlayer","value":"False","type":2,"typeString":"CustomFieldType_Boolean"}],"itemFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Is + templateJson: '{"treatItemsAsQuests":true,"actorFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"IsPlayer","value":"False","type":2,"typeString":"CustomFieldType_Boolean"}],"itemFields":[{"title":"Name","value":"","type":0,"typeString":""},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":""},{"title":"Is Item","value":"True","type":2,"typeString":"CustomFieldType_Boolean"}],"questFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Success Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Failure Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"State","value":"unassigned","type":0,"typeString":"CustomFieldType_QuestState"},{"title":"Is - Item","value":"False","type":2,"typeString":"CustomFieldType_Boolean"}],"locationFields":[{"title":"Name","value":"","type":0,"typeString":""},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":""}],"variableFields":[{"title":"Name","value":"","type":0,"typeString":""},{"title":"Initial - Value","value":"","type":0,"typeString":""},{"title":"Description","value":"","type":0,"typeString":""}],"conversationFields":[{"title":"Title","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Actor","value":"0","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Conversant","value":"0","type":5,"typeString":"CustomFieldType_Actor"}],"dialogueEntryFields":[{"title":"Title","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Actor","value":"","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Conversant","value":"","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Menu + Item","value":"False","type":2,"typeString":"CustomFieldType_Boolean"},{"title":"Name + pl","value":"","type":4,"typeString":"CustomFieldType_Localization"},{"title":"Description + pl","value":"","type":4,"typeString":"CustomFieldType_Localization"}],"locationFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"}],"variableFields":[{"title":"Name","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Initial + Value","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"}],"conversationFields":[{"title":"Title","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Actor","value":"0","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Conversant","value":"0","type":5,"typeString":"CustomFieldType_Actor"}],"dialogueEntryFields":[{"title":"Title","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Pictures","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Description","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Actor","value":"","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Conversant","value":"","type":5,"typeString":"CustomFieldType_Actor"},{"title":"Menu Text","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Dialogue Text","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Parenthetical","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Audio Files","value":"[]","type":3,"typeString":"CustomFieldType_Files"},{"title":"Video - File","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Sequence","value":"","type":0,"typeString":"CustomFieldType_Text"}],"actorPrimaryFieldTitles":[],"itemPrimaryFieldTitles":[],"questPrimaryFieldTitles":[],"locationPrimaryFieldTitles":[],"variablePrimaryFieldTitles":[],"conversationPrimaryFieldTitles":[],"dialogueEntryPrimaryFieldTitles":[],"npcLineColor":{"r":1.0,"g":0.0,"b":0.0,"a":1.0},"pcLineColor":{"r":0.0,"g":0.0,"b":1.0,"a":1.0},"repeatLineColor":{"r":0.5,"g":0.5,"b":0.5,"a":1.0}}' + File","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"Sequence","value":"","type":0,"typeString":"CustomFieldType_Text"},{"title":"pl","value":"","type":4,"typeString":"CustomFieldType_Localization"}],"actorPrimaryFieldTitles":[],"itemPrimaryFieldTitles":[],"questPrimaryFieldTitles":[],"locationPrimaryFieldTitles":[],"variablePrimaryFieldTitles":[],"conversationPrimaryFieldTitles":[],"dialogueEntryPrimaryFieldTitles":[],"npcLineColor":{"r":1.0,"g":0.0,"b":0.0,"a":1.0},"pcLineColor":{"r":0.0,"g":0.0,"b":1.0,"a":1.0},"repeatLineColor":{"r":0.5,"g":0.5,"b":0.5,"a":1.0}}' diff --git a/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset.meta b/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset.meta index 6cb564cf1..e87747a7b 100644 --- a/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset.meta +++ b/Assets/Dialogue/TestDialogueBase (Auto-Backup).asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 08051d3c51fff4983bda8b69f82661f7 +guid: c5ae71b29adb447499036dc7f598a21a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Dialogue/TestDialogueBase.asset b/Assets/Dialogue/TestDialogueBase.asset index e42f700ed..f708f8b57 100644 --- a/Assets/Dialogue/TestDialogueBase.asset +++ b/Assets/Dialogue/TestDialogueBase.asset @@ -9087,6 +9087,200 @@ MonoBehaviour: height: 30 canvasScrollPosition: {x: 80.08296, y: 38.083904} canvasZoom: 0.72850007 + - id: 21 + fields: + - title: Title + value: Wastelands/Bark_BigSpiders + type: 0 + typeString: CustomFieldType_Text + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: CustomFieldType_Text + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + overrideSettings: + useOverrides: 0 + overrideSubtitleSettings: 0 + showNPCSubtitlesDuringLine: 1 + showNPCSubtitlesWithResponses: 1 + showPCSubtitlesDuringLine: 0 + skipPCSubtitleAfterResponseMenu: 0 + subtitleCharsPerSecond: 30 + minSubtitleSeconds: 2 + continueButton: 0 + overrideSequenceSettings: 0 + defaultSequence: + defaultPlayerSequence: + defaultResponseMenuSequence: + overrideInputSettings: 0 + alwaysForceResponseMenu: 1 + includeInvalidEntries: 0 + responseTimeout: 0 + cancelSubtitle: + key: 27 + buttonName: + cancelConversation: + key: 27 + buttonName: + nodeColor: + dialogueEntries: + - id: 0 + fields: + - title: Title + value: START + type: 0 + typeString: + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Menu Text + value: + type: 0 + typeString: + - title: Dialogue Text + value: + type: 0 + typeString: + - title: Parenthetical + value: + type: 0 + typeString: + - title: Audio Files + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Video File + value: + type: 0 + typeString: + - title: Sequence + value: None() + type: 0 + typeString: + - title: pl + value: + type: 4 + typeString: CustomFieldType_Localization + conversationID: 21 + isRoot: 0 + isGroup: 0 + nodeColor: + delaySimStatus: 0 + falseConditionAction: + conditionPriority: 2 + outgoingLinks: + - originConversationID: 21 + originDialogueID: 0 + destinationConversationID: 21 + destinationDialogueID: 1 + isConnector: 0 + priority: 2 + conditionsString: + userScript: + onExecute: + m_PersistentCalls: + m_Calls: [] + canvasRect: + serializedVersion: 2 + x: 20 + y: 30 + width: 160 + height: 30 + - id: 1 + fields: + - title: Title + value: What land is this with spiders as big as dogs? + type: 0 + typeString: CustomFieldType_Text + - title: Pictures + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Description + value: + type: 0 + typeString: CustomFieldType_Text + - title: Actor + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Conversant + value: 1 + type: 5 + typeString: CustomFieldType_Actor + - title: Menu Text + value: + type: 0 + typeString: CustomFieldType_Text + - title: Dialogue Text + value: What land is this with spiders as big as dogs? + type: 0 + typeString: CustomFieldType_Text + - title: Parenthetical + value: + type: 0 + typeString: CustomFieldType_Text + - title: Audio Files + value: '[]' + type: 3 + typeString: CustomFieldType_Files + - title: Video File + value: + type: 0 + typeString: CustomFieldType_Text + - title: Sequence + value: + type: 0 + typeString: CustomFieldType_Text + - title: pl + value: "Co to za kraina z paj\u0105kami o rozmiarze psa?" + type: 4 + typeString: CustomFieldType_Localization + conversationID: 21 + isRoot: 0 + isGroup: 0 + nodeColor: + delaySimStatus: 0 + falseConditionAction: Block + conditionPriority: 2 + outgoingLinks: [] + conditionsString: + userScript: + onExecute: + m_PersistentCalls: + m_Calls: [] + canvasRect: + serializedVersion: 2 + x: 20 + y: 79.004486 + width: 160 + height: 30 + canvasScrollPosition: {x: 0.41666254, y: 0.5533047} + canvasZoom: 1.0045004 syncInfo: syncActors: 0 syncItems: 0 diff --git a/Assets/Localization Settings.asset b/Assets/Localization Settings.asset new file mode 100644 index 000000000..f4754ce9a --- /dev/null +++ b/Assets/Localization Settings.asset @@ -0,0 +1,228 @@ +%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: a07b5cd0b1b829245bc8c4b6978793e8, type: 3} + m_Name: Localization Settings + m_EditorClassIdentifier: + m_StartupSelectors: + - rid: 1525001817635684592 + - rid: 1525001817635684593 + - rid: 1525001817635684594 + m_AvailableLocales: + rid: 1525001817635684595 + m_AssetDatabase: + rid: 1525001817635684596 + m_StringDatabase: + rid: 1525001817635684597 + m_Metadata: + m_Items: [] + m_ProjectLocaleIdentifier: + m_Code: en + m_PreloadBehavior: 1 + m_InitializeSynchronously: 0 + references: + version: 2 + RefIds: + - rid: -2 + type: {class: , ns: , asm: } + - rid: 1525001817635684592 + type: {class: CommandLineLocaleSelector, ns: UnityEngine.Localization.Settings, + asm: Unity.Localization} + data: + m_CommandLineArgument: -language= + - rid: 1525001817635684593 + type: {class: SystemLocaleSelector, ns: UnityEngine.Localization.Settings, asm: Unity.Localization} + data: + - rid: 1525001817635684594 + type: {class: SpecificLocaleSelector, ns: UnityEngine.Localization.Settings, + asm: Unity.Localization} + data: + m_LocaleId: + m_Code: en + - rid: 1525001817635684595 + type: {class: LocalesProvider, ns: UnityEngine.Localization.Settings, asm: Unity.Localization} + data: + - rid: 1525001817635684596 + type: {class: LocalizedAssetDatabase, ns: UnityEngine.Localization.Settings, + asm: Unity.Localization} + data: + m_DefaultTableReference: + m_TableCollectionName: + m_CustomTableProvider: + rid: -2 + m_CustomTablePostprocessor: + rid: -2 + m_AsynchronousBehaviour: 0 + m_UseFallback: 0 + - rid: 1525001817635684597 + type: {class: LocalizedStringDatabase, ns: UnityEngine.Localization.Settings, + asm: Unity.Localization} + data: + m_DefaultTableReference: + m_TableCollectionName: Main + m_CustomTableProvider: + rid: -2 + m_CustomTablePostprocessor: + rid: -2 + m_AsynchronousBehaviour: 1 + m_UseFallback: 0 + m_MissingTranslationState: 1 + m_NoTranslationFoundMessage: No translation found for '{key}' in {table.TableCollectionName} + m_SmartFormat: + rid: 1525001817635684598 + - rid: 1525001817635684598 + type: {class: SmartFormatter, ns: UnityEngine.Localization.SmartFormat, asm: Unity.Localization} + data: + m_Settings: + rid: 1525001817635684599 + m_Parser: + rid: 1525001817635684600 + m_Sources: + - rid: 1525001817635684601 + - rid: 1525001817635684602 + - rid: 1525001817635684603 + - rid: 1525001817635684604 + - rid: 1525001817635684605 + - rid: 1525001817635684606 + - rid: 1525001817635684607 + m_Formatters: + - rid: 1525001817635684601 + - rid: 1525001817635684608 + - rid: 1525001817635684609 + - rid: 1525001817635684610 + - rid: 1525001817635684611 + - rid: 1525001817635684612 + - rid: 1525001817635684613 + - rid: 1525001817635684614 + - rid: 1525001817635684615 + - rid: 1525001817635684599 + type: {class: SmartSettings, ns: UnityEngine.Localization.SmartFormat.Core.Settings, + asm: Unity.Localization} + data: + m_FormatErrorAction: 0 + m_ParseErrorAction: 0 + m_CaseSensitivity: 0 + m_ConvertCharacterStringLiterals: 1 + - rid: 1525001817635684600 + type: {class: Parser, ns: UnityEngine.Localization.SmartFormat.Core.Parsing, + asm: Unity.Localization} + data: + m_OpeningBrace: 123 + m_ClosingBrace: 125 + m_Settings: + rid: 1525001817635684599 + m_AlphanumericSelectors: 1 + m_AllowedSelectorChars: _- + m_Operators: '[]().,' + m_AlternativeEscaping: 0 + m_AlternativeEscapeChar: 92 + - rid: 1525001817635684601 + type: {class: ListFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - list + - l + - + m_SmartSettings: + rid: 1525001817635684599 + - rid: 1525001817635684602 + type: {class: PersistentVariablesSource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Groups: [] + - rid: 1525001817635684603 + type: {class: DictionarySource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + - rid: 1525001817635684604 + type: {class: ValueTupleSource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + - rid: 1525001817635684605 + type: {class: XmlSource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + - rid: 1525001817635684606 + type: {class: ReflectionSource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + - rid: 1525001817635684607 + type: {class: DefaultSource, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + - rid: 1525001817635684608 + type: {class: PluralLocalizationFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - plural + - p + - + m_DefaultTwoLetterISOLanguageName: en + - rid: 1525001817635684609 + type: {class: ConditionalFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - conditional + - cond + - + - rid: 1525001817635684610 + type: {class: TimeFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - timespan + - time + - t + - + m_DefaultFormatOptions: 4646 + - rid: 1525001817635684611 + type: {class: XElementFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - xelement + - xml + - x + - + - rid: 1525001817635684612 + type: {class: ChooseFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - choose + - c + m_SplitChar: 124 + - rid: 1525001817635684613 + type: {class: SubStringFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - substr + m_ParameterDelimiter: 44 + m_NullDisplayString: (null) + m_OutOfRangeBehavior: 0 + - rid: 1525001817635684614 + type: {class: IsMatchFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - ismatch + - rid: 1525001817635684615 + type: {class: DefaultFormatter, ns: UnityEngine.Localization.SmartFormat.Extensions, + asm: Unity.Localization} + data: + m_Names: + - default + - d + - diff --git a/Assets/Localization Settings.asset.meta b/Assets/Localization Settings.asset.meta new file mode 100644 index 000000000..22d75a613 --- /dev/null +++ b/Assets/Localization Settings.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7039fd3a9545544ffa35741a5b2a3aaa +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization.meta b/Assets/Localization.meta new file mode 100644 index 000000000..95bd07939 --- /dev/null +++ b/Assets/Localization.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 67654ea38176445799b7547ee08fe627 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/English (en).asset b/Assets/Localization/English (en).asset new file mode 100644 index 000000000..a7c94d221 --- /dev/null +++ b/Assets/Localization/English (en).asset @@ -0,0 +1,25 @@ +%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: 1bb1838fe8befb0429646b938e757ff3, type: 3} + m_Name: English (en) + m_EditorClassIdentifier: + m_Identifier: + m_Code: en + m_Metadata: + m_Items: [] + m_LocaleName: English (en) + m_CustomFormatCultureCode: + m_UseCustomFormatter: 0 + m_SortOrder: 10000 + references: + version: 2 + RefIds: [] diff --git a/Assets/Localization/English (en).asset.meta b/Assets/Localization/English (en).asset.meta new file mode 100644 index 000000000..01eea8664 --- /dev/null +++ b/Assets/Localization/English (en).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b687dde66161f4d73b8b46022e35e6e1 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/Main Shared Data.asset b/Assets/Localization/Main Shared Data.asset new file mode 100644 index 000000000..d383fef61 --- /dev/null +++ b/Assets/Localization/Main Shared Data.asset @@ -0,0 +1,37 @@ +%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: 5b11a58205ec3474ca216360e9fa74a8, type: 3} + m_Name: Main Shared Data + m_EditorClassIdentifier: + m_TableCollectionName: Main + m_TableCollectionNameGuidString: 73bb75577707d4557a4a4f33efb13fe2 + m_Entries: + - m_Id: 8043618304 + m_Key: WASTELAND_Q1_1 + m_Metadata: + m_Items: [] + - m_Id: 125983252480 + m_Key: New Entry + m_Metadata: + m_Items: [] + m_Metadata: + m_Items: [] + m_KeyGenerator: + rid: 1525001817635684616 + references: + version: 2 + RefIds: + - rid: 1525001817635684616 + type: {class: DistributedUIDGenerator, ns: UnityEngine.Localization.Tables, + asm: Unity.Localization} + data: + m_CustomEpoch: 1738589574569 diff --git a/Assets/Localization/Main Shared Data.asset.meta b/Assets/Localization/Main Shared Data.asset.meta new file mode 100644 index 000000000..927779bd4 --- /dev/null +++ b/Assets/Localization/Main Shared Data.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 73bb75577707d4557a4a4f33efb13fe2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/Main.asset b/Assets/Localization/Main.asset new file mode 100644 index 000000000..ff2a9c928 --- /dev/null +++ b/Assets/Localization/Main.asset @@ -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: 5be51871efa6c3e4eae1703925c8f5ac, type: 3} + m_Name: Main + m_EditorClassIdentifier: + m_SharedTableData: {fileID: 11400000, guid: 73bb75577707d4557a4a4f33efb13fe2, type: 2} + m_Tables: + - {fileID: 11400000, guid: 28f5875ddb2c34dce9e4c206c394ab3f, type: 2} + - {fileID: 11400000, guid: 1cadffdfb0ea14656b889a8a0349440d, type: 2} + m_Extensions: [] + m_Group: String Table + references: + version: 2 + RefIds: [] diff --git a/Assets/Localization/Main.asset.meta b/Assets/Localization/Main.asset.meta new file mode 100644 index 000000000..2391232fc --- /dev/null +++ b/Assets/Localization/Main.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 37b3194537ed04ca98aa60845967b206 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/Main_en.asset b/Assets/Localization/Main_en.asset new file mode 100644 index 000000000..19484a40e --- /dev/null +++ b/Assets/Localization/Main_en.asset @@ -0,0 +1,27 @@ +%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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} + m_Name: Main_en + m_EditorClassIdentifier: + m_LocaleId: + m_Code: en + m_SharedData: {fileID: 11400000, guid: 73bb75577707d4557a4a4f33efb13fe2, type: 2} + m_Metadata: + m_Items: [] + m_TableData: + - m_Id: 8043618304 + m_Localized: Hello + m_Metadata: + m_Items: [] + references: + version: 2 + RefIds: [] diff --git a/Assets/Localization/Main_en.asset.meta b/Assets/Localization/Main_en.asset.meta new file mode 100644 index 000000000..48bf80266 --- /dev/null +++ b/Assets/Localization/Main_en.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28f5875ddb2c34dce9e4c206c394ab3f +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/Main_pl.asset b/Assets/Localization/Main_pl.asset new file mode 100644 index 000000000..44f0944bb --- /dev/null +++ b/Assets/Localization/Main_pl.asset @@ -0,0 +1,27 @@ +%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: e9620f8c34305754d8cc9a7e49e852d9, type: 3} + m_Name: Main_pl + m_EditorClassIdentifier: + m_LocaleId: + m_Code: pl + m_SharedData: {fileID: 11400000, guid: 73bb75577707d4557a4a4f33efb13fe2, type: 2} + m_Metadata: + m_Items: [] + m_TableData: + - m_Id: 8043618304 + m_Localized: "Cze\u015B\u0107" + m_Metadata: + m_Items: [] + references: + version: 2 + RefIds: [] diff --git a/Assets/Localization/Main_pl.asset.meta b/Assets/Localization/Main_pl.asset.meta new file mode 100644 index 000000000..25fbd6e61 --- /dev/null +++ b/Assets/Localization/Main_pl.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1cadffdfb0ea14656b889a8a0349440d +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Localization/Polish (pl).asset b/Assets/Localization/Polish (pl).asset new file mode 100644 index 000000000..083c7f824 --- /dev/null +++ b/Assets/Localization/Polish (pl).asset @@ -0,0 +1,25 @@ +%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: 1bb1838fe8befb0429646b938e757ff3, type: 3} + m_Name: Polish (pl) + m_EditorClassIdentifier: + m_Identifier: + m_Code: pl + m_Metadata: + m_Items: [] + m_LocaleName: Polish (pl) + m_CustomFormatCultureCode: + m_UseCustomFormatter: 0 + m_SortOrder: 10000 + references: + version: 2 + RefIds: [] diff --git a/Assets/Localization/Polish (pl).asset.meta b/Assets/Localization/Polish (pl).asset.meta new file mode 100644 index 000000000..5db69d4de --- /dev/null +++ b/Assets/Localization/Polish (pl).asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bbdbfcab0c5ea47c99da0cf84cb6eb76 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Meshes/Terrain/Terrain_Land01.asset b/Assets/Meshes/Terrain/Terrain_Land01.asset index ac7b9f22d..aac0ff812 100644 Binary files a/Assets/Meshes/Terrain/Terrain_Land01.asset and b/Assets/Meshes/Terrain/Terrain_Land01.asset differ diff --git a/Assets/PlayMaker/Editor/Resources/EditorStartupPrefs.asset b/Assets/PlayMaker/Editor/Resources/EditorStartupPrefs.asset index 58fab2a5c..916c02448 100644 --- a/Assets/PlayMaker/Editor/Resources/EditorStartupPrefs.asset +++ b/Assets/PlayMaker/Editor/Resources/EditorStartupPrefs.asset @@ -16,5 +16,5 @@ MonoBehaviour: playmakerVersion: showWelcomeScreen: 0 showUpgradeGuide: 0 - lastAutoUpdateSignature: + lastAutoUpdateSignature: 6000.0.35f1__/Users/marcin/projects/beyondGit/Assets__0.0.0.0 useLegacyNetworking: 0 diff --git a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset index e0e162594..0d8f94bad 100644 --- a/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset +++ b/Assets/Plugins/Easy Save 3/Resources/ES3/ES3Defaults.asset @@ -36,28 +36,25 @@ MonoBehaviour: - NavMeshComponents - Boxophobic.Utils.Editor - FullSerializer + - PPv2URPConverters - fluxy - StompyRobot.SRDebugger - - PPv2URPConverters - - Autodesk.Fbx - Boxophobic.AtmosphericHeightFog.Editor + - Sirenix.OdinInspector.Modules.UnityLocalization.Editor - StompyRobot.SRF.Editor - LeanCommon - StompyRobot.SRF - CodeStage.AFPSCounter.Editor - JetBrains.Frontend.2021.2 - Boxophobic.AtmosphericHeightFog.Runtime - - Smrvfx.Runtime - - Coffee.SoftMaskForUGUI - StompyRobot.SRDebugger.Editor - Boxophobic.Utils.Scripts - LeanPool - NavMeshComponentsEditor - - Coffee.SoftMaskForUGUI.Editor + - Sirenix.OdinInspector.Modules.Unity.Addressables - CodeStage.AFPSCounter.Examples - Sirenix.OdinInspector.Modules.UnityMathematics - - Autodesk.Fbx.Editor - - Autodesk.Fbx.BuildTestAssets + - Sirenix.OdinInspector.Modules.UnityLocalization showAdvancedSettings: 0 addMgrToSceneAutomatically: 0 autoUpdateReferences: 1 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset index f09018b97..fa3375af6 100644 --- a/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset +++ b/Assets/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset @@ -15,5 +15,9 @@ MonoBehaviour: configurations: - ID: Unity.Mathematics ActivationSettings: 0 + - ID: Unity.Localization + ActivationSettings: 0 + - ID: Unity.Addressables + ActivationSettings: 0 ModuleTogglingSettings: 1 ModuleUpdateSettings: 0 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta new file mode 100644 index 000000000..632acb7a4 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8998ffa158c7e460e942a7ebeb1be6cf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs new file mode 100644 index 000000000..13cf7472d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs @@ -0,0 +1,1934 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System; +using Sirenix.OdinInspector; + +[assembly: RegisterAssetReferenceAttributeForwardToChild(typeof(InlineEditorAttribute))] +[assembly: RegisterAssetReferenceAttributeForwardToChild(typeof(PreviewFieldAttribute))] + +namespace Sirenix.OdinInspector +{ + using System.Diagnostics; + + /// + /// DisallowAddressableSubAssetField is used on AssetReference properties, and disallows and prevents assigned sub-assets to the asset reference. + /// + /// + /// + /// [DisallowAddressableSubAssetField] + /// public AssetReference Reference; + /// + /// + /// + /// + [Conditional("UNITY_EDITOR")] + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Parameter)] + public class DisallowAddressableSubAssetFieldAttribute : Attribute + { + } + + /// + /// Registers an attribute to be applied to an AssetRefenece property, to be forwarded and applied to the AssetReference's child instead. + /// This allows attributes designed for use on UnityEngine.Objects to be used on AssetReference properties as well. + /// By default, InlineEditorAttribute and PreviewFieldAttribute are registered for forwarding. + /// + /// + /// + /// [assembly: Sirenix.OdinInspector.Modules.RegisterAssetReferenceAttributeForwardToChild(typeof(InlineEditorAttribute))] + /// [assembly: Sirenix.OdinInspector.Modules.RegisterAssetReferenceAttributeForwardToChild(typeof(PreviewFieldAttribute))] + /// + /// + /// + [Conditional("UNITY_EDITOR")] + [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] + public class RegisterAssetReferenceAttributeForwardToChildAttribute : Attribute // TODO: Should this be a global attribute? + { + /// + /// The type of the attribute to forward. + /// + public readonly Type AttributeType; + + /// + /// Registers the specified attribute to be copied and applied to the AssetReference's UnityEngine.Object child instead. + /// + /// The attribute type to forward. + public RegisterAssetReferenceAttributeForwardToChildAttribute(Type attributeType) + { + this.AttributeType = attributeType; + } + } +} + +#if UNITY_EDITOR +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + using Sirenix.OdinInspector.Editor; + using Sirenix.Serialization; + using Sirenix.Utilities; + using Sirenix.Utilities.Editor; + using Sirenix.OdinInspector.Modules.Addressables.Editor.Internal; + using Sirenix.Reflection.Editor; + using System.Collections.Generic; + using System.Linq; + using System.Reflection; + using UnityEditor; + using UnityEditor.AddressableAssets; + using UnityEditor.AddressableAssets.Settings; + using UnityEditor.AddressableAssets.GUI; + using UnityEngine; + using UnityEngine.AddressableAssets; + using System.Runtime.Serialization; + using UnityEngine.U2D; + using UnityEditor.U2D; + using System.IO; + + /// + /// Draws an AssetReference property. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + [DrawerPriority(0, 1, 0)] + public class AssetReferenceDrawer : OdinValueDrawer, IDefinesGenericMenuItems + where T : AssetReference + { + private bool hideAssetReferenceField; + private Type[] validMainAssetTypes; + private Type targetType; + private bool targetTypeIsNotValidMainAsset; + private string NoneSelectedLabel; + //private string[] labelRestrictions; + private bool showSubAssetField; + + private bool updateShowSubAssetField; + + private bool disallowSubAssets_Backing; + + private bool ActuallyDisallowSubAssets => this.disallowSubAssets_Backing && !this.targetTypeIsNotValidMainAsset; + + private List restrictions; + + private bool isSpriteAtlas; + + protected override bool CanDrawValueProperty(InspectorProperty property) + { + return property.GetAttribute() == null; + } + + protected override void Initialize() + { + // If a child exists, we draw that child instead of the AssetReference field. + if (this.Property.Children.Count > 0) + { + this.hideAssetReferenceField = true; + return; + } + + this.EnsureNotRealNull(); + + this.validMainAssetTypes = OdinAddressableUtility.GetAssetReferenceValidMainAssetTypes(typeof(T)); + this.targetType = OdinAddressableUtility.GetAssetReferenceTargetType(typeof(T)); + this.targetTypeIsNotValidMainAsset = this.validMainAssetTypes.Contains(this.targetType) == false; + + this.isSpriteAtlas = this.validMainAssetTypes.Length > 0 && this.validMainAssetTypes[0] == typeof(SpriteAtlas); + + if (this.targetType == typeof(UnityEngine.Object)) + { + this.NoneSelectedLabel = "None (Addressable Asset)"; + } + else if (this.validMainAssetTypes.Length > 1 || this.validMainAssetTypes[0] != this.targetType) + { + this.NoneSelectedLabel = $"None (Addressable [{string.Join("/", this.validMainAssetTypes.Select(n => n.GetNiceName()))}]>{this.targetType.GetNiceName()})"; + } + else + { + this.NoneSelectedLabel = $"None (Addressable {this.targetType.GetNiceName()})"; + } + + this.restrictions = new List(); + foreach (var attr in this.Property.Attributes) + { + if (attr is AssetReferenceUIRestriction r) + { + this.restrictions.Add(r); + } + } + + this.disallowSubAssets_Backing = Property.GetAttribute() != null; + + this.updateShowSubAssetField = true; + } + + private string lastGuid; + + protected override void DrawPropertyLayout(GUIContent label) + { + if (this.disallowSubAssets_Backing && this.targetTypeIsNotValidMainAsset) + { + SirenixEditorGUI.WarningMessageBox($"This {typeof(T).GetNiceName()} field has been marked as not allowing sub assets, but the target type '{this.targetType.GetNiceName()}' is not a valid main asset for {typeof(T).GetNiceName()}, so the target value *must* be a sub asset. Therefore sub assets have been enabled. (Valid main asset types for {typeof(T).GetNiceName()} are: {string.Join(", ", this.validMainAssetTypes.Select(t => t.GetNiceName()))})"); + } + + if (this.hideAssetReferenceField == false) + { + var value = ValueEntry.SmartValue; + + if (this.lastGuid != this.ValueEntry.SmartValue?.AssetGUID) + { + this.updateShowSubAssetField = true; + } + + this.lastGuid = this.ValueEntry.SmartValue?.AssetGUID; + + // Update showSubAssetField. + if (this.updateShowSubAssetField && Event.current.type == EventType.Layout) + { + if (value == null || value.AssetGUID == null || value.editorAsset == null) + { + this.showSubAssetField = false; + } + else if (string.IsNullOrEmpty(value.SubObjectName) == false) + { + this.showSubAssetField = true; + } + else if (this.ActuallyDisallowSubAssets) + { + this.showSubAssetField = false; + } + else + { + var path = AssetDatabase.GUIDToAssetPath(value.AssetGUID); + + if (path == null) + { + this.showSubAssetField = false; + } + else + { + var mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + this.showSubAssetField = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path).Any(); + } + } + + this.updateShowSubAssetField = false; + } + + var rect = SirenixEditorGUI.GetFeatureRichControlRect(label, out var controlId, out var _, out var valueRect); + + Rect mainRect = valueRect; + Rect subRect = default, subPickerRect = default; + + if (this.showSubAssetField) + { + subRect = mainRect.Split(1, 2).AddX(1); + mainRect = mainRect.Split(0, 2).SubXMax(1); + subPickerRect = subRect.AlignRight(16); + } + + var mainPickerRect = mainRect.AlignRight(16); + + // Cursor + EditorGUIUtility.AddCursorRect(mainPickerRect, MouseCursor.Link); + if (showSubAssetField) + { + EditorGUIUtility.AddCursorRect(subPickerRect, MouseCursor.Link); + } + + // Selector + if (GUI.Button(mainPickerRect, "", SirenixGUIStyles.None)) + { + OpenMainAssetSelector(valueRect); + } + if (showSubAssetField && GUI.Button(subPickerRect, "", SirenixGUIStyles.None)) + { + OpenSubAssetSelector(valueRect); + } + + // Ping + if (Event.current.type == EventType.MouseDown && Event.current.button == 0 && mainRect.Contains(Event.current.mousePosition) && value != null && value.editorAsset != null) + { + EditorGUIUtility.PingObject(value.editorAsset); + } + + // Drag and drop + EditorGUI.BeginChangeCheck(); + var drop = DragAndDropUtilities.DropZone(rect, null, typeof(object), false, controlId); + if (EditorGUI.EndChangeCheck()) + { + this.EnsureNotRealNull(); + + if (this.ConvertToValidAssignment(drop, out Object obj, out bool isSubAssetAssignment)) + { + if (this.isSpriteAtlas && obj is Sprite sprite) + { + foreach (SpriteAtlas spriteAtlas in AssetDatabase_Internals.FindAssets(String.Empty, false, AssetDatabaseSearchArea.AllAssets)) + { + if (!spriteAtlas.CanBindTo(sprite)) + { + continue; + } + + this.SetMainAndSubAsset(spriteAtlas, sprite); + + break; + } + } + else + { + if (isSubAssetAssignment) + { + string path = AssetDatabase.GetAssetPath(obj); + + UnityEngine.Object mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + + if (mainAsset != null) + { + if (mainAsset is Sprite mainAssetSprite) + { + this.SetMainAndSubAsset(mainAssetSprite, obj); + } + else + { + this.SetMainAndSubAsset(mainAsset, obj); + } + } + + this.updateShowSubAssetField = true; + } + else + { + var isSet = false; + + if (string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName)) + { + if (obj is Sprite) + { + Object[] subAssets = AssetDatabase.LoadAllAssetRepresentationsAtPath(AssetDatabase.GetAssetPath(obj)); + + if (subAssets.Length > 0) + { + this.SetMainAndSubAsset(obj, subAssets[0]); + + isSet = true; + } + } + } + + if (!isSet) + { + this.SetMainAsset(obj); + } + } + } + + if (this.ActuallyDisallowSubAssets && + !this.targetTypeIsNotValidMainAsset && + !string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName)) + { + this.SetSubAsset(null); + } + } + else if (drop == null) + { + this.SetMainAsset(null); + } + } + + // Drawing + if (Event.current.type == EventType.Repaint) + { + GUIContent valueLabel; + if (value == null || string.IsNullOrEmpty(value.AssetGUID) || value.editorAsset == null) + { + valueLabel = GUIHelper.TempContent(NoneSelectedLabel); + } + else if (showSubAssetField) + { + var path = AssetDatabase.GUIDToAssetPath(value.AssetGUID); + var assetName = System.IO.Path.GetFileNameWithoutExtension(path); + + + valueLabel = GUIHelper.TempContent(assetName, GetTheDamnPreview(value.editorAsset)); + } + else + { + valueLabel = GUIHelper.TempContent(value.editorAsset.name, GetTheDamnPreview(value.editorAsset)); + } + + GUI.Label(mainRect, valueLabel, EditorStyles.objectField); + SdfIcons.DrawIcon(mainPickerRect.SetWidth(12), SdfIconType.Record2); + + if (this.showSubAssetField) + { + if (string.IsNullOrEmpty(value.SubObjectName) || value.editorAsset == null) + { + valueLabel = GUIHelper.TempContent(""); + } + else + { + valueLabel = GUIHelper.TempContent(value.SubObjectName); + } + + GUI.Label(subRect, valueLabel, EditorStyles.objectField); + SdfIcons.DrawIcon(subPickerRect.SetWidth(12), SdfIconType.Record2); + } + } + } + else + { + this.Property.Children[0].Draw(label); + } + } + + private static Texture2D GetTheDamnPreview(UnityEngine.Object obj) + { + Texture2D img = obj as Texture2D; + + if (img == null) + { + img = (obj as Sprite)?.texture; + } + + if (img == null) + { + img = AssetPreview.GetMiniThumbnail(obj); + } + + return img; + } + + private bool ConvertToValidAssignment(object drop, out UnityEngine.Object converted, out bool isSubAssetAssignment) + { + converted = null; + isSubAssetAssignment = false; + + bool isDefinitelyMainAssetAssignment = false; + + if (object.ReferenceEquals(drop, null)) return false; + + if (!ConvertUtility.TryWeakConvert(drop, this.targetType, out object convertedObj)) + { + for (int i = 0; i < this.validMainAssetTypes.Length; i++) + { + if (ConvertUtility.TryWeakConvert(drop, this.validMainAssetTypes[i], out convertedObj)) + { + isDefinitelyMainAssetAssignment = true; + break; + } + } + } + + if (convertedObj == null || !(convertedObj is UnityEngine.Object unityObj) || unityObj == null) return false; + + converted = unityObj; + + if (isDefinitelyMainAssetAssignment) + { + isSubAssetAssignment = false; + return true; + } + else if (AssetDatabase.IsSubAsset(converted)) + { + if (this.ActuallyDisallowSubAssets) + { + return false; + } + + isSubAssetAssignment = true; + return true; + } + + return true; + } + + private void OpenMainAssetSelector(Rect rect) + { + this.EnsureNotRealNull(); + + var selector = new AddressableSelector("Select", this.validMainAssetTypes, this.restrictions, typeof(T)); + + bool isUnityRoot = this.Property.SerializationRoot?.ValueEntry.WeakSmartValue is UnityEngine.Object; + + if (isUnityRoot) + { + Undo.IncrementCurrentGroup(); + int undoIndex = Undo.GetCurrentGroup(); + + selector.SelectionCancelled += () => { Undo.RevertAllDownToGroup(undoIndex); }; + + selector.SelectionConfirmed += entries => + { + Undo.RevertAllDownToGroup(undoIndex); + + this.OnMainAssetSelect(entries.FirstOrDefault()); + }; + } + else + { + selector.SelectionConfirmed += entries => { this.OnMainAssetSelect(entries.FirstOrDefault()); }; + } + + selector.SelectionChangedWithType += (type, entries) => + { + if (type == SelectionChangedType.SelectionCleared) + { + return; + } + + AddressableAssetEntry entry = entries.FirstOrDefault(); + + this.OnMainAssetSelect(entry); + }; + + selector.ShowInPopup(rect); + } + + private void OpenSubAssetSelector(Rect rect) + { + this.EnsureNotRealNull(); + + if (this.ValueEntry.SmartValue == null || this.ValueEntry.SmartValue.AssetGUID == null) + return; + + var path = AssetDatabase.GUIDToAssetPath(this.ValueEntry.SmartValue.AssetGUID); + if (path == null) + return; + + var mainAsset = AssetDatabase.LoadMainAssetAtPath(path); + + List subAssets; + + if (mainAsset != null && mainAsset is SpriteAtlas) + { + subAssets = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path) + .Where(val => val != null && (val is Sprite || val is Texture2D)) + .ToList(); + } + else + { + subAssets = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, path) + .Where(val => val != null && this.targetType.IsInstanceOfType(val)) + .ToList(); + } + + var items = new GenericSelectorItem[subAssets.Count + 1]; + + items[0] = new GenericSelectorItem("", null); + for (int i = 0; i < subAssets.Count; i++) + { + var item = new GenericSelectorItem(subAssets[i].name, subAssets[i]); + items[i + 1] = item; + } + + var selector = new GenericSelector("Select Sub Asset", false, items); + + selector.SelectionChanged += OnSubAssetSelect; + selector.SelectionConfirmed += OnSubAssetSelect; + + selector.ShowInPopup(rect); + } + + private void OnMainAssetSelect(AddressableAssetEntry entry) => this.UpdateAssetReference(entry); + + private void OnSubAssetSelect(IEnumerable selection) + { + if (this.ValueEntry == null || this.ValueEntry.SmartValue.AssetGUID == null) + { + return; + } + + UnityEngine.Object selected = selection.FirstOrDefault(); + + this.SetSubAsset(selected); + } + + private void UpdateAssetReference(AddressableAssetEntry entry) + { + if (entry == null) + { + this.SetMainAsset(null); + + return; + } + + if (typeof(T).InheritsFrom()) + { + this.SetMainAsset(entry.MainAsset); + + return; + } + + + if (typeof(T).InheritsFrom()) + { + UnityEngine.Object subObject = null; + + string path = AssetDatabase.GetAssetPath(entry.TargetAsset); + + if (AssetDatabase.GetMainAssetTypeAtPath(path) == typeof(SpriteAtlas)) + { + if (!(entry.TargetAsset is SpriteAtlas)) + { + subObject = entry.TargetAsset; + } + } + + this.SetMainAndSubAsset(entry.MainAsset, subObject); + } + else if (!this.ActuallyDisallowSubAssets && AssetDatabase.IsSubAsset(entry.TargetAsset)) + { + this.SetMainAndSubAsset(entry.MainAsset, entry.TargetAsset); + } + else + { + this.SetMainAsset(entry.MainAsset); + } + } + + private T CreateAssetReferenceFrom(AddressableAssetEntry entry) + { + if (entry != null) + { + return CreateAssetReferenceFrom(entry.TargetAsset); + } + else + { + return null; + } + } + + private T CreateAssetReferenceFrom(UnityEngine.Object mainAsset, UnityEngine.Object subAsset) + { + var path = AssetDatabase.GetAssetPath(mainAsset); + var guid = AssetDatabase.AssetPathToGUID(path); + + if (guid == null) return null; + + var instance = (T)Activator.CreateInstance(typeof(T), guid); + instance.SetEditorSubObject(subAsset); + return instance; + } + + private T CreateAssetReferenceFrom(UnityEngine.Object obj) + { + var path = AssetDatabase.GetAssetPath(obj); + var guid = AssetDatabase.AssetPathToGUID(path); + + if (guid == null) return null; + + var instance = (T)Activator.CreateInstance(typeof(T), guid); + + if (typeof(T).InheritsFrom()) + { + if (AssetDatabase.GetMainAssetTypeAtPath(path) == typeof(SpriteAtlas)) + { + if (!(obj is SpriteAtlas)) + { + instance.SetEditorSubObject(obj); + } + } + } + else if (typeof(T).InheritsFrom()) + { + // No need to do anything here. + // The user will need to choose a sprite + // "sub asset" from the atlas. + } + else if (this.ActuallyDisallowSubAssets == false && AssetDatabase.IsSubAsset(obj)) + { + instance.SetEditorSubObject(obj); + } + + return instance; + } + + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + genericMenu.AddItem(new GUIContent("Set To Null"), false, () => + { + this.EnsureNotRealNull(); + + this.SetMainAsset(null); + }); + + if (this.ValueEntry.SmartValue != null && string.IsNullOrEmpty(this.ValueEntry.SmartValue.SubObjectName) == false) + { + genericMenu.AddItem(new GUIContent("Remove Sub Asset"), false, () => + { + this.EnsureNotRealNull(); + + this.SetSubAsset(null); + }); + } + else + { + genericMenu.AddDisabledItem(new GUIContent("Remove Sub Asset")); + } + + genericMenu.AddItem(new GUIContent("Open Groups Window"), false, OdinAddressableUtility.OpenGroupsWindow); + } + + private void SetMainAndSubAsset(UnityEngine.Object mainAsset, UnityEngine.Object subAsset, bool setDirtyIfChanged = true) + { + string subAssetName = subAsset == null ? null : subAsset.name; + + bool isDifferent = this.ValueEntry.SmartValue.editorAsset != mainAsset || + this.ValueEntry.SmartValue.SubObjectName != subAssetName; + + if (!isDifferent) + { + return; + } + + if (this.Property.SerializationRoot?.ValueEntry.WeakSmartValue is UnityEngine.Object) + { + Undo.IncrementCurrentGroup(); + + Undo.SetCurrentGroupName("Main- and Sub Asset Changed"); + + int index = Undo.GetCurrentGroup(); + + this.SetMainAsset(mainAsset, false); + this.SetSubAsset(subAsset, false); + + Undo.CollapseUndoOperations(index); + + if (setDirtyIfChanged) + { + this.Property.MarkSerializationRootDirty(); + } + } + else + { + this.SetMainAsset(mainAsset, false); + this.SetSubAsset(subAsset, false); + } + } + + private void SetMainAsset(UnityEngine.Object asset, bool setDirtyIfChanged = true) + { + if (this.ValueEntry.SmartValue.editorAsset == asset) + { + return; + } + + this.Property.RecordForUndo("Main Asset Changed"); + + this.ValueEntry.SmartValue.SetEditorAsset(asset); + + this.updateShowSubAssetField = true; + + if (setDirtyIfChanged) + { + this.Property.MarkSerializationRootDirty(); + } + } + + private void SetSubAsset(UnityEngine.Object asset, bool setDirtyIfChanged = true) + { +#if SIRENIX_INTERNAL + if (this.ValueEntry.SmartValue.editorAsset == null) + { + Debug.LogError("[SIRENIX INTERNAL] Attempted to assign the Sub Asset on an AssetReference without the Main Asset being assigned first."); + return; + } +#endif + + string assetName = asset == null ? null : asset.name; + + if (this.ValueEntry.SmartValue.SubObjectName == assetName) + { + return; + } + + this.Property.RecordForUndo("Sub Asset Changed"); + + this.ValueEntry.SmartValue.SetEditorSubObject(asset); + + this.updateShowSubAssetField = true; + + if (setDirtyIfChanged) + { + this.Property.MarkSerializationRootDirty(); + } + } + + private void EnsureNotRealNull() + { + if (this.ValueEntry.WeakSmartValue == null) + { + this.ValueEntry.SmartValue = OdinAddressableUtility.CreateAssetReferenceGuid(null); + } + } + } + + /// + /// Draws an AssetLabelReference field. + /// + [DrawerPriority(0, 1, 0)] + public class AssetLabelReferenceDrawer : OdinValueDrawer, IDefinesGenericMenuItems + { + protected override bool CanDrawValueProperty(InspectorProperty property) + { + return property.GetAttribute() == null; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + var rect = SirenixEditorGUI.GetFeatureRichControlRect(label, out var controlId, out var hasKeyboardFocus, out var valueRect); + + string valueLabel; + if (this.ValueEntry.SmartValue == null || string.IsNullOrEmpty(this.ValueEntry.SmartValue.labelString)) + { + valueLabel = ""; + } + else + { + valueLabel = this.ValueEntry.SmartValue.labelString; + } + + if (GUI.Button(valueRect, valueLabel, EditorStyles.popup)) + { + var selector = new AddressableLabelSelector(); + + selector.SelectionChanged += SetLabel; + selector.SelectionConfirmed += SetLabel; + + selector.ShowInPopup(valueRect); + } + } + + private void SetLabel(IEnumerable selection) + { + var selected = selection.FirstOrDefault(); + this.ValueEntry.SmartValue = new AssetLabelReference() + { + labelString = selected, + }; + } + + public void PopulateGenericMenu(InspectorProperty property, GenericMenu genericMenu) + { + genericMenu.AddItem(new GUIContent("Set To Null"), false, () => property.ValueEntry.WeakSmartValue = null); + genericMenu.AddItem(new GUIContent("Open Label Window"), false, () => OdinAddressableUtility.OpenLabelsWindow()); + } + } + + /// + /// Odin Selector for Addressables. + /// + public class AddressableSelector : OdinSelector + { + //private static EditorPrefBool flatten = new EditorPrefBool("AddressablesSelector.Flatten", false); + public event Action> SelectionChangedWithType; + + private static EditorPrefEnum listMode = new EditorPrefEnum("AddressablesSelector.ListMode", SelectorListMode.Group); + + private readonly string title; + private readonly Type[] filterTypes; + private readonly List restrictions; + + internal bool ShowNonAddressables; + + public override string Title => this.title; + + /// + /// Initializes a AddressableSelector. + /// + /// The title of the selector. Set to null for no title. + /// The type of UnityEngine.Object to be selectable. For example, UnityEngine.Texture. For no restriction, pass in UnityEngine.Object. + /// The Addressable labels to restrict the selector to. Set to null for no label restrictions. + /// Throws if the filter type is null. + public AddressableSelector(string title, Type filterType, List restrictions, Type assetReferenceType) + : this(title, new Type[] { filterType }, restrictions, assetReferenceType) + { + } + + /// + /// Initializes a AddressableSelector. + /// + /// The title of the selector. Set to null for no title. + /// The types of UnityEngine.Object to be selectable. For example, UnityEngine.Texture. For no restriction, pass in an array containing UnityEngine.Object. + /// The Addressable labels to restrict the selector to. Set to null for no label restrictions. + /// Throws if the filter type is null. + public AddressableSelector(string title, Type[] filterTypes, List restrictions, Type assetReferenceType) + { + this.title = title; + this.filterTypes = filterTypes ?? throw new ArgumentNullException(nameof(filterTypes)); + this.restrictions = restrictions; + + if (assetReferenceType != null) + { + if (assetReferenceType.InheritsFrom() == false) + { + throw new ArgumentException("Must inherit AssetReference", nameof(assetReferenceType)); + } + else if (assetReferenceType.IsAbstract) + { + throw new ArgumentException("Cannot be abstract type.", nameof(assetReferenceType)); + } + } + } + + protected override void DrawToolbar() + { + bool drawTitle = !string.IsNullOrEmpty(this.Title); + bool drawSearchToolbar = this.SelectionTree.Config.DrawSearchToolbar; + bool drawButton = this.DrawConfirmSelectionButton; + + if (drawTitle || drawSearchToolbar || drawButton) + { + SirenixEditorGUI.BeginHorizontalToolbar(this.SelectionTree.Config.SearchToolbarHeight); + { + DrawToolbarTitle(); + DrawToolbarSearch(); + EditorGUI.DrawRect(GUILayoutUtility.GetLastRect().AlignLeft(1), SirenixGUIStyles.BorderColor); + + SdfIconType icon; + if (listMode.Value == SelectorListMode.Path) + icon = SdfIconType.ListNested; + else if (listMode.Value == SelectorListMode.Group) + icon = SdfIconType.ListStars; + else if (listMode.Value == SelectorListMode.Flat) + icon = SdfIconType.List; + else + icon = SdfIconType.X; + + if (SirenixEditorGUI.ToolbarButton(icon, true)) + { + int m = (int)listMode.Value + 1; + + if (m >= (int)SelectorListMode.Max) + { + m = 0; + } + + listMode.Value = (SelectorListMode)m; + + this.RebuildMenuTree(); + } + + EditorGUI.BeginChangeCheck(); + this.ShowNonAddressables = SirenixEditorGUI.ToolbarToggle(this.ShowNonAddressables, EditorIcons.UnityLogo); + if (EditorGUI.EndChangeCheck()) + { + this.RebuildMenuTree(); + } + + if (SirenixEditorGUI.ToolbarButton(SdfIconType.GearFill, true)) + { + OdinAddressableUtility.OpenGroupsWindow(); + } + + DrawToolbarConfirmButton(); + } + SirenixEditorGUI.EndHorizontalToolbar(); + } + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + if (this.SelectionChangedWithType != null) + { + tree.Selection.SelectionChanged += type => + { + IEnumerable selection = this.GetCurrentSelection(); + + if (this.IsValidSelection(selection)) + { + this.SelectionChangedWithType(type, selection); + } + }; + } + + tree.Config.EXPERIMENTAL_INTERNAL_SparseFixedLayouting = true; + + tree.Config.SelectMenuItemsOnMouseDown = true; + + if (AddressableAssetSettingsDefaultObject.SettingsExists) + { + AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings; + + foreach (AddressableAssetGroup group in settings.groups) + { + if (group == null || group.name == "Built In Data") + { + continue; + } + + foreach (AddressableAssetEntry entry in group.entries) + { + this.AddEntriesToTree(tree, group.name, entry); + } + } + } + + foreach (OdinMenuItem item in tree.EnumerateTree()) + { + if (item.Value == null) + { + item.SdfIcon = SdfIconType.Folder; + } + } + + if (this.ShowNonAddressables) + { + var searchFilter = ""; + + foreach (Type filterType in this.filterTypes) + { + searchFilter += $"t:{filterType.Name} "; + } + + IEnumerator enumerator = AssetDatabase_Internals.EnumerateAllAssets(searchFilter, false, AssetDatabaseSearchArea.InAssetsOnly); + + if (enumerator.MoveNext()) + { + var addedGuids = new HashSet(); + + foreach (OdinMenuItem item in tree.EnumerateTree()) + { + if (item.Value != null) + { + addedGuids.Add((item.Value as AddressableAssetEntry).guid); + } + } + + const string NON_ADDRESSABLES_ITEM_NAME = "Non Addressables"; + + var nonAddressablesItem = new OdinMenuItem(tree, NON_ADDRESSABLES_ITEM_NAME, null) {Icon = EditorIcons.UnityLogo}; + + tree.MenuItems.Add(nonAddressablesItem); + + do + { + HierarchyProperty current = enumerator.Current; + + if (addedGuids.Contains(current.guid) || !current.isMainRepresentation) + { + continue; + } + + AddressableAssetEntry entry = OdinAddressableUtility.CreateFakeAddressableAssetEntry(current.guid); + + if (listMode == SelectorListMode.Flat) + { + var item = new OdinMenuItem(tree, current.name, entry) {Icon = current.icon}; + + nonAddressablesItem.ChildMenuItems.Add(item); + } + else + { + string path = AssetDatabase.GetAssetPath(current.instanceID); + + if (!current.isFolder) + { + int extensionEndingIndex = GetExtensionsEndingIndex(path); + + if (extensionEndingIndex != -1) + { + path = path.Substring(0, extensionEndingIndex); + } + } + + path = RemoveBaseDirectoryFromAssetPath(path); + + tree.Add($"{NON_ADDRESSABLES_ITEM_NAME}/{path}", entry, current.icon); + } + } while (enumerator.MoveNext()); + + nonAddressablesItem.ChildMenuItems.SortMenuItemsByName(); + } + } + + OdinMenuItem noneItem; + + if (this.filterTypes.Contains(typeof(UnityEngine.Object))) + { + noneItem = new OdinMenuItem(tree, " (Addressable Asset)", null); + } + else + { + string filterTypesJoined; + + if (this.filterTypes.Length == 1) + { + filterTypesJoined = this.filterTypes[0].GetNiceName(); + } + else + { + filterTypesJoined = string.Join("/", this.filterTypes.Select(t => t.GetNiceName())); + } + + noneItem = new OdinMenuItem(tree, $" (Addressable {filterTypesJoined})", null); + } + + noneItem.SdfIcon = SdfIconType.X; + tree.MenuItems.Insert(0, noneItem); + } + + private static int GetExtensionsEndingIndex(string path) + { + for (var i = path.Length - 1; i >= 0; i--) + { + if (path[i] == '\\' || path[i] == '/') + { + return -1; + } + + if (path[i] == '.') + { + return i; + } + } + + return -1; + } + + private static string RemoveBaseDirectoryFromAssetPath(string path) + { + if (path.StartsWith("Assets/")) + { + return path.Remove(0, "Assets/".Length); + } + + return path; + } + + private void AddEntriesToTree(OdinMenuTree tree, string groupName, AddressableAssetEntry entry) + { + if (entry == null) + { + return; + } + + bool isFolder = entry.IsFolder || AssetDatabase.IsValidFolder(entry.AssetPath); + + if (isFolder) + { + entry.GatherAllAssets(null, false, false, true, null); + + if (entry.SubAssets != null) + { + foreach (AddressableAssetEntry e in entry.SubAssets) + { + this.AddEntriesToTree(tree, groupName, e); + } + } + } + else + { + UnityEngine.Object asset = entry.TargetAsset; + + if (asset == null) + { + return; + } + + Type assetType = asset.GetType(); + var inheritsFromFilterType = false; + + for (var i = 0; i < this.filterTypes.Length; i++) + { + if (this.filterTypes[i].IsAssignableFrom(assetType)) + { + inheritsFromFilterType = true; + break; + } + } + + if (inheritsFromFilterType && this.PassesRestrictions(entry)) + { + string name; + if (listMode.Value == SelectorListMode.Group) + { + name = entry.address; + } + else if (listMode.Value == SelectorListMode.Path) + { + name = System.IO.Path.GetFileNameWithoutExtension(entry.AssetPath); + } + else if (listMode.Value == SelectorListMode.Flat) + { + name = entry.address; + } + else + { + throw new Exception("Unsupported list mode: " + listMode.Value); + } + + var item = new OdinMenuItem(tree, name, entry) + { + Icon = AssetPreview.GetMiniThumbnail(asset) + }; + + if (listMode.Value == SelectorListMode.Group) + { + OdinMenuItem groupItem = tree.GetMenuItem(groupName); + + if (groupItem == null) + { + groupItem = new OdinMenuItem(tree, groupName, null); + tree.MenuItems.Add(groupItem); + } + + if (entry.ParentEntry != null && entry.ParentEntry.IsFolder) + { + OdinMenuItem folderItem = null; + + for (int i = 0; i < groupItem.ChildMenuItems.Count; i++) + { + if (groupItem.ChildMenuItems[i].Name == entry.ParentEntry.address) + { + folderItem = groupItem.ChildMenuItems[i]; + break; + } + } + + if (folderItem == null) + { + folderItem = new OdinMenuItem(tree, entry.ParentEntry.address, null); + groupItem.ChildMenuItems.Add(folderItem); + } + + folderItem.ChildMenuItems.Add(item); + } + else + { + groupItem.ChildMenuItems.Add(item); + } + } + else if (listMode.Value == SelectorListMode.Path) + { + tree.AddMenuItemAtPath(System.IO.Path.GetDirectoryName(entry.AssetPath), item); + } + else if (listMode.Value == SelectorListMode.Flat) + { + tree.MenuItems.Add(item); + } + } + } + } + + private bool PassesRestrictions(AddressableAssetEntry entry) + { + if (restrictions == null) return true; + + return OdinAddressableUtility.ValidateAssetReferenceRestrictions(restrictions, entry.MainAsset); + + //for (int i = 0; i < this.restrictions.Count; i++) + //{ + // if (this.restrictions[i].ValidateAsset(entry.AssetPath) == false) + // { + // return false; + // } + //} + + //return true; + + /* If for whatever reason Unity haven't actually implemented their restriction methods, then we can use this code to atleast implement label restriction. */ + //if (this.labelRestrictions == null) return true; + + //for (int i = 0; i < labelRestrictions.Length; i++) + //{ + // if (entry.labels.Contains(labelRestrictions[i])) return true; + //} + + //return false; + } + + private enum SelectorListMode + { + Group, + Path, + Flat, + + Max, + } + } + + public class AddressableLabelSelector : OdinSelector + { + protected override void DrawToolbar() + { + bool drawTitle = !string.IsNullOrEmpty(this.Title); + bool drawSearchToolbar = this.SelectionTree.Config.DrawSearchToolbar; + bool drawButton = this.DrawConfirmSelectionButton; + + if (drawTitle || drawSearchToolbar || drawButton) + { + SirenixEditorGUI.BeginHorizontalToolbar(this.SelectionTree.Config.SearchToolbarHeight); + { + DrawToolbarTitle(); + DrawToolbarSearch(); + EditorGUI.DrawRect(GUILayoutUtility.GetLastRect().AlignLeft(1), SirenixGUIStyles.BorderColor); + + if (SirenixEditorGUI.ToolbarButton(SdfIconType.GearFill, true)) + { + OdinAddressableUtility.OpenLabelsWindow(); + } + + DrawToolbarConfirmButton(); + } + SirenixEditorGUI.EndHorizontalToolbar(); + } + } + protected override void BuildSelectionTree(OdinMenuTree tree) + { + IList labels = null; + + if (AddressableAssetSettingsDefaultObject.SettingsExists) + { + var settings = AddressableAssetSettingsDefaultObject.Settings; + labels = settings.GetLabels(); + } + + if (labels == null) labels = Array.Empty(); + + tree.MenuItems.Add(new OdinMenuItem(tree, "", null)); + + for (int i = 0; i < labels.Count; i++) + { + tree.MenuItems.Add(new OdinMenuItem(tree, labels[i], labels[i])); + } + } + } + + /// + /// Resolves children for AssetReference properties, and implements the RegisterAssetReferenceAttributeForwardToChild behaviour. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + public class AssetReferencePropertyResolver : OdinPropertyResolver + where T : AssetReference + { + private static readonly Type[] attributesToForward; + + static AssetReferencePropertyResolver() + { + attributesToForward = AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(x => x.GetCustomAttributes()) + .Cast() + .Select(x => x.AttributeType) + .ToArray(); + } + + public override int ChildNameToIndex(string name) + { + return 0; + } + + public override int ChildNameToIndex(ref StringSlice name) + { + return 0; + } + + public override InspectorPropertyInfo GetChildInfo(int childIndex) + { + var targetType = OdinAddressableUtility.GetAssetReferenceTargetType(typeof(T)); + var getterSetterType = typeof(AssetReferenceValueGetterSetter<>).MakeGenericType(typeof(T), targetType); + + var getterSetter = Activator.CreateInstance(getterSetterType) as IValueGetterSetter; + + List attributes = new List + { + new ShowInInspectorAttribute(), + }; + + foreach (var type in attributesToForward) + { + var attr = this.Property.Attributes.FirstOrDefault(x => x.GetType() == type); + if (attr != null) + { + attributes.Add(attr); + } + } + + string label = "Asset"; + + return InspectorPropertyInfo.CreateValue(label, 0, SerializationBackend.None, getterSetter, attributes); + } + + protected override int GetChildCount(T value) + { + foreach (var attr in attributesToForward) + { + if (this.Property.Attributes.Any(x => x.GetType() == attr)) + { + return 1; + } + } + + return 0; + } + + private class AssetReferenceValueGetterSetter : IValueGetterSetter + where TTarget : UnityEngine.Object + { + public bool IsReadonly => false; + + public Type OwnerType => typeof(T); + + public Type ValueType => typeof(TTarget); + + public TTarget GetValue(ref T owner) + { + var v = owner.editorAsset; + return v as TTarget; + } + + public object GetValue(object owner) + { + var v = (owner as T)?.editorAsset; + return v as TTarget; + } + + public void SetValue(ref T owner, TTarget value) + { + owner.SetEditorAsset(value); + } + + public void SetValue(object owner, object value) + { + (owner as T).SetEditorAsset(value as TTarget); + } + } + } + + /// + /// Processes attributes for AssetReference properties. + /// + /// The concrete type of AssetReference to be drawn. For example, AssetReferenceTexture. + public class AssetReferenceAttributeProcessor : OdinAttributeProcessor + where T : AssetReference + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.Add(new DoNotDrawAsReferenceAttribute()); + attributes.Add(new HideReferenceObjectPickerAttribute()); + attributes.Add(new SuppressInvalidAttributeErrorAttribute()); // TODO: Remove this with proper attribute forwarding support. + } + } + + /// + /// Processes attributes for AssetLabelReference properties. + /// + public class AssetLabelReferenceAttributeProcessor : OdinAttributeProcessor + { + public override void ProcessSelfAttributes(InspectorProperty property, List attributes) + { + attributes.Add(new DoNotDrawAsReferenceAttribute()); + attributes.Add(new HideReferenceObjectPickerAttribute()); + } + } + + /// + /// Implements conversion behaviour for addressables. + /// + [InitializeOnLoad] + internal class AssetReferenceConverter : ConvertUtility.ICustomConverter + { + private readonly Type type_AssetEntryTreeViewItem; + private WeakValueGetter get_AssetEntryTreeViewItem_entry; + + static AssetReferenceConverter() + { + ConvertUtility.AddCustomConverter(new AssetReferenceConverter()); + } + + public AssetReferenceConverter() + { + this.type_AssetEntryTreeViewItem = TwoWaySerializationBinder.Default.BindToType("UnityEditor.AddressableAssets.GUI.AssetEntryTreeViewItem") ?? throw new Exception("Failed to find UnityEditor.AddressableAssets.GUI.AddressableAssetEntryTreeViewItem type."); + var field_AssetEntryTreeViewItem_entry = type_AssetEntryTreeViewItem.GetField("entry", Flags.AllMembers) ?? throw new Exception("Failed to find entry field in UnityEditor.AddressableAssets.GUI.AddressableAssetEntryTreeViewItem type."); + this.get_AssetEntryTreeViewItem_entry = EmitUtilities.CreateWeakInstanceFieldGetter(type_AssetEntryTreeViewItem, field_AssetEntryTreeViewItem_entry); + } + + // UnityEngine.Object > AssetReference/T + // AddressableAssetEntry > AssetReference + // AssetReference/T > UnityEngine.Object + // AssetReference/T > AssetReference/T + // AddressableAssetEntry > UnityEngine.Object + + public bool CanConvert(Type from, Type to) + { + var comparer = FastTypeComparer.Instance; + + if (to.InheritsFrom(typeof(AssetReference))) + { + if (comparer.Equals(from, typeof(AddressableAssetEntry)) || comparer.Equals(from, type_AssetEntryTreeViewItem)) + { + return true; + } + else if (from.InheritsFrom()) + { + if (to.InheritsFrom(typeof(AssetReferenceT<>))) + { + var baseType = to.GetGenericBaseType(typeof(AssetReferenceT<>)); + + var targetType = baseType.GetGenericArguments()[0]; + + return from.InheritsFrom(targetType); + } + else + { + return true; + } + } + else if (from.InheritsFrom(typeof(AssetReference))) + { + return to.InheritsFrom(from); + } + else + { + return false; + } + } + else if (from.InheritsFrom(typeof(AssetReference)) && to.InheritsFrom()) + { + return false; + } + else + { + return false; + } + } + + public bool TryConvert(object obj, Type to, out object result) + { + if (obj == null) + { + result = null; + return false; + } + + var comparer = FastTypeComparer.Instance; + + // AssetEntryTreeViewItems is a UI element container for AddressableAssetEntry. + // With this we can just treat AssetEntryTreeViewItems as an AddressableAssetEntry. + if (comparer.Equals(obj.GetType(), type_AssetEntryTreeViewItem)) + { + obj = get_AssetEntryTreeViewItem_entry(ref obj); + } + + if (to.InheritsFrom(typeof(AssetReference))) + { + Type assetType; + if (to.InheritsFrom(typeof(AssetReferenceT<>))) + { + var baseType = to.GetGenericBaseType(typeof(AssetReferenceT<>)); + assetType = baseType.GetGenericArguments()[0]; + } + else + { + assetType = typeof(UnityEngine.Object); + } + + if (obj is UnityEngine.Object uObj) + { + if (obj.GetType().InheritsFrom(assetType)) + { + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(uObj)); + + if (string.IsNullOrEmpty(guid) == false) + { + + result = CreateReference(to, uObj); + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + else if (obj is AddressableAssetEntry entry) + { + if (entry.TargetAsset.GetType().InheritsFrom(assetType)) + { + result = CreateReference(to, entry.TargetAsset); + return true; + + } + else + { + result = null; + return false; + } + } + else if (obj is AssetReference reference) + { + if (TryGetReferencedAsset(reference, assetType, out var asset)) + { + result = CreateReference(to, asset); + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + else if (to.InheritsFrom(typeof(UnityEngine.Object)) && obj is AssetReference reference) + { + if (TryGetReferencedAsset(reference, to, out var asset)) + { + result = asset; + return true; + } + else + { + result = null; + return false; + } + } + else if (to.InheritsFrom(typeof(UnityEngine.Object)) && obj is AddressableAssetEntry entry) + { + var target = entry.TargetAsset; + if (target == null) + { + result = null; + return false; + } + else if (target.GetType().InheritsFrom(to)) + { + result = target; + return true; + } + else if (ConvertUtility.TryWeakConvert(target, to, out var converted)) + { + result = converted; + return true; + } + else + { + result = null; + return false; + } + } + else + { + result = null; + return false; + } + } + + private bool TryGetReferencedAsset(AssetReference reference, Type to, out UnityEngine.Object asset) + { + if (reference.AssetGUID == null) + { + asset = null; + return false; + } + + var path = AssetDatabase.GUIDToAssetPath(reference.AssetGUID); + + if (reference.SubObjectName != null) + { + asset = null; + + foreach (var subAsset in OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(reference.editorAsset, path)) + { + if (subAsset.name == reference.SubObjectName) + { + asset = subAsset; + break; + } + } + } + else + { + asset = AssetDatabase.LoadAssetAtPath(path); + } + + if (asset != null) + { + if (asset.GetType().InheritsFrom(to)) + { + return true; + } + else if (ConvertUtility.TryWeakConvert(asset, to, out var converted)) + { + asset = (UnityEngine.Object)converted; + return true; + } + else + { + asset = null; + return false; + } + } + else + { + return false; + } + } + + private AssetReference CreateReference(Type type, UnityEngine.Object obj) + { + var reference = (AssetReference)Activator.CreateInstance(type, new string[] { AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)) }); + if (AssetDatabase.IsSubAsset(obj)) + { + reference.SetEditorAsset(obj); + } + + return reference; + } + } + + /// + /// Odin Inspector utility methods for working with addressables. + /// + public static class OdinAddressableUtility + { + private readonly static Action openAddressableWindowAction; + + static OdinAddressableUtility() + { + var type = TwoWaySerializationBinder.Default.BindToType("UnityEditor.AddressableAssets.GUI.AddressableAssetsWindow") ?? throw new Exception(""); + var method = type.GetMethod("Init", Flags.AllMembers) ?? throw new Exception(""); + openAddressableWindowAction = (Action)Delegate.CreateDelegate(typeof(Action), method); + } + + public static IEnumerable EnumerateAllActualAndVirtualSubAssets(UnityEngine.Object mainAsset, string mainAssetPath) + { + if (mainAsset == null) + { + yield break; + } + + Object[] subAssets = AssetDatabase.LoadAllAssetRepresentationsAtPath(mainAssetPath); + + foreach (Object subAsset in subAssets) + { + yield return subAsset; + } + + // The sprites/textures in a sprite atlas are not sub assets of the atlas, but they are apparently + // still part of the atlas in a way that the addressables system considers a sub asset. + if (mainAsset is UnityEngine.U2D.SpriteAtlas atlas) + { + Object[] packables = atlas.GetPackables(); + + foreach (Object packable in packables) + { + if (packable == null) + { + continue; + } + + if (!(packable is DefaultAsset packableFolder)) + { + yield return packable; + continue; + } + + string packablePath = AssetDatabase.GetAssetPath(packableFolder); + + if (!AssetDatabase.IsValidFolder(packablePath)) + { + continue; + } + + string[] files = Directory.GetFiles(packablePath, "*.*", SearchOption.AllDirectories); + + foreach (string file in files) + { + if (file.EndsWith(".meta")) + { + continue; + } + + Type assetType = AssetDatabase.GetMainAssetTypeAtPath(file); + + if (assetType != typeof(Sprite) && assetType != typeof(Texture2D)) + { + continue; + } + + yield return AssetDatabase.LoadMainAssetAtPath(file); + } + } + } + } + + /// + /// Opens the addressables group settings window. + /// + public static void OpenGroupsWindow() + { + openAddressableWindowAction(); + } + + /// + /// Opens the addressables labels settings window. + /// + public static void OpenLabelsWindow() + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + EditorWindow.GetWindow().Intialize(AddressableAssetSettingsDefaultObject.Settings); + } + + /// + /// Converts the specified object into an addressable. + /// + /// The object to make addressable. + /// The addressable group to add the object to. + public static void MakeAddressable(UnityEngine.Object obj, AddressableAssetGroup group) + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + var entry = settings.CreateOrMoveEntry(guid, group, false, false); + entry.address = AssetDatabase.GUIDToAssetPath(guid); + settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryCreated, entry, false, true); + } + + /// + /// Gets the type targeted by an AssetReference type. For example, returns Texture for AssetReferenceTexture. + /// Returns UnityEngine.Object for AssetReference type. + /// + /// A type of AssetReference, for example, AssetReferenceTexture. + /// + /// If the given type inherits AssetRefernceT<T>, then the method returns the generic T argument. + /// If the given type is AssetReference, then the method returns UnityEngine.Object. + /// + /// Throws if given parameter is null. + /// Throws if the given type does not inherit or is AssetReference. + public static Type GetAssetReferenceTargetType(Type assetReferenceType) + { + if (assetReferenceType == null) throw new ArgumentNullException(nameof(assetReferenceType)); + + if (assetReferenceType.InheritsFrom(typeof(AssetReferenceT<>))) + { + var genericBase = assetReferenceType.GetGenericBaseType(typeof(AssetReferenceT<>)); + return genericBase.GetGenericArguments()[0]; + } + else + { + return typeof(UnityEngine.Object); + } + } + + public static Type[] GetAssetReferenceValidMainAssetTypes(Type assetReferenceType) + { + if (assetReferenceType == null) throw new ArgumentNullException(nameof(assetReferenceType)); + + if (assetReferenceType.InheritsFrom(typeof(AssetReferenceSprite))) + { + return new Type[] + { + typeof(Sprite), + typeof(SpriteAtlas), + typeof(Texture2D) + }; + } + else if (assetReferenceType.InheritsFrom(typeof(AssetReferenceAtlasedSprite))) + { + return new Type[] { typeof(SpriteAtlas) }; + } + + return new Type[] { GetAssetReferenceTargetType(assetReferenceType) }; + } + + /// + /// Validate an asset against a list of AssetReferenceUIRestrictions. + /// + /// The restrictions to apply. + /// The asset to validate. + /// Returns true if the asset passes all restrictions. Otherwise false. + /// Throws if Addressable Settings have not been created. + /// Throws if restrictions or asset is null. + public static bool ValidateAssetReferenceRestrictions(List restrictions, UnityEngine.Object asset) + { + return ValidateAssetReferenceRestrictions(restrictions, asset, out _); + } + + /// + /// Validate an asset against a list of AssetReferenceUIRestrictions. + /// + /// The restrictions to apply. + /// The asset to validate. + /// The first failed restriction. null if no restrictions failed. + /// Returns true if the asset passes all restrictions. Otherwise false. + /// Throws if Addressable Settings have not been created. + /// Throws if restrictions or asset is null. + public static bool ValidateAssetReferenceRestrictions(List restrictions, UnityEngine.Object asset, out AssetReferenceUIRestriction failedRestriction) + { + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) throw new Exception("Addressable Settings have not been created."); + + _ = restrictions ?? throw new ArgumentNullException(nameof(restrictions)); + _ = asset ?? throw new ArgumentNullException(nameof(asset)); + + for (int i = 0; i < restrictions.Count; i++) + { + if (restrictions[i] is AssetReferenceUILabelRestriction labels) + { + /* Unity, in all its wisdom, have apparently decided not to implement their AssetReferenceRestriction attributes in some versions(?) + * So, to compensate, we're going to manually validate the label restriction attribute, so atleast that works. */ + + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(asset)); + + var entry = AddressableAssetSettingsDefaultObject.Settings.FindAssetEntry(guid, true); + + if (entry.labels.Any(x => labels.m_AllowedLabels.Contains(x)) == false) + { + failedRestriction = labels; + return false; + } + } + else if (restrictions[i].ValidateAsset(asset) == false) + { + failedRestriction = restrictions[i]; + return false; + } + } + + failedRestriction = null; + return true; + } + + internal static TAssetReference CreateAssetReferenceGuid(string guid) where TAssetReference : AssetReference + { + return (TAssetReference) Activator.CreateInstance(typeof(TAssetReference), guid); + } + + internal static TAssetReference CreateAssetReference(UnityEngine.Object obj) where TAssetReference : AssetReference + { + if (obj == null) + { + return CreateAssetReferenceGuid(null); + } + + string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + + return CreateAssetReferenceGuid(guid); + } + + internal static AddressableAssetEntry CreateFakeAddressableAssetEntry(string guid) + { + var entry = (AddressableAssetEntry) FormatterServices.GetUninitializedObject(typeof(AddressableAssetEntry)); + + OdinAddressableReflection.AddressableAssetEntry_mGUID_Field.SetValue(entry, guid); + + return entry; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta new file mode 100644 index 000000000..e70a06b2d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/AddressablesInspectors.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ba1664ec1a0467641a742eaadae146d4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta new file mode 100644 index 000000000..5d9fdc992 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6384593779a7421881db64cdb25db4c5 +timeCreated: 1718984862 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs new file mode 100644 index 000000000..2cd9ba30f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs @@ -0,0 +1,30 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System.Reflection; +using UnityEditor.AddressableAssets.Settings; + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor.Internal +{ + internal static class OdinAddressableReflection + { + public static FieldInfo AddressableAssetEntry_mGUID_Field; + + static OdinAddressableReflection() + { + AddressableAssetEntry_mGUID_Field = typeof(AddressableAssetEntry).GetField("m_GUID", BindingFlags.Instance | BindingFlags.NonPublic); + } + + internal static void EnsureConstructed() { } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta new file mode 100644 index 000000000..7924c60a1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c1a8e9ae60bf4edebd0ec6052eb9064e +timeCreated: 1718984883 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs new file mode 100644 index 000000000..ea9b15ad0 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs @@ -0,0 +1,46 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR +#if SIRENIX_INTERNAL +using System.Collections; +using System.Reflection; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.OdinInspector.Modules.Addressables.Editor.Internal; + +[assembly: RegisterValidator(typeof(OdinAddressableReflectionValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor.Internal +{ + public class OdinAddressableReflectionValidator : GlobalValidator + { + public override IEnumerable RunValidation(ValidationResult result) + { + OdinAddressableReflection.EnsureConstructed(); + + FieldInfo[] fields = typeof(OdinAddressableReflection).GetFields(BindingFlags.Static | BindingFlags.Public); + + for (var i = 0; i < fields.Length; i++) + { + if (fields[i].IsLiteral) + { + continue; + } + + if (fields[i].GetValue(null) != null) + { + continue; + } + + result.AddError($"[Odin Addressable Module]: {fields[i].Name} was not found."); + } + + return null; + } + } +} +#endif +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta new file mode 100644 index 000000000..452199838 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Internal/OdinAddressableReflectionValidator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 97bf306f5a4249b192921db9152934f6 +timeCreated: 1718984873 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef new file mode 100644 index 000000000..c6d4c05bc --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef @@ -0,0 +1,29 @@ +{ + "name": "Sirenix.OdinInspector.Modules.Unity.Addressables", + "references": [ + "Unity.Addressables", + "Unity.Addressables.Editor", + "Sirenix.Serialization", + "Sirenix.OdinInspector.Attributes", + "Sirenix.OdinInspector.Editor", + "Sirenix.Utilities.Editor", + "Sirenix.Utilities", + "Sirenix.OdinValidator.Editor" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [ + "Sirenix.Serialization.dll", + "Sirenix.OdinInspector.Attributes.dll", + "Sirenix.OdinInspector.Editor.dll", + "Sirenix.Utilities.Editor.dll", + "Sirenix.Utilities.dll", + "Sirenix.OdinValidator.Editor.dll" + ], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta new file mode 100644 index 000000000..92035b342 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3b4d8e09c665bfa47849130d8695171e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta new file mode 100644 index 000000000..6d91f7e95 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b568c1d508ce0b74eb0025b8501d1c1e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs new file mode 100644 index 000000000..fc6730f6d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs @@ -0,0 +1,98 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using UnityEngine; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using UnityEngine.AddressableAssets; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +#if ODIN_VALIDATOR_3_1 +[assembly: RegisterValidationRule(typeof(AssetLabelReferenceValidator), Description = + "This validator ensures that AssetLabelReferences marked with the Required attribute display an error " + + "message if they are not set. It can also be configured to require that all AssetLabelReferences be set " + + "by default; the Optional attribute can then be used to exclude specific AssetLabelReferences from " + + "validation.")] +#else +[assembly: RegisterValidator(typeof(AssetLabelReferenceValidator))] +#endif + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + /// + /// Validator for AssetLabelReference values. + /// + public class AssetLabelReferenceValidator : ValueValidator + { + [Tooltip("If enabled, the validator will display an error message if the AssetLabelReference is not set. " + + "If disabled, the validator will only display an error message if the AssetLabelReference is set, but the " + + "assigned label does not exist.")] + [ToggleLeft] + public bool RequiredByDefault; + + private bool required; + private bool optional; + private string requiredMessage; + + protected override void Initialize() + { + var requiredAttr = this.Property.GetAttribute(); + + this.requiredMessage = requiredAttr?.ErrorMessage ?? $"{this.Property.NiceName} is required."; + + if (this.RequiredByDefault) + { + required = true; + optional = Property.GetAttribute() != null; + } + else + { + required = requiredAttr != null; + optional = false; + } + } + + protected override void Validate(ValidationResult result) + { + // If the Addressables settings have not been created, nothing else is really valid. + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) + { + result.AddError("Addressables Settings have not been created.") + .WithButton("Open Settings Window", () => OdinAddressableUtility.OpenGroupsWindow()); + return; + } + + var value = Value?.labelString; + + if (string.IsNullOrEmpty(value)) + { + if (optional == false && required) // Optional == false & required? Nice. + { + result.AddError(requiredMessage).EnableRichText(); + } + } + else + { + var labels = AddressableAssetSettingsDefaultObject.Settings.GetLabels(); + + if (labels.Contains(value) == false) + { + result.AddError($"Label {value} has not been created as a label.") + .WithButton("Open Label Settings", () => OdinAddressableUtility.OpenLabelsWindow()); + } + } + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta new file mode 100644 index 000000000..0922b7b1f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetLabelReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fcaf7dc3b9a98a545b301a1ea175055b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs new file mode 100644 index 000000000..72a2625e6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs @@ -0,0 +1,284 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor.AddressableAssets.Settings; +using UnityEngine.AddressableAssets; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +#if ODIN_VALIDATOR_3_1 +[assembly: RegisterValidationRule(typeof(AssetReferenceValidator), Description = + "This validator provides robust integrity checks for your asset references within Unity. " + + "It validates whether an asset reference has been assigned, and if it's missing, raises an error. " + + "It further checks the existence of the main asset at the assigned path, ensuring it hasn't been " + + "inadvertently deleted or moved. The validator also verifies if the assigned asset is addressable " + + "and, if not, offers a fix to make it addressable. Moreover, it ensures the asset adheres to " + + "specific label restrictions set through the AssetReferenceUILabelRestriction attribute. " + + "Lastly, it performs checks on any sub-object linked to the asset, making sure it hasn't gone missing. " + + "This comprehensive validation system prevents hard-to-spot bugs and errors, " + + "fostering a more robust and efficient development workflow.")] +#else +[assembly: RegisterValidator(typeof(AssetReferenceValidator))] +#endif + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class AssetReferenceValidator : ValueValidator + { + [Tooltip("If true and the AssetReference is not marked with the Optional attribute, " + + "the validator will display an error message if the AssetReference is not set. " + + "If false, the validator will only display an error message if the AssetReference is set, " + + "but the assigned asset does not exist.")] + [ToggleLeft] + public bool RequiredByDefault; + + private bool required; + private bool optional; + private string requiredMessage; + + private List restrictions; + + protected override void Initialize() + { + var requiredAttr = this.Property.GetAttribute(); + + this.requiredMessage = requiredAttr?.ErrorMessage ?? $"{this.Property.NiceName} is required."; + + if (this.RequiredByDefault) + { + this.required = true; + this.optional = this.Property.GetAttribute() != null; + } + else + { + this.required = requiredAttr != null; + this.optional = false; + } + + this.restrictions = new List(); + foreach (var attr in this.Property.Attributes) + { + if (attr is AssetReferenceUIRestriction r) + { + this.restrictions.Add(r); + } + } + } + + protected override void Validate(ValidationResult result) + { + // If the Addressables settings have not been created, nothing else is really valid. + if (AddressableAssetSettingsDefaultObject.SettingsExists == false) + { + result.AddError("Addressables Settings have not been created.") + .WithButton("Open Settings Window", () => OdinAddressableUtility.OpenGroupsWindow()); + return; + } + + var assetReference = this.Value; + var assetReferenceHasBeenAssigned = !string.IsNullOrEmpty(assetReference?.AssetGUID); + + // No item has been assigned. + if (!assetReferenceHasBeenAssigned) + { + if (optional == false && required) // Optional == false & required? Nice. + { + result.AddError(this.requiredMessage).EnableRichText(); + } + + return; + } + + var assetPath = AssetDatabase.GUIDToAssetPath(assetReference.AssetGUID); + var mainAsset = AssetDatabase.LoadMainAssetAtPath(assetPath); + + // The item has been assigned, but is now missing. + if (mainAsset == null) + { + result.AddError($"The previously assigned main asset with path '{assetPath}' is missing. GUID '{assetReference.AssetGUID}'"); + return; + } + + var addressableAssetEntry = AddressableAssetSettingsDefaultObject.Settings.FindAssetEntry(assetReference.AssetGUID, true); + var isAddressable = addressableAssetEntry != null; + + // Somehow an item sneaked through all of unity's validation measures and ended up not being addressable + // while still ending up in the asset reference object field. + if (!isAddressable) + { + result.AddError("Assigned item is not addressable.") + .WithFix("Make Addressable", args => OdinAddressableUtility.MakeAddressable(mainAsset, args.Group)); + } + // Check the assigned item against any and all label restrictions. + else + { + if (OdinAddressableUtility.ValidateAssetReferenceRestrictions(restrictions, mainAsset, out var failedRestriction) == false) + { + if (failedRestriction is AssetReferenceUILabelRestriction labelRestriction) + { + result.AddError($"Asset reference is restricted to items with these specific labels '{string.Join(", ", labelRestriction.m_AllowedLabels)}'. The currently assigned item has none of them.") + .WithFix("Add Labels", args => SetLabels(mainAsset, args.AssetLabels)); + } + else + { + result.AddError("Restriction failed: " + failedRestriction.ToString()); + } + } + } + + // The assigned item had a sub object, but it's missing. + if (!string.IsNullOrEmpty(assetReference.SubObjectName)) + { + var subObjects = OdinAddressableUtility.EnumerateAllActualAndVirtualSubAssets(mainAsset, assetPath); + + var hasMissingSubObject = true; + + foreach (var subObject in subObjects) + { + if (subObject.name == assetReference.SubObjectName) + { + hasMissingSubObject = false; + break; + } + } + + if (hasMissingSubObject) + { + result.AddError($"The previously assigned sub asset with name '{assetReference.SubObjectName}' is missing.").EnableRichText(); + } + } + + if (assetReference.ValidateAsset(mainAsset) || assetReference.ValidateAsset(assetPath)) + return; + + if (assetReference is AssetReferenceSprite && assetReference.editorAsset is Sprite) + return; + + result.AddError($"{assetReference.GetType().GetNiceFullName()}.ValidateAsset failed to validate assigned asset."); + } + + private static void SetLabels(UnityEngine.Object obj, List assetLabels) + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(obj)); + var entry = settings.FindAssetEntry(guid, false); + + foreach (var assetLabel in assetLabels.Where(a => a.Toggled)) + { + entry.SetLabel(assetLabel.Label, true, false, false); + } + + settings.SetDirty(AddressableAssetSettings.ModificationEvent.LabelAdded, entry, false, true); + } + + private class MakeAddressableFixArgs + { + [ValueDropdown(nameof(GetGroups))] + [OnInspectorInit(nameof(SelectDefault))] + public AddressableAssetGroup Group; + + private void SelectDefault() + { + this.Group = AddressableAssetSettingsDefaultObject.SettingsExists + ? AddressableAssetSettingsDefaultObject.Settings.DefaultGroup + : null; + } + + private static IEnumerable GetGroups() + { + return !AddressableAssetSettingsDefaultObject.SettingsExists + ? Enumerable.Empty() + : AddressableAssetSettingsDefaultObject.Settings.groups + .Where(group => !group.ReadOnly) + .Select(group => new ValueDropdownItem(group.Name, group)); + } + + [Button(SdfIconType.ListNested), PropertySpace(8f)] + private void OpenAddressablesGroups() => OdinAddressableUtility.OpenGroupsWindow(); + } + + private class AddLabelsFixArgs + { + [HideIf("@true")] + public List AssetLabels + { + get + { + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return this.assetLabels; + + var settings = AddressableAssetSettingsDefaultObject.Settings; + var labels = settings + .GetLabels() + .Select(l => new AssetLabel { Label = l, Toggled = false }) + .ToList(); + + foreach (var assetLabel in this.assetLabels) + { + var label = labels.FirstOrDefault(l => l.Label == assetLabel.Label); + + if (label != null) + { + label.Toggled = assetLabel.Toggled; + } + } + + this.assetLabels = labels; + return this.assetLabels; + } + } + + private List assetLabels = new List(); + + [OnInspectorGUI] + private void Draw() + { + var togglesRect = EditorGUILayout.GetControlRect(false, Mathf.CeilToInt(this.AssetLabels.Count / 2f) * 20f); + + for (var i = 0; i < this.AssetLabels.Count; i++) + { + var assetLabel = this.AssetLabels[i]; + var toggleRect = togglesRect.SplitGrid(togglesRect.width / 2f, 20, i); + assetLabel.Toggled = GUI.Toggle(toggleRect, assetLabel.Toggled, assetLabel.Label); + } + + if (!AddressableAssetSettingsDefaultObject.SettingsExists) return; + + GUILayout.Space(8f); + + var buttonsRect = EditorGUILayout.GetControlRect(false, 20f); + + if (SirenixEditorGUI.SDFIconButton(buttonsRect, "Open Addressables Labels", SdfIconType.TagsFill)) + { + OdinAddressableUtility.OpenLabelsWindow(); + } + } + } + + private class AssetLabel + { + public bool Toggled; + public string Label; + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta new file mode 100644 index 000000000..50e9722f2 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/AssetReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b44b08a1f58a83149988fde5ac600fe4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs new file mode 100644 index 000000000..d5971a129 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs @@ -0,0 +1,205 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor.AddressableAssets.Settings; +using System.Collections; +using System; +using Sirenix.OdinValidator.Editor; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidationRule(typeof(CheckDuplicateBundleDependenciesValidator), + Description = "This validator detects potential duplicate asset dependencies in an addressable group, without the need for a build. " + + "For instance, imagine two prefabs in separate groups, both referencing the same material. Each group would then include the material " + + "and all its associated dependencies. " + + "To address this, the material should be marked as Addressable, either with one of the prefabs or in a distinct group.\n\n" + + "Fixes: Executing the fix will make the dependency addressable and move it to the specified group.\n\n" + + "Exceptions: It's important to note that duplicate assets aren't inherently problematic. For example, if certain assets are " + + "never accessed by the same user group, such as region-specific assets, these duplications might be desired or at least inconsequential. " + + "As every project is unique, decisions concerning duplicate asset dependencies should be considered on a case-by-case basis.")] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class CheckDuplicateBundleDependenciesValidator : GlobalValidator + { + private static Dictionary> dependencyGroupMap = new Dictionary>(); + + [Tooltip("The severity of the validation result.")] + public ValidatorSeverity ValidatorSeverity = ValidatorSeverity.Warning; + + [Tooltip("Assets to ignore when validating.")] + [LabelText("Ignored GUIDs"), CustomValueDrawer(nameof(DrawGUIDEntry))] + public List IgnoredGUIDs = new List(); + + public override IEnumerable RunValidation(ValidationResult result) + { + dependencyGroupMap.Clear(); + + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + foreach (var addressableAssetGroup in addressableAssetSettings.groups) + { + if (addressableAssetGroup == null) continue; + + foreach (var addressableAssetEntry in addressableAssetGroup.entries) + { + var dependencyAssetPaths = AssetDatabase.GetDependencies(addressableAssetEntry.AssetPath) + .Where(assetPath => !assetPath.EndsWith(".cs", StringComparison.OrdinalIgnoreCase) && + !assetPath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)); + + foreach (var dependencyAssetPath in dependencyAssetPaths) + { + var dependencyGUID = new GUID(AssetDatabase.AssetPathToGUID(dependencyAssetPath)); + + if (this.IgnoredGUIDs.Contains(dependencyGUID.ToString())) continue; + + var dependencyAddressableAssetEntry = addressableAssetSettings.FindAssetEntry(dependencyGUID.ToString()); + + var isAddressable = dependencyAddressableAssetEntry != null; + if (isAddressable) continue; + + if (!dependencyGroupMap.ContainsKey(dependencyGUID)) + { + dependencyGroupMap.Add(dependencyGUID, new List()); + } + + if (!dependencyGroupMap[dependencyGUID].Contains(addressableAssetGroup.Name)) + { + dependencyGroupMap[dependencyGUID].Add(addressableAssetGroup.Name); + } + } + } + } + + foreach (var kvp in dependencyGroupMap) + { + var dependencyGUID = kvp.Key; + var groups = kvp.Value; + + if (groups.Count > 1) + { + var assetPath = AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()); + var message = $"{assetPath} is duplicated in these groups: {string.Join(", ", groups)}"; + + result.Add(this.ValidatorSeverity, message).WithFix(args => + { + if (args.FixChoice == FixChoice.Ignore) + { + var sourceType = args.IgnoreForEveryone ? ConfigSourceType.Project : ConfigSourceType.Local; + var data = RuleConfig.Instance.GetRuleData(sourceType); + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + RuleConfig.Instance.SetAndSaveRuleData(data, sourceType); + return; + } + + var obj = AssetDatabase.LoadAssetAtPath(assetPath, typeof(UnityEngine.Object)); + AddressableAssetGroup group; + + if (args.Group == "Create New Group") + { + if (args.GroupName.IsNullOrWhitespace()) return; + + group = addressableAssetSettings.FindGroup(args.GroupName); + + if (group == null) + { + group = addressableAssetSettings.CreateGroup(args.GroupName, false, false, false, null); + } + } + else + { + group = addressableAssetSettings.FindGroup(args.Group); + + if (group == null) + { + group = addressableAssetSettings.CreateGroup(args.Group, false, false, false, null); + } + } + + OdinAddressableUtility.MakeAddressable(obj, group); + }, false).WithModifyRuleDataContextClick("Ignore", data => + { + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + }).SetSelectionObject(AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()))); + } + } + } + + private string DrawGUIDEntry(string guid) + { + var assetPath = AssetDatabase.GUIDToAssetPath(guid); + EditorGUILayout.TextArea(assetPath, SirenixGUIStyles.MultiLineLabel); + EditorGUILayout.TextField(guid); + return guid; + } + + private enum FixChoice + { + AddToGroup, + Ignore, + } + + private class FixArgs + { + [EnumToggleButtons, HideLabel] + public FixChoice FixChoice; + + [PropertySpace(10)] + [ValueDropdown("Groups")] + //[Title("Group To Add To", TitleAlignment = TitleAlignments.Centered)] + [ShowIf(nameof(FixChoice), FixChoice.AddToGroup, Animate = false)] + public string Group = "Duplicate Asset Isolation"; + + [ValidateInput(nameof(ValidateGroupName), "The group name cannot be empty")] + [ShowIf(nameof(ShowNewGroupName), Animate = false)] + public string GroupName; + + [LabelWidth(120f)] + [PropertySpace(10)] + [ShowIf("FixChoice", FixChoice.Ignore, Animate = false)] + public bool IgnoreForEveryone = true; + + [OnInspectorGUI] + [PropertySpace(10)] + [DetailedInfoBox("Note that duplicate assets may not always be an issue", "Note that duplicate assets may not always be an issue. If assets will never be requested by the same set of users (for example, region-specific assets), then duplicate dependencies may be desired, or at least inconsequential. Each Project is unique, so fixing duplicate asset dependencies should be evaluated on a case by case basis")] + private void Dummy() { } + + private bool ShowNewGroupName => this.FixChoice != FixChoice.Ignore && this.Group == "Create New Group"; + + private bool ValidateGroupName() => !this.GroupName.IsNullOrWhitespace(); + + private IEnumerable Groups() + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + return addressableAssetSettings == null + ? Enumerable.Empty() + : addressableAssetSettings.groups + .Where(group => group != null && group.Name != "Built In Data") + .Select(group => group.Name) + .Append("Duplicate Asset Isolation") + .Prepend("Create New Group"); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta new file mode 100644 index 000000000..46bac7b7a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckDuplicateBundleDependenciesValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bdc8ee2cf75a17644a0bd81a965cc2e0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs new file mode 100644 index 000000000..913fd18d3 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs @@ -0,0 +1,175 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEditor; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.Utilities.Editor; +using System.Collections; +using System; +using System.IO; +using Sirenix.OdinValidator.Editor; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidationRule(typeof(CheckResourcesToAddressableDuplicateDependenciesValidator), + Description = "This validator identifies dependencies that are duplicated in both addressable groups and the \"Resources\" folder.\n\n" + + "These duplications mean that data will be included in both the application build and the addressables build.\n\n" + + "You can decide to simply ignore these duplicated dependencies if this behavior is desired, or use the provided fix " + + "to move the asset outside of the \"Resources\" folder.")] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class CheckResourcesToAddressableDuplicateDependenciesValidator : GlobalValidator + { + [Tooltip("The severity of the validation result.")] + public ValidatorSeverity ValidatorSeverity = ValidatorSeverity.Warning; + + [Tooltip("Assets to ignore when validating.")] + [LabelText("Ignored GUIDs"), CustomValueDrawer(nameof(DrawGUIDEntry))] + public List IgnoredGUIDs = new List(); + + public override IEnumerable RunValidation(ValidationResult result) + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + foreach (var addressableAssetGroup in addressableAssetSettings.groups) + { + if (addressableAssetGroup == null) continue; + + foreach (var addressableAssetEntry in addressableAssetGroup.entries) + { + var dependencyAssetPaths = AssetDatabase.GetDependencies(addressableAssetEntry.AssetPath) + .Where(assetPath => !assetPath.EndsWith(".cs", StringComparison.OrdinalIgnoreCase) && + !assetPath.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)); + + foreach (var dependencyAssetPath in dependencyAssetPaths) + { + var dependencyGUID = new GUID(AssetDatabase.AssetPathToGUID(dependencyAssetPath)); + + if (this.IgnoredGUIDs.Contains(dependencyGUID.ToString())) continue; + + var dependencyAddressableAssetEntry = addressableAssetSettings.FindAssetEntry(dependencyGUID.ToString()); + + var isAddressable = dependencyAddressableAssetEntry != null; + if (isAddressable) continue; + if (!IsInsideResourcesFolder(dependencyAssetPath)) continue; + + result.Add(this.ValidatorSeverity, $"{dependencyAssetPath} is duplicated in addressable data and resource folders.") + .WithFix(args => + { + if (args.FixChoice == FixChoice.Ignore) + { + var sourceType = args.IgnoreForEveryone ? ConfigSourceType.Project : ConfigSourceType.Local; + var data = RuleConfig.Instance.GetRuleData(sourceType); + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + RuleConfig.Instance.SetAndSaveRuleData(data, sourceType); + return; + } + + if (!ValidNewFolder(args.NewFolder, out _)) return; + + if (!AssetDatabase.IsValidFolder(args.NewFolder)) + { + Directory.CreateDirectory(new DirectoryInfo(args.NewFolder).FullName); + AssetDatabase.Refresh(); + } + + var newPath = $"{args.NewFolder}/{Path.GetFileName(dependencyAssetPath)}"; + AssetDatabase.MoveAsset(dependencyAssetPath, newPath); + }, false).WithModifyRuleDataContextClick("Ignore", data => + { + data.IgnoredGUIDs.Add(dependencyGUID.ToString()); + }).SetSelectionObject(AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(dependencyGUID.ToString()))); + + yield break; + } + } + } + } + + private string DrawGUIDEntry(string guid) + { + var assetPath = AssetDatabase.GUIDToAssetPath(guid); + EditorGUILayout.TextArea(assetPath, SirenixGUIStyles.MultiLineLabel); + EditorGUILayout.TextField(guid); + return guid; + } + + private static bool IsInsideResourcesFolder(string path) + { + var pathElements = path.Split('/'); + + foreach (var pathElement in pathElements) + { + if (pathElement.Equals("Resources", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + + return false; + } + + private static bool ValidNewFolder(string path, out string message) + { + if (IsInsideResourcesFolder(path)) + { + message = "The asset cannot be moved into a 'Resources' folder"; + return false; + } + + if (!path.StartsWith("Assets/")) + { + message = "The asset must be inside the 'Assets' folder"; + return false; + } + + message = "The folder is valid"; + return true; + } + + private enum FixChoice + { + MoveAsset, + Ignore, + } + private class FixArgs + { + [HideLabel] + [EnumToggleButtons] + public FixChoice FixChoice; + + [FolderPath] + [PropertySpace(10)] + [ValidateInput(nameof(ValidateFolderPath))] + [ShowIf("FixChoice", FixChoice.MoveAsset, Animate = false)] + public string NewFolder = "Assets/Resources_moved"; + + [LabelWidth(120f)] + [PropertySpace(10)] + [ShowIf("FixChoice", FixChoice.Ignore, Animate = false)] + public bool IgnoreForEveryone = true; + + private bool ValidateFolderPath(string path, ref string message) + { + return ValidNewFolder(path, out message); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta new file mode 100644 index 000000000..38c4cf058 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f75aebe03a9aa4a4b82d2b54dcc34de5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs new file mode 100644 index 000000000..58730880c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.OdinInspector.Modules.Addressables.Editor; +using UnityEngine.AddressableAssets; + +[assembly: RegisterValidator(typeof(DisallowAddressableSubAssetFieldAttributeValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + /// + /// Validator for the DisallowAddressableSubAssetFieldAttribute. + /// + public class DisallowAddressableSubAssetFieldAttributeValidator : AttributeValidator + { + protected override void Validate(ValidationResult result) + { + if (this.Value != null && string.IsNullOrEmpty(this.Value.SubObjectName) == false) + { + result.AddError("Sub-asset references is not allowed on this field.") + .WithFix("Remove Sub-Asset", () => this.Value.SubObjectName = null, true); + } + } + } + +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta new file mode 100644 index 000000000..fd552b64d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5775d33ffc1143149c4f425f693b04b6 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs new file mode 100644 index 000000000..1bd786d10 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs @@ -0,0 +1,59 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR && ODIN_VALIDATOR_3_1 + +#if !SIRENIX_INTERNAL +#pragma warning disable +#endif + +using System.Collections.Generic; +using UnityEditor.AddressableAssets; +using Sirenix.OdinInspector.Editor.Validation; +using UnityEditor.AddressableAssets.Settings; +using System.Collections; +using Sirenix.OdinInspector.Modules.Addressables.Editor; + +[assembly: RegisterValidator(typeof(MissingAddressableGroupReferenceValidator))] + +namespace Sirenix.OdinInspector.Modules.Addressables.Editor +{ + public class MissingAddressableGroupReferenceValidator : GlobalValidator + { + public override IEnumerable RunValidation(ValidationResult result) + { + var addressableAssetSettings = AddressableAssetSettingsDefaultObject.Settings; + + if (addressableAssetSettings == null) yield break; + + var missingGroupIndices = new List(); + + for (var i = 0; i < addressableAssetSettings.groups.Count; i++) + { + var group = addressableAssetSettings.groups[i]; + + if (group == null) + { + missingGroupIndices.Add(i); + } + } + + if (missingGroupIndices.Count > 0) + { + result.Add(ValidatorSeverity.Error, "Addressable groups contains missing references").WithFix("Delete missing reference", () => + { + for (var i = missingGroupIndices.Count - 1; i >= 0; i--) + { + addressableAssetSettings.groups.RemoveAt(missingGroupIndices[i]); + addressableAssetSettings.SetDirty(AddressableAssetSettings.ModificationEvent.GroupRemoved, null, true, true); + } + }); + } + } + } +} + +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta new file mode 100644 index 000000000..6297bc290 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/Validators/MissingAddressableGroupReferenceValidator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ae55abdaf19ef4498d1a2fbe1bd9f9b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt new file mode 100644 index 000000000..e3fcfc8c1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt @@ -0,0 +1,26 @@ +ManifestVersion: 1 +ModuleID: Unity.Addressables +ModuleVersion: 1.1.0.11 +ModuleFiles: + AddressablesInspectors.cs + AddressablesInspectors.cs.meta + Internal.meta + Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef + Sirenix.OdinInspector.Modules.Unity.Addressables.asmdef.meta + Validators.meta + Internal/OdinAddressableReflection.cs + Internal/OdinAddressableReflection.cs.meta + Internal/OdinAddressableReflectionValidator.cs + Internal/OdinAddressableReflectionValidator.cs.meta + Validators/AssetLabelReferenceValidator.cs + Validators/AssetLabelReferenceValidator.cs.meta + Validators/AssetReferenceValidator.cs + Validators/AssetReferenceValidator.cs.meta + Validators/CheckDuplicateBundleDependenciesValidator.cs + Validators/CheckDuplicateBundleDependenciesValidator.cs.meta + Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs + Validators/CheckResourcesToAddressableDuplicateDependenciesValidator.cs.meta + Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs + Validators/DisallowAddressableSubAssetFieldAttributeValidator.cs.meta + Validators/MissingAddressableGroupReferenceValidator.cs + Validators/MissingAddressableGroupReferenceValidator.cs.meta diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta new file mode 100644 index 000000000..13db952f1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Addressables/manifest.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dd807ecc172834f5d8293df03468d63b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.meta new file mode 100644 index 000000000..7d172828d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eebc052c03c774117bd0aac46525a118 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor.meta new file mode 100644 index 000000000..2711bcef9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 175cafb710462ef489cbf56cb46c97d5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs.meta new file mode 100644 index 000000000..dd923d856 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3459a30abd1a4e979488e906febc27e7 +timeCreated: 1707714315 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset new file mode 100644 index 000000000..79c7e01b9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset @@ -0,0 +1,29 @@ +%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: 2fc91909e6444cb29aacb664f2098c7e, type: 3} + m_Name: OdinLocalizationConfig + m_EditorClassIdentifier: + recordUndosForAssetTableEntries: 1 + assetRowHeight: 128 + useSyntaxHighlighter: 1 + placeholderColor: + lightColor: {r: 0.743147, g: 0.9433962, b: 0.9242815, a: 1} + darkColor: {r: 0, g: 0.5882353, b: 0.5333334, a: 1} + selectorColor: + lightColor: {r: 1, g: 0.7727525, b: 0.3632075, a: 1} + darkColor: {r: 1, g: 0.6470588, b: 0, a: 1} + formatterColor: + lightColor: {r: 0.9921569, g: 0.9855571, b: 0.8823529, a: 1} + darkColor: {r: 0.9607843, g: 0.9607843, b: 0.8627451, a: 1} + scrollSpeed: 24 + invertMouseDragNavigation: 1 + mouseDragSpeed: 1 diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset.meta new file mode 100644 index 000000000..7107a759f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c09625914af7d2d4e92c3653d5f15bd7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs new file mode 100644 index 000000000..382a88e64 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs @@ -0,0 +1,173 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Reflection.Editor; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEngine; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Configs +{ + [GlobalConfig("Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs")] + public class OdinLocalizationConfig : GlobalConfig + { + public class ThemeColorDrawer : OdinValueDrawer + { + protected override void Initialize() + { + base.Initialize(); + this.Property.State.Expanded = false; + } + + protected override void DrawPropertyLayout(GUIContent label) + { + SirenixEditorGUI.BeginBox(string.Empty); + { + SirenixEditorGUI.BeginBoxHeader(); + { + GUILayout_Internal.BeginRow(); + { + GUILayout_Internal.BeginColumn(LayoutSize.Pixels(EditorGUIUtility.labelWidth + 6.0f)); + { + this.Property.State.Expanded = EditorGUILayout.Foldout(this.Property.State.Expanded, + $"{label.text} ({(EditorGUIUtility.isProSkin ? "Dark" : "Light")})", + true); + } + GUILayout_Internal.EndColumn(); + + GUILayout_Internal.BeginColumn(LayoutSize.Auto); + { + this.Property.Children[nameof(ThemeColor.Color)].Draw(null); + } + GUILayout_Internal.EndColumn(); + } + GUILayout_Internal.EndRow(); + } + SirenixEditorGUI.EndBoxHeader(); + + bool toggle = this.ValueEntry.ValueState != PropertyValueState.NullReference && this.Property.State.Expanded; + + if (SirenixEditorGUI.BeginFadeGroup(this, toggle)) + { + GUILayout.BeginHorizontal(); + this.Property.Children[nameof(ThemeColor.lightColor)].Draw(); + GUILayout.Space(3.5f); + GUILayout.EndHorizontal(); + + GUILayout.BeginHorizontal(); + this.Property.Children[nameof(ThemeColor.darkColor)].Draw(); + GUILayout.Space(3.5f); + GUILayout.EndHorizontal(); + } + + SirenixEditorGUI.EndFadeGroup(); + } + SirenixEditorGUI.EndBox(); + + if (this.Property.State.Expanded) + { + GUILayout.Space(4.0f); + } + } + } + + [Serializable] + public class ThemeColor + { + [ShowInInspector] + public Color Color + { + get => EditorGUIUtility.isProSkin ? this.darkColor : this.lightColor; + + set + { + if (EditorGUIUtility.isProSkin) + { + this.darkColor = value; + } + else + { + this.lightColor = value; + } + } + } + + public Color lightColor; + public Color darkColor; + + public ThemeColor(Color lightColor, Color darkColor) + { + this.lightColor = lightColor; + this.darkColor = darkColor; + } + + public static implicit operator Color(ThemeColor color) => color.Color; + } + + [ShowInInspector] + [BoxGroup("User Interface")] + [Range(96, 1024)] + public int assetRowHeight = 128; + + [BoxGroup("Syntax Highlighting")] + public bool useSyntaxHighlighter = true; + + [EnableIf(nameof(useSyntaxHighlighter))] + [BoxGroup("Syntax Highlighting")] + public ThemeColor placeholderColor = new ThemeColor(new Color(0.743147f, 0.9433962f, 0.9242815f), new Color(0, 0.5882353f, 0.5333334f)); + + [EnableIf(nameof(useSyntaxHighlighter))] + [BoxGroup("Syntax Highlighting")] + public ThemeColor selectorColor = new ThemeColor(new Color(1.0f, 0.7727525f, 0.3632075f), new Color(1, 0.6470588f, 0)); + + [EnableIf(nameof(useSyntaxHighlighter))] + [BoxGroup("Syntax Highlighting")] + public ThemeColor formatterColor = new ThemeColor(new Color(0.9921569f, 0.9855571f, 0.8823529f), new Color(0.9607843f, 0.9607843f, 0.8627451f)); + + [BoxGroup("Navigation")] + [Range(1, 1000.0f)] + public float scrollSpeed = 24.0f; + + [BoxGroup("Navigation")] + public bool invertMouseDragNavigation = true; + + [BoxGroup("Navigation")] + [Range(0.5f, 5.0f)] + public float mouseDragSpeed = 1.0f; + + [InfoBox("We couldn't find the necessary methods/classes to perform custom undo operations, therefore this option has been disabled and will be considered false even if true.", + VisibleIf = "@!OdinLocalizationReflectionValues.HasAPIForCustomUndo")] + [EnableIf("@OdinLocalizationReflectionValues.HasAPIForCustomUndo")] + [BoxGroup("Undo")] + public bool useCustomUndoHandlingForAssetCollections = true; + + [Button(ButtonSizes.Large)] + public void Reset() + { + if (!EditorUtility.DisplayDialog("Odin Localization Config", "Are you certain you want to reset your Localization config?", "Yes", "No")) + { + return; + } + + this.useCustomUndoHandlingForAssetCollections = OdinLocalizationReflectionValues.HasAPIForCustomUndo; + + this.assetRowHeight = 128; + + this.useSyntaxHighlighter = true; + this.placeholderColor = new ThemeColor(new Color(0.743147f, 0.9433962f, 0.9242815f), new Color(0, 0.5882353f, 0.5333334f)); + this.selectorColor = new ThemeColor(new Color(1.0f, 0.7727525f, 0.3632075f), new Color(1, 0.6470588f, 0)); + this.formatterColor = new ThemeColor(new Color(0.9921569f, 0.9855571f, 0.8823529f), new Color(0.9607843f, 0.9607843f, 0.8627451f)); + + this.scrollSpeed = 24.0f; + this.invertMouseDragNavigation = true; + this.mouseDragSpeed = 1.0f; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs.meta new file mode 100644 index 000000000..1801b064a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Configs/OdinLocalizationConfig.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2fc91909e6444cb29aacb664f2098c7e +timeCreated: 1707714331 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI.meta new file mode 100644 index 000000000..4ed5c121f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bf930ee5d27d4f90ab84f23d337eaaca +timeCreated: 1704811167 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs new file mode 100644 index 000000000..de4707ae7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs @@ -0,0 +1,993 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization.Metadata; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class LocalizationMetadata + { + private object lastTarget; + public object Target; + private LocalizationTableCollection localizationTableCollection; + private SearchField searchField = new SearchField(); + private string searchTerm; + private Vector2 scrollPosition; + private IMetadata toBeAdded; + private IMetadata toBeRemoved; + private Type lastMetadataTypeUnderCursor; + private StringBuilder stringBuilder = new StringBuilder(); + private OdinLocalizationEditorWindow.WindowState windowState; + + private List tags = new List + { + typeof(ExcludeEntryFromExport) + }; + + private GUIStyle _contentPadding; + private GUIStyle ContentPadding => + this._contentPadding = this._contentPadding ?? new GUIStyle + { + padding = new RectOffset(10, 10, 10, 10) + }; + + private GUIStyle _platformOverridePadding; + + private GUIStyle PlatformOverridePadding => + this._platformOverridePadding = this._platformOverridePadding ?? new GUIStyle + { + padding = new RectOffset(10, 20, 10, 10) + }; + + public LocalizationMetadata(LocalizationTableCollection localizationTableCollection, OdinLocalizationEditorWindow.WindowState windowState) + { + this.localizationTableCollection = localizationTableCollection; + this.windowState = windowState; + } + + /// + /// Adds the given metadata to the shared data of the . + /// + public void Add(IMetadata metadata) + { + this.localizationTableCollection.SharedData.Metadata.AddMetadata(metadata); + } + + /// + /// Adds the given metadata to the given . + /// + public void Add(LocalizationTable localizationTable, IMetadata metadata) + { + localizationTable.AddMetadata(metadata); + } + + /// + /// Adds the given metadata to the given . + /// + public void Add(SharedTableData.SharedTableEntry sharedTableEntry, IMetadata metadata) + { + sharedTableEntry.Metadata.AddMetadata(metadata); + } + + /// + /// Adds the given metadata to the given . + /// + public void Add(TableEntry tableEntry, IMetadata metadata) + { + tableEntry.AddMetadata(metadata); + } + + /// + /// Removes the given metadata from the shared data of the . + /// + public void Remove(IMetadata metadata) + { + this.localizationTableCollection.SharedData.Metadata.RemoveMetadata(metadata); + } + + /// + /// Removes the given metadata from the given . + /// + public void Remove(LocalizationTable localizationTable, IMetadata metadata) + { + localizationTable.RemoveMetadata(metadata); + } + + /// + /// Removes the given metadata from the given . + /// + public void Remove(SharedTableData.SharedTableEntry sharedTableEntry, IMetadata metadata) + { + sharedTableEntry.Metadata.RemoveMetadata(metadata); + } + + /// + /// Removes the given metadata from the given . + /// + public void Remove(TableEntry tableEntry, IMetadata metadata) + { + tableEntry.RemoveMetadata(metadata); + } + + /// + /// Draws the metadata for the given + /// + public float Draw(Rect rect) + { + var minWidth = 0f; + if (this.Target == null) return minWidth; + + if (Event.current.type != EventType.Repaint) + { + if (this.toBeAdded != null) + { + switch (this.Target) + { + case LocalizationTable localizationTable: + Undo.RecordObject(this.localizationTableCollection, "Localization Tables Metadata Added"); + this.Add(localizationTable, this.toBeAdded); + break; + case SharedTableData.SharedTableEntry sharedTableEntry: + Undo.RecordObject(this.localizationTableCollection.SharedData, "Localization Tables Metadata Added"); + this.Add(sharedTableEntry, this.toBeAdded); + break; + case TableEntry tableEntry: + Undo.RecordObject(tableEntry.Table, "Localization Tables Metadata Added"); + this.Add(tableEntry, this.toBeAdded); + break; + default: + Undo.RecordObject(this.localizationTableCollection.SharedData, "Localization Tables Metadata Added"); + this.Add(this.toBeAdded); + break; + } + + this.toBeAdded = null; + this.windowState.Dispose(); + } + + if (this.toBeRemoved != null) + { + switch (this.Target) + { + case LocalizationTable localizationTable: + Undo.RecordObject(this.localizationTableCollection, "Localization Tables Metadata Removed"); + this.Remove(localizationTable, this.toBeRemoved); + break; + case SharedTableData.SharedTableEntry sharedTableEntry: + Undo.RecordObject(this.localizationTableCollection.SharedData, "Localization Tables Metadata Removed"); + this.Remove(sharedTableEntry, this.toBeRemoved); + break; + case TableEntry tableEntry: + Undo.RecordObject(tableEntry.Table, "Localization Tables Metadata Removed"); + this.Remove(tableEntry, this.toBeRemoved); + break; + default: + Undo.RecordObject(this.localizationTableCollection.SharedData, "Localization Tables Metadata Removed"); + this.Remove(this.toBeRemoved); + break; + } + + this.toBeRemoved = null; + this.windowState.Dispose(); + } + } + + if (this.windowState.MetadataTree == null || this.lastTarget != this.Target) + { + this.windowState.MetadataTree?.Dispose(); + + switch (this.Target) + { + case LocalizationTable localizationTable: + this.windowState.MetadataTree = PropertyTree.Create(localizationTable); + break; + case SharedTableData.SharedTableEntry sharedTableEntry: + this.windowState.MetadataTree = PropertyTree.Create(sharedTableEntry); + break; + case TableEntry tableEntry: + { + var bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; + var entryData = typeof(TableEntry).GetProperty("Data", bindingFlags).GetValue(tableEntry); + this.windowState.MetadataTree = PropertyTree.Create(entryData); + break; + } + case LocalizationTableCollection localizationTableCollection: + this.windowState.MetadataTree = PropertyTree.Create(localizationTableCollection.SharedData); + break; + } + + this.lastTarget = this.Target; + } + + var metadataCollection = this.windowState.MetadataTree.RootProperty.Children["m_Metadata"]; + var metadataEntries = metadataCollection.Children["m_Items"].Children.ToList(); + + metadataEntries = metadataEntries + .Where(entry => !entry.Attributes.HasAttribute()) + .OrderBy(entry => !this.tags.Contains(entry.ValueEntry.TypeOfValue)) + .ThenBy(entry => entry.Name) + .ToList(); + + this.windowState.MetadataTree.BeginDraw(false); + switch (this.Target) + { + case LocalizationTable localizationTable: + minWidth = this.Draw(rect, localizationTable, "Table", metadataEntries, m => this.Add(localizationTable, m), m => this.Remove(localizationTable, m), () => this.OpenMetadataSelector(localizationTable)); + break; + case SharedTableData.SharedTableEntry sharedTableEntry: + minWidth = this.Draw(rect, this.localizationTableCollection.SharedData, "Shared Entry", metadataEntries, m => this.Add(sharedTableEntry, m), m => this.Remove(sharedTableEntry, m), () => this.OpenMetadataSelector(sharedTableEntry)); + break; + case TableEntry tableEntry: + minWidth = this.Draw(rect, tableEntry.Table, "Entry", metadataEntries, m => this.Add(tableEntry, m), m => this.Remove(tableEntry, m), () => this.OpenMetadataSelector(tableEntry)); + break; + default: + minWidth = this.Draw(rect, this.localizationTableCollection.SharedData, "Shared Table", metadataEntries, m => this.Add(m), m => this.Remove(m), () => this.OpenMetadataSelector(this.localizationTableCollection)); + break; + } + this.windowState.MetadataTree.EndDraw(); + + return minWidth; + } + + private float Draw(Rect rect, UnityEngine.Object target, string title, List metadataEntries, Action add, Action remove, Action openMetadataSelector) + { + const int headerHeight = 22; + const int addButtonAreaHeight = 40; + + EditorGUIUtility.labelWidth = 0f; + + // We only want to process events if the user's mouse is currently + // in the metadata panel so we grab some information for later. + var metadataPanelHasFocus = Event.current.IsMouseOver(rect); + var holdingControl = Event.current.control && metadataPanelHasFocus; + var holdingAlt = Event.current.alt && metadataPanelHasFocus; + + if (Event.current.OnKeyUp(KeyCode.LeftAlt)) + { + this.lastMetadataTypeUnderCursor = null; + } + + var searchAreaRect = rect.TakeFromTop(32); + EditorGUI.DrawRect(searchAreaRect.AlignBottom(1), SirenixGUIStyles.BorderColor); + + // Draw search field. + if (searchAreaRect.width > 125) + { + var titleWidth = SirenixGUIStyles.LabelCentered.CalcWidth(title) + 13; + var titleRect = searchAreaRect.AlignRight(titleWidth); + EditorGUI.DrawRect(titleRect.TakeFromLeft(1), SirenixGUIStyles.BorderColor); + this.searchTerm = this.searchField.Draw(searchAreaRect.SubXMax(titleWidth).Padding(6), this.searchTerm, + "Search for metadata..."); + GUI.Label(titleRect, title, SirenixGUIStyles.LabelCentered); + } + else + { + GUI.Label(searchAreaRect, title, SirenixGUIStyles.LabelCentered); + } + + var filteredMetadataEntries = string.IsNullOrWhiteSpace(this.searchTerm) + ? metadataEntries.ToList() + : metadataEntries.Where(metadataEntry => + { + if (FuzzySearch.Contains(this.searchTerm, metadataEntry.Info.TypeOfOwner.Name)) + { + return true; + } + + if (FuzzySearch.Contains(this.searchTerm, metadataEntry.ValueEntry?.WeakSmartValue?.ToString())) + { + return true; + } + + foreach (var child in metadataEntry.Children.Recurse()) + { + if (FuzzySearch.Contains(this.searchTerm, child.Name)) + { + return true; + } + + if (FuzzySearch.Contains(this.searchTerm, child.ValueEntry?.WeakSmartValue?.ToString())) + { + return true; + } + } + + return false; + }).ToList(); + + var metadataViewHeight = rect.height - addButtonAreaHeight; + GUILayout.BeginArea(rect.AlignTop(metadataViewHeight)); + this.scrollPosition = EditorGUILayout.BeginScrollView(this.scrollPosition, GUIStyle.none, GUI.skin.verticalScrollbar); + GUIHelper.BeginLayoutMeasuring(); + { + for (var i = 0; i < filteredMetadataEntries.Count; i++) + { + var metadataEntry = filteredMetadataEntries[i]; + var metadataHeaderRect = GUILayoutUtility.GetRect(0, headerHeight, GUILayoutOptions.ExpandWidth().ExpandHeight(false)); + var unchangedMetadataHeaderRect = metadataHeaderRect; + + var genericMenu = new GenericMenu(); + genericMenu.AddItem(new GUIContent("Delete"), false, () => + { + var metadata = (IMetadata)metadataEntry.ValueEntry.WeakSmartValue; + this.toBeRemoved = metadata; + }); + + var isTag = this.tags.Contains(metadataEntry.ValueEntry.TypeOfValue); + + if (!isTag) + { + genericMenu.AddItem(new GUIContent("Copy"), false, () => + { + var metadata = (IMetadata)metadataEntry.ValueEntry.WeakSmartValue; + Clipboard.Copy(metadata); + }); + + if (Clipboard.CanPaste()) + genericMenu.AddItem(new GUIContent("Paste"), false, () => + { + var metadata = (IMetadata)Clipboard.Paste(); + this.toBeAdded = metadata; + }); + else + genericMenu.AddDisabledItem(new GUIContent("Paste")); + + genericMenu.AddSeparator(""); + genericMenu.AddItem(new GUIContent($"{(metadataEntry.State.Expanded ? "Collapse" : "Expand")} All (Ctrl-Click)"), false, () => + { + var newState = !metadataEntry.State.Expanded; + foreach (var entry in filteredMetadataEntries) entry.State.Expanded = newState; + }); + genericMenu.AddItem(new GUIContent($"{(metadataEntry.State.Expanded ? "Collapse" : "Expand")} All Of Same Type (Alt-Click)"), false, () => + { + var newState = !metadataEntry.State.Expanded; + foreach (var entry in filteredMetadataEntries.Where(m => m.Info.TypeOfOwner == metadataEntry.Info.TypeOfOwner)) entry.State.Expanded = newState; + }); + } + + Color metadataHeaderBackground = new Color(0.243f, 0.243f, 0.243f); + + if (!isTag && holdingControl) + { + metadataHeaderBackground = new Color(0.278f, 0.278f, 0.278f); + + GUIHelper.RequestRepaint(); + } + else if (!isTag && holdingAlt) + { + if (Event.current.IsMouseOver(unchangedMetadataHeaderRect)) + { + this.lastMetadataTypeUnderCursor = metadataEntry.ValueEntry.TypeOfValue; + GUIHelper.RequestRepaint(); + } + + metadataHeaderBackground = this.lastMetadataTypeUnderCursor == metadataEntry.ValueEntry.TypeOfValue + ? new Color(0.278f, 0.278f, 0.278f) + : new Color(0.243f, 0.243f, 0.243f); + } + + if (Event.current.IsMouseOver(unchangedMetadataHeaderRect)) + { + metadataHeaderBackground = new Color(0.278f, 0.278f, 0.278f); + } + + EditorGUI.DrawRect(unchangedMetadataHeaderRect, metadataHeaderBackground); + + if (i != 0) + { + EditorGUI.DrawRect(unchangedMetadataHeaderRect.AlignTop(1), new Color(0.102f, 0.102f, 0.102f)); + } + + var foldoutTriangleRect = metadataHeaderRect.TakeFromLeft(headerHeight); + + if (!isTag) + SdfIcons.DrawIcon( + foldoutTriangleRect.Padding(6), + metadataEntry.State.Expanded ? SdfIconType.CaretDownFill : SdfIconType.CaretRightFill, + new Color(0.443f, 0.443f, 0.443f)); + + var iconRect = metadataHeaderRect.TakeFromLeft(headerHeight); + SdfIcons.DrawIcon( + iconRect.Padding(0, 4, 4, 4), + isTag ? SdfIconType.TagFill : SdfIconType.GeoAltFill, + new Color(0.933f, 0.933f, 0.933f)); + + var contextMenuIconRect = metadataHeaderRect.TakeFromRight(headerHeight); + + SdfIcons.DrawIcon(contextMenuIconRect.Padding(7), SdfIconType.ThreeDotsVertical); + + var niceName = ObjectNames.NicifyVariableName(metadataEntry.ValueEntry.TypeOfValue.GetNiceName()); + + if (metadataEntry.Info.TypeOfOwner == typeof(Comment)) + { + var headerLabelWidth = EditorStyles.label.CalcWidth(niceName) + 1; + var comment = ((string)metadataEntry.ValueEntry.WeakSmartValue).Split('\n')[0]; + var hintRect = metadataHeaderRect.AlignRight(metadataHeaderRect.width - headerLabelWidth - 10); + + if (SirenixGUIStyles.RightAlignedGreyMiniLabel.CalcWidth(comment) > hintRect.width) + { + if (hintRect.width < 30) + { + comment = ""; + } + else + { + GUI.Label(hintRect.TakeFromLeft(11), "...", SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + } + + GUI.Label(hintRect, comment, SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + else if (metadataEntry.Info.TypeOfOwner == typeof(PreloadAssetTableMetadata)) + { + var headerLabelWidth = EditorStyles.label.CalcWidth(niceName) + 1; + var preloadAssetLabel = ObjectNames.NicifyVariableName(metadataEntry.ValueEntry.WeakSmartValue.ToString()); + var hintRect = metadataHeaderRect.AlignRight(metadataHeaderRect.width - headerLabelWidth - 10); + + if (SirenixGUIStyles.RightAlignedGreyMiniLabel.CalcWidth(preloadAssetLabel) > hintRect.width) + { + if (hintRect.width < 30) + { + preloadAssetLabel = ""; + } + else + { + GUI.Label(hintRect.TakeFromLeft(11), "...", SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + } + + GUI.Label(hintRect, preloadAssetLabel, SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + else if (metadataEntry.Info.TypeOfOwner == typeof(PlatformOverride)) + { + var platformOverrides = metadataEntry.Children; + var headerLabelWidth = EditorStyles.label.CalcWidth(niceName) + 1; + var hintRect = metadataHeaderRect.AlignRight(metadataHeaderRect.width - headerLabelWidth - 10); + + this.stringBuilder.Clear(); + for (var j = 0; j < platformOverrides.Count; j++) + { + var platformOverrideInspectorProperty = platformOverrides[j]; + var platform = (RuntimePlatform)platformOverrideInspectorProperty.Children[0].ValueEntry.WeakSmartValue; + this.stringBuilder.Append(platform); + + if (j != platformOverrides.Count - 1) + { + this.stringBuilder.Append(", "); + } + } + + var platforms = this.stringBuilder.ToString(); + + if (SirenixGUIStyles.RightAlignedGreyMiniLabel.CalcWidth(platforms) > hintRect.width) + { + if (hintRect.width < 30) + { + GUI.Label(hintRect, $"[{platformOverrides.Count}]", SirenixGUIStyles.RightAlignedGreyMiniLabel); + platforms = ""; + } + else if (platformOverrides.Count > 1) + { + GUI.Label(hintRect.TakeFromLeft(11), "...", SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + } + + GUI.Label(hintRect, platforms, SirenixGUIStyles.RightAlignedGreyMiniLabel); + } + + GUI.Label(metadataHeaderRect, niceName); + + var evt = Event.current; + if (evt.OnMouseDown(contextMenuIconRect, 0, false)) + genericMenu.ShowAsContext(); + else if (evt.OnMouseDown(unchangedMetadataHeaderRect, 1, false)) genericMenu.ShowAsContext(); + + if (metadataEntry.ValueEntry.TypeOfValue == typeof(ExcludeEntryFromExport)) continue; + + if (evt.OnMouseDown(unchangedMetadataHeaderRect, 0, false)) + { + if (holdingControl) + { + var newState = !metadataEntry.State.Expanded; + foreach (var entry in filteredMetadataEntries) + { + entry.State.Expanded = newState; + } + } + else if (holdingAlt) + { + var newState = !metadataEntry.State.Expanded; + foreach (var entry in filteredMetadataEntries.Where(m => m.ValueEntry.TypeOfValue == this.lastMetadataTypeUnderCursor)) + { + entry.State.Expanded = newState; + } + } + else + { + metadataEntry.State.Expanded = !metadataEntry.State.Expanded; + } + + GUIHelper.RemoveFocusControl(); + } + + if (SirenixEditorGUI.BeginFadeGroup(metadataEntry, metadataEntry.State.Expanded)) + { + EditorGUI.DrawRect(unchangedMetadataHeaderRect.AlignBottom(1), + new Color(0.188f, 0.188f, 0.188f)); + + var contentRect = EditorGUILayout.BeginVertical(); + + if (metadataEntry.ValueEntry.TypeOfValue == typeof(Comment)) + { + EditorGUILayout.BeginVertical(this.ContentPadding); + foreach (var child in metadataEntry.Children) + { + child.Draw(null); + } + EditorGUILayout.EndVertical(); + } + else if (metadataEntry.ValueEntry.TypeOfValue == typeof(PreloadAssetTableMetadata)) + { + EditorGUILayout.BeginVertical(this.ContentPadding); + + var preloadAssetTableMetadata = (PreloadAssetTableMetadata)metadataEntry.ValueEntry.WeakSmartValue; + var btnRect = EditorGUILayout.GetControlRect(false); + var leftRect = btnRect.Split(0, 2); + var mouseOverLeft = Event.current.IsMouseOver(leftRect); + var leftActive = mouseOverLeft && Event.current.type == EventType.MouseDown && Event.current.button == 0; + var leftOn = preloadAssetTableMetadata.Behaviour == PreloadAssetTableMetadata.PreloadBehaviour.NoPreload; + + var rightRect = btnRect.Split(1, 2); + var mouseOverRight = Event.current.IsMouseOver(rightRect); + var rightActive = mouseOverRight && Event.current.type == EventType.MouseDown && Event.current.button == 0; + var rightOn = preloadAssetTableMetadata.Behaviour == PreloadAssetTableMetadata.PreloadBehaviour.PreloadAll; + + if (Event.current.type == EventType.Repaint) + { + SirenixGUIStyles.ButtonLeft.Draw(leftRect, "No Preload", mouseOverLeft, leftActive, leftOn, false); + SirenixGUIStyles.ButtonRight.Draw(rightRect, "Preload All", mouseOverRight, rightActive, rightOn, false); + } + + if (Event.current.OnMouseDown(leftRect, 0, false)) + { + preloadAssetTableMetadata.Behaviour = PreloadAssetTableMetadata.PreloadBehaviour.NoPreload; + } + else if (Event.current.OnMouseDown(rightRect, 0, false)) + { + preloadAssetTableMetadata.Behaviour = PreloadAssetTableMetadata.PreloadBehaviour.PreloadAll; + } + + EditorGUILayout.EndVertical(); + } + else if (metadataEntry.ValueEntry.TypeOfValue == typeof(PlatformOverride)) + { + this.DrawPlatformOverride(metadataEntry); + } + else + { + EditorGUILayout.BeginVertical(this.ContentPadding); + foreach (var child in metadataEntry.Children) + { + child.Draw(); + } + EditorGUILayout.EndVertical(); + } + + EditorGUILayout.EndVertical(); + } + + SirenixEditorGUI.EndFadeGroup(); + } + } + var measureRect = GUIHelper.EndLayoutMeasuring(); + EditorGUILayout.EndScrollView(); + GUILayout.EndArea(); + + var pinAddMetadataButton = measureRect.height > metadataViewHeight; + rect.TakeFromTop(pinAddMetadataButton ? metadataViewHeight : measureRect.height); + + if (metadataEntries.Count > 1) + { + EditorGUI.DrawRect(rect.TakeFromTop(1), SirenixGUIStyles.BorderColor); + } + + var addMetadataRect = rect.AlignTop(addButtonAreaHeight).AlignCenter(Mathf.Min(200, rect.width - 16)).VerticalPadding(8); + + if (GUI.Button(addMetadataRect, "Add Metadata")) + { + openMetadataSelector(); + } + + // Draw the shadow that appears under the search bar while scrolling through the metadata. + GUI.DrawTexture( + searchAreaRect.AlignBottom(10).AddY(10), + OdinLocalizationGUITextures.TopToBottomFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0, 0, 0, Mathf.InverseLerp(0f, 30f, this.scrollPosition.y) * 0.6f), + 0, + 0); + + if (measureRect.height > metadataViewHeight) + { + var pos = this.scrollPosition.y + metadataViewHeight; + // Draw the shadow that appears at the bottom of the metadata while scrolling through the metadata + GUI.DrawTexture( + rect.AlignTop(10).SubY(10), + OdinLocalizationGUITextures.BottomToTopFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0, 0, 0, Mathf.InverseLerp(measureRect.height, measureRect.height - 30, pos) * 0.6f), + 0, + 0); + } + + return measureRect.width; + } + + private void DrawPlatformOverride(InspectorProperty metadataEntry) + { + var platformOverride = (PlatformOverride)metadataEntry.ValueEntry.WeakSmartValue; + var platformOverrideDatas = (IList)metadataEntry.Children["m_PlatformOverrides"]?.ValueEntry.WeakSmartValue; + var platformOverrideDataInspectorProperties = metadataEntry.Children["m_PlatformOverrides"]?.Children; + + if (platformOverrideDatas == null) + { + return; + } + + if (platformOverrideDatas.Count == 0) + { + platformOverride.AddPlatformOverride(RuntimePlatform.WindowsPlayer, null, null, EntryOverrideType.None); + } + + for (var i = 0; i < platformOverrideDataInspectorProperties.Count; i++) + { + var platformOverrideDataInspectorProperty = platformOverrideDataInspectorProperties[i]; + var backgroundRect = EditorGUILayout.BeginVertical(this.PlatformOverridePadding); + var backgroundColor = i % 2 == 0 ? SirenixGUIStyles.ListItemColorEven : SirenixGUIStyles.ListItemColorOdd; + EditorGUI.DrawRect(backgroundRect, backgroundColor); + platformOverrideDataInspectorProperty.Children["platform"].Draw(); + platformOverrideDataInspectorProperty.Children["entryOverrideType"].Draw(); + + var entryOverrideType = (EntryOverrideType)platformOverrideDataInspectorProperty.Children + .FirstOrDefault(c => c.Info.TypeOfValue == typeof(EntryOverrideType))?.ValueEntry.WeakSmartValue; + + var entryOverrideRect = GUILayoutUtility.GetRect(0, EditorGUIUtility.singleLineHeight, GUILayoutOptions.ExpandWidth(true).ExpandHeight(false)); + + switch (entryOverrideType) + { + case EntryOverrideType.Table: + { + var tableReference = (TableReference)platformOverrideDataInspectorProperty.Children.FirstOrDefault(c => c.Info.TypeOfValue == typeof(TableReference))?.ValueEntry.WeakSmartValue; + this.DoTableGUI(entryOverrideRect, tableReference, platformOverrideDataInspectorProperty); + break; + } + case EntryOverrideType.Entry: + { + var tableReference = (TableReference)platformOverrideDataInspectorProperty.Children.FirstOrDefault(c => c.Info.TypeOfValue == typeof(TableReference)) + ?.ValueEntry.WeakSmartValue; + var tableEntryReference = (TableEntryReference)platformOverrideDataInspectorProperty.Children.FirstOrDefault(c => c.Info.TypeOfValue == typeof(TableEntryReference))?.ValueEntry.WeakSmartValue; + this.DoTableAndEntryGUI(entryOverrideRect, tableReference, tableEntryReference, platformOverrideDataInspectorProperty, false); + break; + } + + case EntryOverrideType.TableAndEntry: + { + var tableReference = (TableReference)platformOverrideDataInspectorProperty.Children.FirstOrDefault(c => c.Info.TypeOfValue == typeof(TableReference))?.ValueEntry.WeakSmartValue; + var tableEntryReference = (TableEntryReference)platformOverrideDataInspectorProperty.Children.FirstOrDefault(c => c.Info.TypeOfValue == typeof(TableEntryReference))?.ValueEntry.WeakSmartValue; + this.DoTableAndEntryGUI(entryOverrideRect, tableReference, tableEntryReference, platformOverrideDataInspectorProperty, true); + break; + } + } + + EditorGUILayout.EndVertical(); + + var xIconRect = backgroundRect.AlignRight(10).SubX(4).AlignCenterY(10); + var mouseOverX = Event.current.IsMouseOver(xIconRect); + SdfIcons.DrawIcon(xIconRect, SdfIconType.X, mouseOverX ? Color.white : EditorStyles.label.normal.textColor); + + if (Event.current.OnMouseDown(xIconRect, 0, false)) + { + var platform = (RuntimePlatform)platformOverrideDataInspectorProperty.Children[0].ValueEntry.WeakSmartValue; + platformOverride.RemovePlatformOverride(platform); + } + } + + var addButtonRect = GUILayoutUtility.GetRect(0, 40, GUILayoutOptions.ExpandWidth().ExpandHeight(false)); + EditorGUI.DrawRect(addButtonRect.AlignTop(1), new Color(0.188f, 0.188f, 0.188f)); + + if (GUI.Button(addButtonRect.Padding(8), "Add Platform Override")) + { + var selector = new EnumSelector(); + selector.SelectionConfirmed += platforms => + { + var platform = platforms.FirstOrDefault(); + platformOverride.AddPlatformOverride(platform, null, null, EntryOverrideType.None); + }; + selector.ShowInPopup(); + } + } + + private void OpenMetadataSelector(LocalizationTableCollection localizationTableCollection) + { + this.OpenMetadataSelector(localizationTableCollection.SharedData.Metadata.MetadataEntries, MetadataType.SharedTableData); + } + + private void OpenMetadataSelector(LocalizationTable localizationTable) + { + switch (localizationTable) + { + case StringTable _: + this.OpenMetadataSelector(localizationTable.MetadataEntries, MetadataType.StringTable); + break; + case AssetTable _: + this.OpenMetadataSelector(localizationTable.MetadataEntries, MetadataType.AssetTable); + break; + } + } + + private void OpenMetadataSelector(SharedTableData.SharedTableEntry sharedTableEntry) + { + switch (this.localizationTableCollection) + { + case StringTableCollection _: + this.OpenMetadataSelector(sharedTableEntry.Metadata.MetadataEntries, MetadataType.StringTableEntry, MetadataType.SharedStringTableEntry); + break; + case AssetTableCollection _: + this.OpenMetadataSelector(sharedTableEntry.Metadata.MetadataEntries, MetadataType.AssetTableEntry, MetadataType.SharedAssetTableEntry); + break; + } + } + + private void OpenMetadataSelector(TableEntry tableEntry) + { + switch (tableEntry) + { + case StringTableEntry _: + this.OpenMetadataSelector(tableEntry.MetadataEntries, MetadataType.StringTableEntry); + break; + case AssetTableEntry _: + this.OpenMetadataSelector(tableEntry.MetadataEntries, MetadataType.AssetTableEntry); + break; + } + } + + private void OpenMetadataSelector(IList existingMetadata, params MetadataType[] allowedTypes) + { + var existingMetadataTypes = existingMetadata.Select(m => m?.GetType()).ToList(); + var metadataTypes = TypeCache.GetTypesDerivedFrom(); + var validMetadataTypes = new List(); + + foreach (var metadataType in metadataTypes) + { + var metadataAttribute = metadataType.GetCustomAttribute(); + if (metadataAttribute != null && allowedTypes.Any(allowedType => metadataAttribute.AllowedTypes.HasFlag(allowedType))) + { + if (existingMetadataTypes.Contains(metadataType) && !OdinLocalizationMetadataRegistry.MetadataAllowsMultiple.ContainsKey(metadataType)) continue; + + validMetadataTypes.Add(metadataType); + } + } + + var selector = new GenericSelector("", validMetadataTypes, false, type => ObjectNames.NicifyVariableName(type.Name)); + + foreach (var item in selector.SelectionTree.MenuItems) + { + item.SdfIcon = SdfIconType.Braces; + } + + selector.SelectionConfirmed += types => + { + var selectedType = types.FirstOrDefault(); + + if (selectedType == null) + { + return; + } + + var metadata = (IMetadata)Activator.CreateInstance(selectedType); + this.toBeAdded = metadata; + }; + selector.EnableSingleClickToSelect(); + selector.ShowInPopup(); + } + + public class TableReferenceSelector : OdinSelector + { + private Type tableType; + + public TableReferenceSelector(Type tableType) + { + this.tableType = tableType; + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + tree.Config.SelectMenuItemsOnMouseDown = true; + tree.Selection.SupportsMultiSelect = false; + + var collectionGUIDs = AssetDatabase.FindAssets($"t:{nameof(LocalizationTableCollection)}"); + + foreach (var guid in collectionGUIDs) + { + var path = AssetDatabase.GUIDToAssetPath(guid); + var collection = AssetDatabase.LoadAssetAtPath(path); + + if (collection is null) continue; + if (collection.Tables.Count < 1) continue; + if (collection.Tables[0].asset.GetType() != this.tableType) continue; + + var collectionItem = new OdinMenuItem(tree, collection.name, collection) + { + SdfIcon = SdfIconType.Table + }; + + tree.MenuItems.Add(collectionItem); + } + } + } + + public class TableEntryReferenceSelector : OdinSelector + { + private Type tableType; + + public struct TableEntry + { + public LocalizationTableCollection Collection; + public SharedTableData.SharedTableEntry SharedEntry; + } + + public TableEntryReferenceSelector(Type tableType) + { + this.tableType = tableType; + } + + protected override void BuildSelectionTree(OdinMenuTree tree) + { + tree.Config.SelectMenuItemsOnMouseDown = true; + tree.Selection.SupportsMultiSelect = false; + + + var collectionGUIDs = AssetDatabase.FindAssets($"t:{nameof(LocalizationTableCollection)}"); + + foreach (var guid in collectionGUIDs) + { + var path = AssetDatabase.GUIDToAssetPath(guid); + var collection = AssetDatabase.LoadAssetAtPath(path); + + if (collection is null) continue; + if (collection.Tables.Count < 1) continue; + if (collection.Tables[0].asset.GetType() != this.tableType) continue; + + var collectionItem = new OdinMenuItem(tree, collection.name, collection) + { + SdfIcon = SdfIconType.Table + }; + + List entries = collection.SharedData.Entries; + + for (var j = 0; j < entries.Count; j++) + { + SharedTableData.SharedTableEntry entry = entries[j]; + + var tableEntry = new TableEntry {Collection = collection, SharedEntry = entry}; + + var entryItem = new OdinMenuItem(tree, entry.Key, tableEntry) + { + SdfIcon = SdfIconType.KeyFill + }; + + collectionItem.ChildMenuItems.Add(entryItem); + } + + collectionItem.IsSelectable = false; + tree.MenuItems.Add(collectionItem); + } + } + } + + private void DoTableGUI(Rect rect, TableReference tableReference, InspectorProperty platformOverrideData) + { + var dropDownPosition = EditorGUI.PrefixLabel(rect, new GUIContent("Table Collection")); + var label = tableReference.TableCollectionName; + + if (EditorGUI.DropdownButton(dropDownPosition, new GUIContent(label), FocusType.Passive)) + { + TableReferenceSelector tableReferenceSelector; + + tableReferenceSelector = this.localizationTableCollection.GetType() == typeof(AssetTableCollection) + ? new TableReferenceSelector(typeof(AssetTable)) + : new TableReferenceSelector(typeof(StringTable)); + + tableReferenceSelector.GetCurrentSelection(); + + tableReferenceSelector.SelectionConfirmed += selections => + { + var selection = selections.FirstOrDefault(); + + var platformOverrideType = typeof(PlatformOverride); + var platformOverrideDataType = platformOverrideType.GetNestedType("PlatformOverrideData", BindingFlags.NonPublic); + + platformOverrideDataType + .GetField("tableReference") + .SetValue(platformOverrideData.ValueEntry.WeakSmartValue, selection.TableCollectionNameReference); + + platformOverrideDataType + .GetField("tableEntryReference") + .SetValue(platformOverrideData.ValueEntry.WeakSmartValue, (TableEntryReference) string.Empty); + }; + + tableReferenceSelector.ShowInPopup(); + } + } + + private void DoTableAndEntryGUI(Rect rect, + TableReference tableReference, + TableEntryReference tableEntryReference, + InspectorProperty platformOverrideData, + bool displayTableName) + { + var dropDownPosition = EditorGUI.PrefixLabel(rect, new GUIContent("Reference")); + + var entryLabel = tableEntryReference.ReferenceType != TableEntryReference.Type.Empty + ? tableEntryReference.ResolveKeyName(this.localizationTableCollection.SharedData) + : null; + + string label; + if (displayTableName) + { + var tableLabel = tableReference.TableCollectionName ?? ""; + label = string.IsNullOrEmpty(tableLabel) || string.IsNullOrEmpty(entryLabel) ? "None" : $"{tableLabel}/{entryLabel}"; + } + else + { + label = string.IsNullOrWhiteSpace(entryLabel) ? "None" : $"{entryLabel}"; + } + + if (EditorGUI.DropdownButton(dropDownPosition, new GUIContent(label), FocusType.Passive)) + { + Type tableType = this.localizationTableCollection.GetType() == typeof(AssetTableCollection) + ? typeof(AssetTable) + : typeof(StringTable); + + TableEntryReferenceSelector tableEntryReferenceSelector = new TableEntryReferenceSelector(tableType); + tableEntryReferenceSelector.SelectionConfirmed += selections => + { + var selection = selections.FirstOrDefault(); + var platformOverrideType = typeof(PlatformOverride); + var platformOverrideDataType = platformOverrideType.GetNestedType("PlatformOverrideData", BindingFlags.NonPublic); + + platformOverrideDataType + .GetField("tableReference") + .SetValue(platformOverrideData.ValueEntry.WeakSmartValue, selection.Collection.TableCollectionNameReference); + + platformOverrideDataType + .GetField("tableEntryReference") + .SetValue(platformOverrideData.ValueEntry.WeakSmartValue, (TableEntryReference) selection.SharedEntry.Key); + }; + + tableEntryReferenceSelector.ShowInPopup(); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs.meta new file mode 100644 index 000000000..f7f124d1f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/LocalizationMetadata.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1490cea564e237341b75e0cdba1f374a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs new file mode 100644 index 000000000..4e1ff875e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs @@ -0,0 +1,1015 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#define USING_WIDTH_NON_PERCENT + +using System; +using System.Collections.ObjectModel; +using System.IO; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.AddressableAssets.Settings; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinAssetTableCollectionEditor : OdinTableCollectionEditor + { + public Type UserSpecifiedCollectionType; + + private AssetTableEntry pickedEntry; + private string pickedEntryOriginalGuid; + + private Action setEntryAssetTypeAction; + private Action removeEntryAssetTypeAction; + + public OdinAssetTableCollectionEditor(AssetTableCollection collection, OdinMenuEditorWindow relatedWindow, + OdinLocalizationEditorWindow.WindowState windowState) : + base(collection, relatedWindow, windowState) { } + + public void SetEntryAssetType(AssetTableEntry entry, Type assetType) + { + if (assetType == null || assetType == typeof(UnityEngine.Object)) + { + this.removeEntryAssetTypeAction(entry.KeyId, entry.Table.LocaleIdentifier.Code); + + return; + } + + this.setEntryAssetTypeAction(entry.KeyId, assetType, entry.Table.LocaleIdentifier.Code); + } + + protected override void OnInitialize() + { + this.setEntryAssetTypeAction = OdinLocalizationReflectionValues.Create_AssetTableCollection_SetEntryAssetType_PrivateMethod_Delegate(this.Collection); + + this.removeEntryAssetTypeAction = + OdinLocalizationReflectionValues.Create_AssetTableCollection_RemoveEntryAssetType_PrivateMethod_Delegate(this.Collection); + + for (var i = 0; i < this.SharedEntries.Length; i++) + { + SharedTableData.SharedTableEntry sharedEntry = this.SharedEntries[i]; + + this.MeasureEntry(sharedEntry); + } + + //this.SharedEntries.OnSharedEntryAdded += (i, sharedEntry) => { this.MeasureEntry(sharedEntry); }; + + //this.SharedEntries.OnSharedEntryRemoved += (i, sharedEntry) => { this.SharedEntryHeights.Remove(sharedEntry.Id); }; + + this.OnTableEntryModified = sharedEntry => + { + if (!this.Collection.SharedData.Contains(sharedEntry.Id)) + { + return; + } + + int index = this.SharedEntries.GetIndex(sharedEntry); + + this.MeasureEntry(sharedEntry); + + this.EntryScrollView.ReallocateRect(index, this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + }; + + this.OnAssetTableEntryAdded = (collection, table, entry) => + { + if (this.Collection != collection) + { + return; + } + + this.MeasureEntry(entry.SharedEntry); + }; + + this.OnAssetTableEntryRemoved = (collection, table, entry, guid) => + { + if (this.Collection != collection) + { + return; + } + + if (entry == null) + { + return; + } + + SharedTableData.SharedTableEntry sharedEntry = table.SharedData.GetEntry(entry.KeyId); + + if (sharedEntry == null) + { + return; + } + + this.MeasureEntry(sharedEntry); + }; + } + + protected override void AllocateItems() + { + for (var i = 0; i < this.SharedEntries.Length; i++) + { + SharedTableData.SharedTableEntry sharedEntry = this.SharedEntries[i]; + + if (!this.SharedEntries.IsVisible(sharedEntry)) + { + continue; + } + + if (!this.SharedEntryHeights.ContainsKey(sharedEntry.Id)) + { + this.MeasureEntry(sharedEntry); + } + + this.EntryScrollView.AllocateRect(this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + + //this.ControlIds[sharedEntry] = GUIUtility.GetControlID(FocusType.Keyboard); + } + } + + protected override void DrawItems(ref OdinGUIScrollView.VisibleItems visibleItems) + { + this.HandleObjectPickerUpdates(); + + this.MeasureVisibleEntries(ref visibleItems); + + float scrollSpeed = OdinLocalizationConfig.Instance.scrollSpeed; + + this.EntryScrollView.BeginScrollView(offset: new Vector2(this.PinnedWidth, OdinLocalizationConstants.COLUMN_HEIGHT), + addViewSize: new Vector2(-this.PinnedWidth, 0), + scrollSpeed: scrollSpeed); + { + this.DrawEntries(ref visibleItems, false); + } + this.EntryScrollView.EndScrollView(); + + this.EntryScrollView.BeginClip(offset: new Vector2(0, OdinLocalizationConstants.COLUMN_HEIGHT), ignoreScrollX: true); + { + this.DrawEntries(ref visibleItems, true); + } + this.EntryScrollView.EndClip(); + } + + protected override void MeasureAllEntries() + { + for (var i = 0; i < this.SharedEntries.Length; i++) + { + this.MeasureEntry(this.SharedEntries[i]); + } + + this.HasGUIChanged = true; + } + + protected override void MeasureVisibleEntries(ref OdinGUIScrollView.VisibleItems visibleItems) + { + int dataOffset = visibleItems.Offset; + + for (var i = 0; i < visibleItems.Length; i++) + { + if (!visibleItems.HasAssociatedData(i)) + { + continue; + } + + var sharedEntry = visibleItems.GetAssociatedData(i); + + this.MeasureEntry(sharedEntry); + + this.EntryScrollView.ReallocateRect(dataOffset + i, this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + } + } + + private void MeasureEntry(SharedTableData.SharedTableEntry sharedEntry) + { + var keyColumnWidth = 0.0f; + + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable table = this.GUITables[i]; + + if (table.Type != OdinGUITable.GUITableType.Key) + { + continue; + } + +#if USING_WIDTH_NON_PERCENT + keyColumnWidth = table.Width; +#else + keyColumnWidth = this.GUITables[i].Width; +#endif + break; + } + + float keyHeight = MeasureText(sharedEntry.Key, keyColumnWidth); + + Type assetSharedType = this.Collection.GetEntryAssetType(sharedEntry.Id); + float assetHeight; + + if (assetSharedType == null || assetSharedType == typeof(UnityEngine.Object)) + { + assetHeight = OdinLocalizationConstants.EMPTY_ASSET_ROW_HEIGHT; + } + else + { + assetHeight = EditorGUIUtility.HasObjectThumbnail(assetSharedType) + ? OdinLocalizationConstants.AssetPreviewRowHeight + : OdinLocalizationConstants.ASSET_ROW_HEIGHT; + } + + this.SharedEntryHeights[sharedEntry.Id] = Mathf.Max(keyHeight, assetHeight); + } + + private void DrawEntries(ref OdinGUIScrollView.VisibleItems visibleItems, bool pinned) + { + bool isDraggingControls = this.IsDraggingAnything(); + + for (var i = 0; i < visibleItems.Length; i++) + { + if (!visibleItems.HasAssociatedData(i)) + { + continue; + } + + Rect position = visibleItems.GetRect(i); + + int hint = visibleItems.Offset + i + this.ControlIdHint; + + var sharedEntry = visibleItems.GetAssociatedData(i); + + bool isEven = (visibleItems.Offset + i) % 2 == 0; + + for (var j = 0; j < this.GUITables.Count; j++) + { + OdinGUITable table = this.GUITables[j]; + + if (!table.IsVisible) + { + continue; + } + + if (table.IsPinned != pinned) + { + continue; + } + + if (!this.GUITables.TablesWithinVisibleBounds.Contains(table)) + { + position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); + continue; + } + +#if USING_WIDTH_NON_PERCENT + Rect entryRect = position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); +#else + Rect entryRect = position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); +#endif + + bool isCellPressed, isSelected; + + switch (table.Type) + { + case OdinGUITable.GUITableType.Key: + isSelected = this.IsSharedEntrySelected(sharedEntry); + + if (isSelected) + { + this.SelectionAnimFloat.Move(1 / 0.18f, Easing.InSine); + + FancyColor start = FancyColor.Gray; + + var end = OdinLocalizationGUI.Selected; + + FancyColor.PushBlend(start.Lerp(end, this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + + isCellPressed = DrawCell(entryRect, isEven); + + this.DrawKey(entryRect, sharedEntry, GUIUtility.GetControlID(hint, FocusType.Keyboard)); + + if (isSelected) + { + FancyColor.PopBlend(); + } + + if (isCellPressed) + { + this.SelectSharedEntry(sharedEntry); + } + + break; + + case OdinGUITable.GUITableType.Default: + AssetTableEntry entry = table.Asset.GetEntry(sharedEntry.Id); + + isSelected = this.IsEntrySelected(entry); + + if (isSelected) + { + this.SelectionAnimFloat.Move(1 / 0.18f, Easing.InSine); + + FancyColor start = FancyColor.Gray; + + FancyColor end = OdinLocalizationGUI.Selected; + + FancyColor.PushBlend(start.Lerp(end, this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + + isCellPressed = DrawCell(entryRect, isEven); + + this.DrawEntry(entryRect, sharedEntry, entry, table, isDraggingControls); + + if (isSelected) + { + FancyColor.PopBlend(); + } + + if (isCellPressed) + { + if (entry is null) + { + entry = table.Asset.AddEntry(sharedEntry.Id, string.Empty); + } + + GUIUtility.keyboardControl = 0; + + this.SelectEntry(entry); + } + + if (isSelected && Event.current.type == EventType.KeyDown && EditorWindow.focusedWindow == this.RelatedWindow) + { + switch (Event.current.keyCode) + { + case KeyCode.Delete: + case KeyCode.Backspace: + if (entry == null) + { + break; + } + + this.AssignObjectToSharedEntry(sharedEntry, table.Asset, null); + + Event.current.Use(); + break; + + case KeyCode.Space: + case KeyCode.Return: + if (entry == null) + { + entry = table.Asset.AddEntry(sharedEntry.Id, string.Empty); + } + + this.ShowObjectPickerForEntry(entry); + + Event.current.Use(); + break; + } + } + + break; + } + } + } + } + + private void DrawEntry(Rect rect, SharedTableData.SharedTableEntry sharedEntry, AssetTableEntry entry, OdinGUITable table, + bool isDraggingControls) + { + UnityEngine.Object asset = null; + + Type entryAssetType = this.Collection.GetEntryAssetType(sharedEntry.Id); + + if (entry != null && !entry.IsEmpty) + { + asset = OdinLocalizationAssetCache.Get(entry.Guid, entryAssetType); + } + + Rect fullRect = rect; + + Rect rightMenuRect = rect.TakeFromRight(OdinLocalizationConstants.ROW_MENU_WIDTH); + rect.TakeFromLeft(OdinLocalizationConstants.ROW_MENU_WIDTH); + + rightMenuRect = rightMenuRect.Padding(0, 6); + + Rect openInspectorRect = rightMenuRect.AlignTop(14); + Rect openExplorerRect = rightMenuRect.AlignBottom(14); + + bool isMouseOverInspector = Event.current.IsMouseOver(openInspectorRect); + bool isMouseOverExplorer = Event.current.IsMouseOver(openExplorerRect); + + // TODO: some caveats to just adding this +#if true + var dragAndDropId = 0; + + if (!isDraggingControls && !(asset is DefaultAsset)) + { + EditorGUI.BeginChangeCheck(); + + var dropValue = DragAndDropUtilities.DragAndDropZone(fullRect, asset, entryAssetType, true, false, false) as UnityEngine.Object; + + dragAndDropId = DragAndDropUtilities.PrevDragAndDropId; + + if (EditorGUI.EndChangeCheck() && dropValue != asset) + { + if (!(dropValue is DefaultAsset)) + { + entry = this.AssignObjectToSharedEntry(sharedEntry, table.Asset, dropValue); + + asset = dropValue; + + entryAssetType = this.Collection.GetEntryAssetType(sharedEntry.Id); + } + else + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationTriangleFill, + "Default Assets (such as Folders) cannot be used for Asset Entries.", + SirenixGUIStyles.RedErrorColor, + 10.0f); + } + } + } +#endif + + bool hasThumbnail = EditorGUIUtility.HasObjectThumbnail(entryAssetType); + + if (asset != null) + { + if (Event.current.OnMouseDown(rect, 0, false) && Event.current.clickCount >= 2) + { + EditorGUIUtility.PingObject(asset); + } + } + + + if (entry == null || asset == null) + { + GUI.Label(rect, $"None ({entryAssetType.Name})", SirenixGUIStyles.LabelCentered); + } + else if (!hasThumbnail) + { + GUI.Label(rect.AlignMiddle(20), + GUIHelper.TempContent($"{asset.name} ({entryAssetType.Name})", AssetPreview.GetMiniThumbnail(asset)), + SirenixGUIStyles.LabelCentered); + + if (entryAssetType != typeof(UnityEngine.Object)) + { + var c = EditorGUIUtility.isProSkin + ? new Color(1, 1, 1, isMouseOverInspector ? 0.8f : 0.3f) + : new Color(0, 0, 0, isMouseOverInspector ? 0.8f : 0.3f); + + var c1 = EditorGUIUtility.isProSkin + ? new Color(1, 1, 1, isMouseOverExplorer ? 0.8f : 0.3f) + : new Color(0, 0, 0, isMouseOverExplorer ? 0.8f : 0.3f); + + SdfIcons.DrawIcon(openInspectorRect, SdfIconType.PencilFill, c); + SdfIcons.DrawIcon(openExplorerRect, SdfIconType.FolderFill, c1); + + GUI.Label(openInspectorRect, GUIHelper.TempContent(string.Empty, "Inspect Object")); + GUI.Label(openExplorerRect, GUIHelper.TempContent(string.Empty, "Show In Explorer")); + + if (Event.current.OnMouseDown(openInspectorRect, 0)) + { + GUIHelper.OpenInspectorWindow(asset); + } + + if (Event.current.OnMouseDown(openExplorerRect, 0)) + { + string assetAbsPath = Path.GetFullPath(AssetDatabase.GetAssetPath(asset)); + + if (Directory.Exists(assetAbsPath) || File.Exists(assetAbsPath)) + { + EditorUtility.RevealInFinder(assetAbsPath); + +#if SIRENIX_INTERNAL + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Tools, + $"(DEVELOPER) Opened asset path: {asset.name} ({assetAbsPath})", + Color.black, + 15.0f); +#endif + } + else + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationTriangleFill, + $"Failed to find asset: {asset.name}", + SirenixGUIStyles.RedErrorColor, + 5.0f); + } + + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + } + else + { + Rect previewRect = rect.Padding(12); + + Texture preview; + + if (asset is Sprite || asset is Cubemap) + { + preview = AssetPreview.GetAssetPreview(asset); + } + else + { + preview = AssetPreview.GetMiniThumbnail(asset); + } + + if (preview == null) + { + preview = AssetDatabase.GetCachedIcon(AssetDatabase.GetAssetPath(asset)); + } + + float previewHeight = preview.height; + float aspect = (float) preview.width / preview.height; + + if (previewHeight < previewRect.height) + { + previewRect = previewRect.AlignMiddle(previewHeight < 32 ? 32 : previewHeight); + } + else + { + previewHeight = previewRect.height; + } + + float previewWidth = previewHeight * aspect; + + if (previewWidth > previewRect.width) + { + previewWidth = previewRect.width; + previewHeight = previewWidth / aspect; + } + + previewRect = previewRect.AlignCenter(previewWidth, previewHeight); + + previewRect.x = Mathf.Round(previewRect.x); + previewRect.y = Mathf.Round(previewRect.y); + previewRect.width = Mathf.Round(previewRect.width); + previewRect.height = Mathf.Round(previewRect.height); + + if (Event.current.type == EventType.Repaint) + { + if (this.IsEntrySelected(entry)) + { + GUIHelper.PushColor(OdinLocalizationGUI.Selected * new FancyColor(1.05f)); + } + + EditorStyles.objectFieldThumb.Draw(previewRect, GUIContent.none, false, false, false, false); + + if (this.IsEntrySelected(entry)) + { + GUIHelper.PopColor(); + } + } + + GUI.DrawTexture(previewRect, preview, ScaleMode.ScaleToFit); + + GUI.DrawTexture(previewRect, Texture2D.whiteTexture, ScaleMode.StretchToFill, true, 1.0f, new FancyColor(0.17f), 1, 0); + + var c = EditorGUIUtility.isProSkin + ? new Color(1, 1, 1, isMouseOverInspector ? 0.8f : 0.3f) + : new Color(0, 0, 0, isMouseOverInspector ? 0.8f : 0.3f); + + var c1 = EditorGUIUtility.isProSkin + ? new Color(1, 1, 1, isMouseOverExplorer ? 0.8f : 0.3f) + : new Color(0, 0, 0, isMouseOverExplorer ? 0.8f : 0.3f); + + SdfIcons.DrawIcon(openInspectorRect, SdfIconType.PencilFill, c); + SdfIcons.DrawIcon(openExplorerRect, SdfIconType.FolderFill, c1); + + GUI.Label(openInspectorRect, GUIHelper.TempContent(string.Empty, "Inspect Object")); + GUI.Label(openExplorerRect, GUIHelper.TempContent(string.Empty, "Show In Explorer")); + + if (Event.current.OnMouseDown(openInspectorRect, 0)) + { + GUIHelper.OpenInspectorWindow(asset); + } + + if (Event.current.OnMouseDown(openExplorerRect, 0)) + { + string assetAbsPath = Path.GetFullPath(AssetDatabase.GetAssetPath(asset)); + + if (Directory.Exists(assetAbsPath) || File.Exists(assetAbsPath)) + { + EditorUtility.RevealInFinder(assetAbsPath); + +#if SIRENIX_INTERNAL + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Tools, + $"(DEVELOPER) Opened asset path: {asset.name} ({assetAbsPath})", + Color.black, + 15.0f); +#endif + } + else + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationOctagonFill, + $"Failed to find asset: {asset.name} ({assetAbsPath})", + SirenixGUIStyles.RedErrorColor, + 5.0f); + } + + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + + Rect pickerRect = rightMenuRect.AlignMiddle(14); + + if (OdinLocalizationGUI.ObjectPickerButton(pickerRect)) + { + if (entry == null) + { + entry = table.Asset.AddEntry(sharedEntry.Id, string.Empty); + } + + this.ShowObjectPickerForEntry(entry); + } + + GUI.Label(pickerRect, GUIHelper.TempContent(string.Empty, "Select Object")); + +#if true + if (!isDraggingControls && dragAndDropId != 0 && DragAndDropUtilities.IsDragging && DragAndDropUtilities.HoveringAcceptedDropZone == dragAndDropId) + { + GUI.DrawTexture(fullRect, Texture2D.whiteTexture, ScaleMode.StretchToFill, false, 1, new Color(0, 0.5f, 0.8f, 0.25f), 0, 2.5f); + } +#endif + } + + public override void RemoveKey(SharedTableData.SharedTableEntry sharedEntry) + { + bool hasAssets = this.DoesSharedEntryHaveAssets(sharedEntry); + + if (!hasAssets) + { + base.RemoveKey(sharedEntry); + return; + } + + this.SharedEntryHeights.Remove(sharedEntry.Id); + + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable table = this.GUITables[i]; + + if (table.Type == OdinGUITable.GUITableType.Key) + { + continue; + } + + AssetTableEntry entry = table.Asset.GetEntry(sharedEntry.Id); + + if (entry == null || entry.IsEmpty) + { + continue; + } + + this.Collection.RemoveAssetFromTable(table.Asset, sharedEntry.Id); + } + + this.Collection.RemoveEntry(sharedEntry.Id); + + this.GUITables.SetDirty(this.Collection.SharedData); + } + + private bool DoesSharedEntryHaveAssets(SharedTableData.SharedTableEntry sharedEntry) + { + Type sharedType = this.Collection.GetEntryAssetType(sharedEntry.Id); + + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable table = this.GUITables[i]; + + if (table.Type == OdinGUITable.GUITableType.Key) + { + continue; + } + + if (OdinLocalizationAssetCache.Get(sharedEntry, table.Asset, sharedType) != null) + { + return true; + } + } + + return false; + } + + private void ShowObjectPickerForEntry(AssetTableEntry entry) + { + this.pickedEntry = entry; + + this.pickedEntryOriginalGuid = entry.Guid; + + UnityEngine.Object obj = null; + + Type objType = this.UserSpecifiedCollectionType ?? this.Collection.GetEntryAssetType(entry.KeyId); + + UnityEngine.Object asset = OdinLocalizationAssetCache.Get(entry.Guid, objType); + + if (asset != null) + { + obj = asset; + } + + OdinObjectSelector.Show(this.RelatedWindow, OdinObjectSelectorIds.LOCALIZATION_EDITOR, obj, objType, false); + //SirenixObjectPickerUtilities.ShowObjectPicker(obj, objType, false, string.Empty, this.RelatedWindowId); + } + + private void HandleObjectPickerUpdates() + { + if (this.pickedEntry == null) + { + return; + } + +#if true + object selectedObj = OdinObjectSelector.SelectorObject; + + try + { + if (OdinObjectSelector.IsReadyToClaim(this.RelatedWindow, OdinObjectSelectorIds.LOCALIZATION_EDITOR)) + { + object claimedObject = OdinObjectSelector.Claim(); + + if (!(claimedObject is DefaultAsset)) + { + this.AssignObjectToSelectorEntry(claimedObject as UnityEngine.Object); + } + else + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationTriangleFill, + "Default Assets (such as Folders) cannot be used for Asset Entries.", + SirenixGUIStyles.RedErrorColor, + 10.0f); + } + + Event.current.Use(); + } + else + { + if (!OdinObjectSelector.IsOpen) + { + this.pickedEntry.Guid = this.pickedEntryOriginalGuid; + this.pickedEntry = null; + this.pickedEntryOriginalGuid = string.Empty; + } + + EditorGUI.BeginChangeCheck(); + var changedValue = OdinObjectSelector.GetChangedObject(null, this.RelatedWindow, OdinObjectSelectorIds.LOCALIZATION_EDITOR); + if (EditorGUI.EndChangeCheck()) + { + if (changedValue == null) + { + this.pickedEntry.Guid = string.Empty; + } + else + { + this.pickedEntry.Guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(changedValue)); + } + } + } + } + catch (NullReferenceException exception) + { + Debug.LogError($"{nameof(NullReferenceException)}: The asset '{selectedObj ?? ""}' is NULL.\n{exception}"); + } +#else + if (Event.current.type != EventType.ExecuteCommand || + EditorGUIUtility.GetObjectPickerControlID() != this.RelatedWindowId || + this.RelatedWindowId == 0) + { + return; + } + + UnityEngine.Object selectedObj = null; + + try + { + if (Event.current.commandName == "ObjectSelectorClosed") + { + Vector2 lastScrollPosition = this.EntryScrollView.Position; + + this.pickedEntry.Guid = this.pickedEntryOriginalGuid; + + selectedObj = EditorGUIUtility.GetObjectPickerObject(); + + var table = (AssetTable) this.pickedEntry.Table; + + SharedTableData.SharedTableEntry sharedEntry = this.pickedEntry.SharedEntry; + + if (selectedObj == null) + { + this.Collection.RemoveAssetFromTable((AssetTable) this.pickedEntry.Table, + this.pickedEntry.SharedEntry.Id, + OdinLocalizationConfig.Instance.recordUndosForAssetTableEntries); + + this.pickedEntry = table.GetEntry(sharedEntry.Id) ?? table.AddEntry(sharedEntry.Id, string.Empty); + } + else + { + this.Collection.AddAssetToTable((AssetTable) this.pickedEntry.Table, + this.pickedEntry.SharedEntry.Id, + selectedObj, + OdinLocalizationConfig.Instance.recordUndosForAssetTableEntries); + + this.pickedEntry = table.GetEntry(sharedEntry.Id); + } + + EditorUtility.SetDirty(this.Collection.SharedData); + EditorUtility.SetDirty(table); + + this.EntryScrollView.Position = lastScrollPosition; + + this.pickedEntry = null; + this.pickedEntryOriginalGuid = string.Empty; + Event.current.Use(); + return; + } + + if (Event.current.commandName != "ObjectSelectorUpdated") + { + return; + } + + selectedObj = EditorGUIUtility.GetObjectPickerObject(); + + this.pickedEntry.Guid = selectedObj == null ? string.Empty : AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(selectedObj)); + + Event.current.Use(); + } + catch (NullReferenceException exception) + { + // NOTE: edge cases for when the user selects assets that appear in the object picker, but in reality are null. + Debug.LogError($"{nameof(NullReferenceException)}: The asset '{(selectedObj == null ? "" : selectedObj.name)}' is NULL.\n{exception}"); + } +#endif + } + + // TODO: implement when drag'n'drop areas are done and keyboard commands +#if true + private AssetTableEntry AssignObjectToSharedEntry(SharedTableData.SharedTableEntry sharedEntry, AssetTable table, UnityEngine.Object obj) + { + Vector2 lastScrollPosition = this.EntryScrollView.Position; + + AssetTableEntry entry; + + if (obj == null) + { + this.CustomRemoveAssetFromTable(table, sharedEntry.Id, true); + + entry = table.GetEntry(sharedEntry.Id) ?? table.AddEntry(sharedEntry.Id, string.Empty); + } + else + { + this.Collection.AddAssetToTable(table, sharedEntry.Id, obj, true); + + entry = table.GetEntry(sharedEntry.Id); + } + + this.EntryScrollView.Position = lastScrollPosition; + + return entry; + } +#endif + + private void AssignObjectToSelectorEntry(UnityEngine.Object obj) + { + object selectedObj = OdinObjectSelector.SelectorObject; + + try + { + Vector2 lastScrollPosition = this.EntryScrollView.Position; + + this.pickedEntry.Guid = this.pickedEntryOriginalGuid; + + var table = (AssetTable) this.pickedEntry.Table; + + SharedTableData.SharedTableEntry sharedEntry = this.pickedEntry.SharedEntry; + + if (obj == null) + { + this.CustomRemoveAssetFromTable((AssetTable) this.pickedEntry.Table, this.pickedEntry.SharedEntry.Id, true); + + this.pickedEntry = table.GetEntry(sharedEntry.Id) ?? table.AddEntry(sharedEntry.Id, string.Empty); + } + else + { + this.Collection.AddAssetToTable((AssetTable) this.pickedEntry.Table, this.pickedEntry.SharedEntry.Id, obj, true); + + this.pickedEntry = table.GetEntry(sharedEntry.Id); + } + + EditorUtility.SetDirty(this.Collection.SharedData); + EditorUtility.SetDirty(table); + + this.EntryScrollView.Position = lastScrollPosition; + + this.pickedEntry = null; + this.pickedEntryOriginalGuid = string.Empty; + } + catch (NullReferenceException exception) + { + Debug.LogError($"{nameof(NullReferenceException)}: The asset '{selectedObj ?? ""}' is NULL.\n{exception}"); + } + } + + public void CustomRemoveAssetFromTable(AssetTable table, TableEntryReference entryReference, bool createUndo = false) + { + if (!OdinLocalizationReflectionValues.HasAPIForCustomUndo || !OdinLocalizationConfig.Instance.useCustomUndoHandlingForAssetCollections) + { + this.Collection.RemoveAssetFromTable(table, entryReference, createUndo); + + return; + } + + var groupIndex = 0; + + if (createUndo) + { + groupIndex = Undo.GetCurrentGroup(); + Undo.IncrementCurrentGroup(); + Undo.SetCurrentGroupName("Remove asset from table"); + } + + if (createUndo) + { + Undo.RecordObjects(new UnityEngine.Object[] {table, table.SharedData}, "Remove asset from table"); + } + + AssetTableEntry tableEntry = table.GetEntryFromReference(entryReference); + + if (tableEntry == null) + { + return; + } + + string removedAssetGuid = tableEntry.Guid; + + tableEntry.Guid = string.Empty; + + AddressableAssetSettings addressableAssetSettings = OdinLocalizationEditorSettings.GetAddressableAssetSettings(false); + + if (addressableAssetSettings == null) + { + return; + } + + EditorUtility.SetDirty(table); + EditorUtility.SetDirty(table.SharedData); + + this.SetEntryAssetType(tableEntry, null); + + if (tableEntry.MetadataEntries.Count == 0) + { + table.RemoveEntry(tableEntry.KeyId); + } + + ReadOnlyCollection assetTableCollections = LocalizationEditorSettings.GetAssetTableCollections(); + + foreach (AssetTableCollection collection in assetTableCollections) + { + if (collection.GetTable(table.LocaleIdentifier) is AssetTable tableWithMatchingLocaleId && + tableWithMatchingLocaleId.ContainsValue(removedAssetGuid)) + { + return; + } + } + + AddressableAssetEntry assetEntry = addressableAssetSettings.FindAssetEntry(removedAssetGuid); + + if (assetEntry != null) + { + if (createUndo) + { + Undo.RecordObject(assetEntry.parentGroup, "Remove asset from table"); + } + + var assetLabel = (string) OdinLocalizationReflectionValues.FormatAssetLabelMethod.Invoke(null, new object[] {table.LocaleIdentifier}); + + assetEntry.SetLabel(assetLabel, false); + + OdinLocalizationReflectionValues.UpdateAssetGroupMethod.Invoke(this.Collection, new object[] {addressableAssetSettings, assetEntry, createUndo}); + } + + OdinLocalizationEvents.RaiseAssetTableEntryRemoved(this.Collection, table, tableEntry, removedAssetGuid); + + if (createUndo) + { + Undo.CollapseUndoOperations(groupIndex); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs.meta new file mode 100644 index 000000000..74e54c15a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinAssetTableCollectionEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: bc0d9dcd4d4f4e3094085c752e185ef8 +timeCreated: 1704811181 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs new file mode 100644 index 000000000..2a5be4cd9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs @@ -0,0 +1,196 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#define USING_WIDTH_NON_PERCENT +//#undef USING_WIDTH_NON_PERCENT + +using System; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEngine; +using UnityEngine.Localization; +using UnityEngine.Localization.Tables; +using UnityEngine.Serialization; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinGUITable : IComparable> where TTable : LocalizationTable + { + public const string KEY_DISPLAY_NAME = "Key"; + + public enum GUITableType + { + Default, + Key + } + + public float Width + { + get => this._width; + set + { + if (value < OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + this._width = OdinLocalizationConstants.MIN_COLUMN_WIDTH; + return; + } + + this._width = Mathf.Round(value); + } + } + + public bool IsDraggingSlider = false; + public bool IsVisible; + public string DisplayName; + public GUITableType Type; + + [FormerlySerializedAs("Table")] + public TTable Asset; + public bool IsPinned; + + private float _width; + +#if USING_WIDTH_NON_PERCENT + //public float VisualWidth; +#else + internal float WidthPercentage; +#endif + +#if USING_WIDTH_NON_PERCENT + public static OdinGUITable CreateKeyTable() +#else + public static OdinGUITable CreateKeyTable(float widthPercent) +#endif + { + return new OdinGUITable + { + IsVisible = true, + DisplayName = KEY_DISPLAY_NAME, + Type = GUITableType.Key, + Asset = null, + IsPinned = false, + Width = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH, +#if USING_WIDTH_NON_PERCENT + // VisualWidth = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH +#else + WidthPercentage = widthPercent +#endif + }; + } + +#if USING_WIDTH_NON_PERCENT + public static OdinGUITable CreateTable(TTable table, Locale locale) +#else + public static OdinGUITable CreateTable(TTable table, float widthPercent) +#endif + { + return new OdinGUITable + { + IsVisible = true, + DisplayName = locale.LocaleName, + Type = GUITableType.Default, + Asset = table, + IsPinned = false, + Width = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH, +#if USING_WIDTH_NON_PERCENT + // VisualWidth = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH +#else + WidthPercentage = widthPercent +#endif + }; + } + + public int CompareTo(OdinGUITable other) + { + if (other == null) + { + return -1; + } + + if (this.IsVisible && !other.IsVisible) + { + return -1; + } + + if (!this.IsVisible && other.IsVisible) + { + return 1; + } + + if (this.IsPinned && !other.IsPinned) + { + return -1; + } + + if (!this.IsPinned && other.IsPinned) + { + return 1; + } + + if (this.DisplayName == KEY_DISPLAY_NAME && other.DisplayName == KEY_DISPLAY_NAME) + { + return 0; + } + + if (other.DisplayName == KEY_DISPLAY_NAME) + { + return 1; + } + + if (this.DisplayName == KEY_DISPLAY_NAME) + { + return -1; + } + + return this.Asset.LocaleIdentifier.CompareTo(other.Asset.LocaleIdentifier); + } + + public Vector2 HandleSlider(Rect position) + { + if (GUIUtility.hotControl == 0) + { + this.IsDraggingSlider = false; + } + + if (!GUI.enabled) + { + return Vector2.zero; + } + + EditorGUIUtility.AddCursorRect(position, MouseCursor.ResizeHorizontal); + + if (GUI.enabled && Event.current.OnMouseDown(position, 0)) + { + this.IsDraggingSlider = true; + SharedUniqueControlId.SetActive(); + EditorGUIUtility.SetWantsMouseJumping(1); + Event.current.Use(); + } + else if (SharedUniqueControlId.IsActive && this.IsDraggingSlider) + { + if (Event.current.type == EventType.MouseDrag) + { + Event.current.Use(); + GUI.changed = true; + return Event.current.delta; + } + + if (Event.current.type != EventType.MouseUp) + { + return Vector2.zero; + } + + this.IsDraggingSlider = false; + SharedUniqueControlId.SetInactive(); + EditorGUIUtility.SetWantsMouseJumping(0); + Event.current.Use(); + } + + return Vector2.zero; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs.meta new file mode 100644 index 000000000..e745156ab --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITable.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c6172b1a79444464bfac84d14344febf +timeCreated: 1706411334 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs new file mode 100644 index 000000000..d6c19744e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs @@ -0,0 +1,483 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#define USING_WIDTH_NON_PERCENT +//#undef USING_WIDTH_NON_PERCENT + +using System; +using System.Collections.Generic; +using Sirenix.OdinInspector.Editor.Internal; +using UnityEditor; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinGUITableCollection : List> where TTable : LocalizationTable + { + public readonly struct VisibleTables + { + public readonly int Offset; + public readonly int Length; + public readonly int PinnedLength; + public readonly float StartOffset; + + private readonly OdinGUITableCollection collection; + + public VisibleTables(OdinGUITableCollection collection, int offset, int length, int pinnedLength, float startOffset) + { + this.collection = collection; + this.Offset = offset; + this.Length = length + pinnedLength; + this.PinnedLength = pinnedLength; + this.StartOffset = startOffset; + } + + public OdinGUITable this[int index] => + index >= this.PinnedLength ? this.collection[this.Offset + index - this.PinnedLength] : this.collection[index]; + } + + //public VisibleTables CurrentVisibleTables; + + public HashSet> TablesWithinVisibleBounds = new HashSet>(); + + public OdinGUITableCollection(int capacity) : base(capacity) { } + +#if USING_WIDTH_NON_PERCENT + public void AddKeyTable() + { + for (var i = 0; i < this.Count; i++) + { + if (this[i].Type == OdinGUITable.GUITableType.Key) + { + return; + } + } + + this.Add(OdinGUITable.CreateKeyTable()); + } +#else + public void AddKeyTable(float widthPercent) + { + for (var i = 0; i < this.Count; i++) + { + if (this[i].Type == OdinGUITable.GUITableType.Key) + { + return; + } + } + + this.Add(OdinGUITable.CreateKeyTable(widthPercent)); + } +#endif + +#if USING_WIDTH_NON_PERCENT + public void UpdateVisibleTables(OdinGUIScrollView view, float pinnedWidth) + { +#if true + this.TablesWithinVisibleBounds.Clear(); + + var offset = 0; + var currentVisibleWidth = 0.0f; + var xMin = 0.0f; + var xMax = 0.0f; + + for (var i = 0; i < this.Count; i++) + { + OdinGUITable table = this[i]; + + if (!table.IsVisible) + { + continue; + } + + if (table.IsPinned) + { + this.TablesWithinVisibleBounds.Add(table); + continue; + } + + xMax += table.Width; + + bool isVisible = view.Position.x >= xMin && view.Position.x <= xMax; + + if (!isVisible) + { + xMin = xMax; + continue; + } + + offset = i; + + currentVisibleWidth = xMax - view.Position.x; + this.TablesWithinVisibleBounds.Add(table); + break; + } + + float width = view.Bounds.width - pinnedWidth; + + for (int i = offset + 1; i < this.Count; i++) + { + OdinGUITable table = this[i]; + + if (!table.IsVisible) + { + break; + } + + if (currentVisibleWidth >= width) + { + this.TablesWithinVisibleBounds.Add(table); + break; + } + + this.TablesWithinVisibleBounds.Add(table); + currentVisibleWidth += this[i].Width; + } +#else + if (this.GetVisibleCount() < 1) + { + this.CurrentVisibleTables = new VisibleTables(this, 0, 0, 0, 0.0f); + return; + } + + const int LENGTH_NOT_SET = -1; + + var offset = 0; + int length = LENGTH_NOT_SET; + + var currentVisibleWidth = 0.0f; + + float xMin = 0.0f, xMax = 0.0f; + + float positionX = view.Position.x; + float width = view.Bounds.width - pinnedWidth; + + for (var i = 0; i < this.Count; i++) + { + OdinGUITable table = this[i]; + + if (table.IsPinned) + { + continue; + } + + if (!table.IsVisible) + { + break; + } + + xMax += table.VisualWidth; + + bool isVisible = positionX >= xMin && positionX <= xMax; + + if (!isVisible) + { + xMin = xMax; + continue; + } + + offset = i; + + currentVisibleWidth = xMax - positionX; + break; + } + + float startOffset = xMin; + + for (int i = offset + 1; i < this.Count; i++) + { + if (!this[i].IsVisible) + { + length = i - offset; + break; + } + + if (currentVisibleWidth >= width) + { + length = i - offset + 1; + break; + } + + currentVisibleWidth += this[i].VisualWidth; + } + + int pinnedCount = this.GetPinnedCount(); + + if (length == LENGTH_NOT_SET) + { + length = this.Count - offset; + } + + this.CurrentVisibleTables = new VisibleTables(this, offset, length, pinnedCount, startOffset); +#endif + } + + public float GetVisibleWidth() + { + var result = 0.0f; + + for (var i = 0; i < this.Count; i++) + { + if (this[i].IsVisible) + { + result += this[i].Width; + } + } + + return result; + } + + public void ResizeBy(float factor) + { + for (var i = 0; i < this.Count; i++) + { + if (this[i].IsVisible) + { + this[i].Width *= factor; + } + } + } +#else + /// Calculates the field on beforehand. + /// The to perform calculations on. + public void CalcWidths(OdinGUIScrollView scrollView) + { + float viewWidth = scrollView.ViewRect.width; + + float visibleFactor = this.GetVisibleFactor(); + + for (var i = 0; i < this.Count; i++) + { + this[i].Width = viewWidth * (this[i].WidthPercentage * visibleFactor); + } + } +#endif + + public int GetLastVisibleIndex() + { + for (int i = this.Count - 1; i >= 0; i--) + { + if (this[i].IsVisible) + { + return i; + } + } + + return 0; + } + + public int GetLastVisiblePinnedIndex() + { + for (int i = this.Count - 1; i >= 0; i--) + { + if (this[i].IsVisible && this[i].IsPinned) + { + return i; + } + } + + return 0; + } + + public int GetVisibleCount() + { + var result = 0; + + for (var i = 0; i < this.Count; i++) + { + if (this[i].IsVisible) + { + result++; + } + } + + return result; + } + + public int GetHiddenCount() + { + var result = 0; + + for (var i = 0; i < this.Count; i++) + { + if (!this[i].IsVisible) + { + result++; + } + } + + return result; + } + + public int GetPinnedCount() + { + var result = 0; + + for (var i = 0; i < this.Count; i++) + { + if (this[i].IsVisible && this[i].IsPinned) + { + result++; + } + } + + return result; + } + + public OdinGUITable GetNextVisible(int index) + { + for (int i = index + 1; i < this.Count; i++) + { + if (this[i].IsVisible) + { + return this[i]; + } + } + + return null; + } + + public void UndoRecordCollection(SharedTableData sharedTableData, string name) + { + for (var i = 0; i < this.Count; i++) + { + switch (this[i].Type) + { + case OdinGUITable.GUITableType.Default: + Undo.RecordObject(this[i].Asset, name); + break; + + case OdinGUITable.GUITableType.Key: + if (sharedTableData != null) + { + Undo.RecordObject(sharedTableData, name); + } + + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + } + + public void SetDirty(SharedTableData sharedTableData) + { + for (var i = 0; i < this.Count; i++) + { + switch (this[i].Type) + { + case OdinGUITable.GUITableType.Default: + EditorUtility.SetDirty(this[i].Asset); + break; + + case OdinGUITable.GUITableType.Key: + if (sharedTableData != null) + { + EditorUtility.SetDirty(sharedTableData); + } + + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + } + +#if !USING_WIDTH_NON_PERCENT + private float GetVisibleFactor() + { + var visibleCount = 0; + var sum = 0.0f; + + for (var i = 0; i < this.Count; i++) + { + if (!this[i].IsVisible) + { + continue; + } + + sum += this[i].WidthPercentage; + visibleCount++; + } + + float result = (float) this.Count / visibleCount; + + sum *= result; + + result *= 1.0f / sum; + + return result; + } +#endif + public void ResizeToFit(float targetWidth) + { + var count = 0; + + for (var i = 0; i < this.Count; i++) + { + if (this[i].IsPinned || !this[i].IsVisible) + { + continue; + } + + count++; + } + + if (count < 1) + { + return; + } + + int averageSize = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH * count; + + float scaleFactor = targetWidth / averageSize; + + for (var i = 0; i < this.Count; i++) + { + if (!this[i].IsVisible || this[i].IsPinned) + { + continue; + } + + this[i].Width = OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH * scaleFactor; + } + } + + public void ResizePinnedToFit(float targetWidth) + { + var currentTotalWidth = 0.0f; + + for (var i = 0; i < this.Count; i++) + { + if (!this[i].IsPinned || !this[i].IsVisible) + { + continue; + } + + currentTotalWidth += this[i].Width; + } + + if (currentTotalWidth < 1.0f) + { + return; + } + + float scaleFactor = targetWidth / currentTotalWidth; + + for (var i = 0; i < this.Count; i++) + { + if (!this[i].IsVisible || !this[i].IsPinned) + { + continue; + } + + this[i].Width *= scaleFactor; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs.meta new file mode 100644 index 000000000..4f0da6b44 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinGUITableCollection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3a739bb40d31496a9591094d81fd2d19 +timeCreated: 1706411492 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs new file mode 100644 index 000000000..f950a3c5e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs @@ -0,0 +1,441 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Linq; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.Localization; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinSharedEntryCollection + { + private class StringComparer : IComparer + { + public bool IsAscending = true; + + public int Compare(string self, string other) + { + if (string.IsNullOrEmpty(self) && string.IsNullOrEmpty(other)) + { + return 0; + } + + if (string.IsNullOrEmpty(self)) + { + return this.IsAscending ? 1 : -1; + } + + if (string.IsNullOrEmpty(other)) + { + return this.IsAscending ? -1 : 1; + } + + return string.Compare(self, other, StringComparison.InvariantCulture); + } + } + + public enum SortOrderState + { + Unsorted, + Ascending, + Descending + } + + public bool IsSearching; + + public bool IsSorted => this.CurrentSortOrderState != SortOrderState.Unsorted; + + public int Length => this.Entries.Count; + + private string _searchTerm = string.Empty; + + private StringComparer stringComparer = new StringComparer(); + + public string SearchTerm + { + get => this._searchTerm; + private set + { + this._searchTerm = value; + + this.IsSearching = !string.IsNullOrEmpty(value); + } + } + + public List Entries => this.IsSorted ? this.SortedEntries : this.Collection.SharedData.Entries; + + public List SortedEntries; + public readonly HashSet FilteredEntries; + + public readonly LocalizationTableCollection Collection; + + public SortOrderState CurrentSortOrderState = SortOrderState.Unsorted; + + public OdinSharedEntryCollection(LocalizationTableCollection collection) + { + this.Collection = collection; + + this.FilteredEntries = new HashSet(); + } + + public SharedTableData.SharedTableEntry this[int index] => this.Entries[index]; + + public bool IsVisible(SharedTableData.SharedTableEntry sharedEntry) + { + return !this.IsSearching || (this.IsSearching && this.FilteredEntries.Contains(sharedEntry)); + } + + public bool UpdateSearchTerm(string value, + OdinGUITableCollection tables, + LocalizationTableCollection collection, + bool forceUpdate = false) where TTable : LocalizationTable + { + if (this.SearchTerm == value && !forceUpdate) + { + return false; + } + + this.SearchTerm = value; + + if (string.IsNullOrEmpty(this.SearchTerm)) + { + return true; + } + + this.FilteredEntries.Clear(); + + for (var i = 0; i < tables.Count; i++) + { + OdinGUITable table = tables[i]; + + switch (table.Type) + { + case OdinGUITable.GUITableType.Default: + switch (table.Asset) + { + case AssetTable assetTable: + var assetCollection = collection as AssetTableCollection; + + for (var j = 0; j < this.Length; j++) + { + SharedTableData.SharedTableEntry sharedEntry = this[j]; + + Type assetType = assetCollection.GetEntryAssetType(sharedEntry.Id); + + UnityEngine.Object asset = OdinLocalizationAssetCache.Get(sharedEntry, assetTable, assetType); + + if (asset == null) + { + continue; + } + + if (FuzzySearch.Contains(this.SearchTerm, asset.name)) + { + this.FilteredEntries.Add(sharedEntry); + } + } + + break; + + case StringTable stringTable: + for (var j = 0; j < this.Length; j++) + { + SharedTableData.SharedTableEntry sharedEntry = this[j]; + + StringTableEntry entry = stringTable.GetEntry(sharedEntry.Id); + + if (entry is null || string.IsNullOrEmpty(entry.Value)) + { + continue; + } + + if (FuzzySearch.Contains(this.SearchTerm, entry.Value)) + { + this.FilteredEntries.Add(sharedEntry); + } + } + + break; + } + + break; + + case OdinGUITable.GUITableType.Key: + for (var j = 0; j < this.Entries.Count; j++) + { + if (FuzzySearch.Contains(this.SearchTerm, this.Entries[j].Key)) + { + this.FilteredEntries.Add(this.Entries[j]); + } + } + + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + + return true; + } + + public void SortByKeys(bool preserveCurrentOrder) + { + switch (this.CurrentSortOrderState) + { + case SortOrderState.Ascending: + this.stringComparer.IsAscending = true; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries.OrderBy(entry => entry.Key, this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Collection.SharedData.Entries.OrderBy(entry => entry.Key, this.stringComparer).ToList(); + } + + return; + + case SortOrderState.Descending: + this.stringComparer.IsAscending = false; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries.OrderByDescending(entry => entry.Key, this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Collection.SharedData.Entries.OrderByDescending(entry => entry.Key, this.stringComparer).ToList(); + } + + return; + } + } + + public void SortByAssetTable(AssetTableCollection collection, AssetTable table, bool preserveCurrentOrder) + { + switch (this.CurrentSortOrderState) + { + case SortOrderState.Ascending: + this.stringComparer.IsAscending = true; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries + .OrderBy(entry => GetAssetNameFromEntry(entry, table, collection), this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Collection.SharedData.Entries.OrderBy(entry => GetAssetNameFromEntry(entry, table, collection), this.stringComparer) + .ToList(); + } + + return; + + case SortOrderState.Descending: + this.stringComparer.IsAscending = false; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries + .OrderByDescending(entry => GetAssetNameFromEntry(entry, table, collection), + this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Entries.OrderByDescending(entry => GetAssetNameFromEntry(entry, table, collection), this.stringComparer).ToList(); + } + + return; + } + } + + public void SortByStringTable(StringTable table, bool preserveCurrentOrder) + { + switch (this.CurrentSortOrderState) + { + case SortOrderState.Ascending: + this.stringComparer.IsAscending = true; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries + .OrderBy(entry => GetStringFromEntry(entry, table), this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Collection.SharedData.Entries.OrderBy(entry => GetStringFromEntry(entry, table), this.stringComparer).ToList(); + } + + return; + + case SortOrderState.Descending: + this.stringComparer.IsAscending = false; + + if (preserveCurrentOrder) + { + List result = this.Collection.SharedData.Entries + .OrderByDescending(entry => GetStringFromEntry(entry, table), this.stringComparer) + .ThenBy(this.GetOrderIndex) + .ToList(); + + this.SortedEntries = result; + } + else + { + this.SortedEntries = this.Entries.OrderByDescending(entry => GetStringFromEntry(entry, table), this.stringComparer).ToList(); + } + + return; + } + } + + private static string GetStringFromEntry(SharedTableData.SharedTableEntry sharedEntry, StringTable table) + { + StringTableEntry entry = table.GetEntry(sharedEntry.Id); + + return entry?.Value; + } + + private static string GetAssetNameFromEntry(SharedTableData.SharedTableEntry sharedEntry, AssetTable table, AssetTableCollection collection) + { + AssetTableEntry entry = table.GetEntry(sharedEntry.Id); + + if (entry == null || entry.IsEmpty) + { + return null; + } + + Type type = collection.GetEntryAssetType(sharedEntry.Id); + + UnityEngine.Object asset = OdinLocalizationAssetCache.Get(entry.Guid, type); + + return asset == null ? null : asset.name; + } + + public void MoveEntry(int from, int to) + { + if (from < 0 || from >= this.Entries.Count) + { + return; + } + + if (to < 0 || to > this.Entries.Count) + { + return; + } + + if (from == to) + { + return; + } + + SharedTableData.SharedTableEntry fromEntry = this.Collection.SharedData.Entries[from]; + + if (to > from) + { + to -= 1; + } + + //to = afterTo ? to + 1 : to; + + this.Collection.SharedData.Entries.RemoveAt(from); + + this.Collection.SharedData.Entries.Insert(to, fromEntry); + + OdinLocalizationEvents.RaiseTableEntryModified(this.Collection.SharedData.Entries[from]); + OdinLocalizationEvents.RaiseTableEntryModified(this.Collection.SharedData.Entries[to]); + + EditorUtility.SetDirty(this.Collection.SharedData); + } + + public void GotoNextSortOrderState() + { + switch (this.CurrentSortOrderState) + { + case SortOrderState.Unsorted: + this.CurrentSortOrderState = SortOrderState.Ascending; + break; + + case SortOrderState.Ascending: + this.CurrentSortOrderState = SortOrderState.Descending; + break; + + case SortOrderState.Descending: + this.CurrentSortOrderState = SortOrderState.Unsorted; + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + + public int GetIndex(SharedTableData.SharedTableEntry sharedEntry) + { + for (var i = 0; i < this.Length; i++) + { + if (this[i].Id == sharedEntry.Id) + { + return i; + } + } + + return -1; + } + + public int GetOrderIndex(SharedTableData.SharedTableEntry sharedEntry) + { + if (this.IsSorted && this.SortedEntries.Count == this.Length) + { + for (var i = 0; i < this.SortedEntries.Count; i++) + { + if (this.SortedEntries[i].Id == sharedEntry.Id) + { + return i; + } + } + + return -1; + } + + for (var i = 0; i < this.Length; i++) + { + if (this[i].Id == sharedEntry.Id) + { + return i; + } + } + + return -1; + } + } +} diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs.meta new file mode 100644 index 000000000..fa91b6716 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinSharedEntryCollection.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a543e4ee8d6d4b629befbccf5aa7b5e6 +timeCreated: 1706407967 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs new file mode 100644 index 000000000..abdd6ef7d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs @@ -0,0 +1,449 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#define USING_WIDTH_NON_PERCENT + +using System; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinStringTableCollectionEditor : OdinTableCollectionEditor + { + private string currentSyntaxSource; + private string currentSyntaxHighlightedText; + private string currentSyntaxErrorMessage; + private Exception currentSyntaxException; + private bool currentSyntaxHasErrors; + + public OdinStringTableCollectionEditor(StringTableCollection collection, OdinMenuEditorWindow relatedWindow, + OdinLocalizationEditorWindow.WindowState windowState) : + base(collection, relatedWindow, windowState) { } + + protected override void OnInitialize() + { + for (var i = 0; i < this.SharedEntries.Length; i++) + { + SharedTableData.SharedTableEntry sharedEntry = this.SharedEntries[i]; + + this.MeasureEntry(sharedEntry); + } + + //this.SharedEntries.OnSharedEntryAdded += (i, sharedEntry) => { this.MeasureEntry(sharedEntry); }; + + //this.SharedEntries.OnSharedEntryRemoved += (i, sharedEntry) => { this.SharedEntryHeights.Remove(sharedEntry.Id); }; + + this.OnTableEntryModified = sharedEntry => + { + if (!this.Collection.SharedData.Contains(sharedEntry.Id)) + { + return; + } + + int index = this.SharedEntries.GetIndex(sharedEntry); + + this.MeasureEntry(sharedEntry); + + this.EntryScrollView.ReallocateRect(index, this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + }; + } + + protected override void AllocateItems() + { + for (var i = 0; i < this.SharedEntries.Length; i++) + { + SharedTableData.SharedTableEntry sharedEntry = this.SharedEntries[i]; + + if (!this.SharedEntries.IsVisible(sharedEntry)) + { + continue; + } + + if (!this.SharedEntryHeights.ContainsKey(sharedEntry.Id)) + { + this.MeasureEntry(sharedEntry); + } + + this.EntryScrollView.AllocateRect(this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + +#if false + this.ControlIds[sharedEntry] = GUIUtility.GetControlID(FocusType.Keyboard); + + for (var j = 0; j < this.GUITables.Count; j++) + { + OdinGUITable table = this.GUITables[j]; + + if (table.Type == OdinGUITable.GUITableType.Key) + { + continue; + } + + StringTableEntry entry = table.Table.GetEntry(sharedEntry.Id); + + if (entry is null) + { + table.Table.AddEntry(sharedEntry.Id, string.Empty); + + entry = table.Table.GetEntry(sharedEntry.Id); + } + + this.ControlIds[entry] = GUIUtility.GetControlID(FocusType.Keyboard); + } +#endif + } + } + + protected override void DrawItems(ref OdinGUIScrollView.VisibleItems visibleItems) + { + this.MeasureVisibleEntries(ref visibleItems); + + float scrollSpeed = OdinLocalizationConfig.Instance.scrollSpeed; + + this.EntryScrollView.BeginScrollView(offset: new Vector2(this.PinnedWidth, OdinLocalizationConstants.COLUMN_HEIGHT), + addViewSize: new Vector2(-this.PinnedWidth, 0), + scrollSpeed: scrollSpeed); + { + this.DrawEntries(ref visibleItems, false); + } + this.EntryScrollView.EndScrollView(); + + this.EntryScrollView.BeginClip(offset: new Vector2(0.0f, OdinLocalizationConstants.COLUMN_HEIGHT), ignoreScrollX: true); + { + this.DrawEntries(ref visibleItems, true); + } + this.EntryScrollView.EndClip(); + } + + private void DrawEntries(ref OdinGUIScrollView.VisibleItems visibleItems, bool pinned) + { + for (var i = 0; i < visibleItems.Length; i++) + { + if (!visibleItems.HasAssociatedData(i)) + { + continue; + } + + int hint = visibleItems.Offset + i + this.ControlIdHint; + + Rect position = visibleItems.GetRect(i); + + var sharedEntry = visibleItems.GetAssociatedData(i); + + bool isEven = (visibleItems.Offset + i) % 2 == 0; + + for (var j = 0; j < this.GUITables.Count; j++) + { + OdinGUITable table = this.GUITables[j]; + + if (!table.IsVisible) + { + continue; + } + + if (table.IsPinned != pinned) + { + continue; + } + + if (!this.GUITables.TablesWithinVisibleBounds.Contains(table)) + { + GUIUtility.GetControlID(hint, FocusType.Keyboard); + position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); + continue; + } + + +#if USING_WIDTH_NON_PERCENT + Rect entryRect = position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); +#else + Rect entryRect = position.TakeFromLeft(table.Width).Padding(OdinLocalizationConstants.ENTRY_PADDING); +#endif + + bool isCellPressed, isSelected; + + switch (table.Type) + { + case OdinGUITable.GUITableType.Key: + isSelected = this.IsSharedEntrySelected(sharedEntry); + + if (isSelected) + { + this.SelectionAnimFloat.Move(1 / 0.18f, Easing.InSine); + + FancyColor start = FancyColor.Gray; + + var end = OdinLocalizationGUI.Selected; + + FancyColor.PushBlend(start.Lerp(end, this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + + isCellPressed = DrawCell(entryRect, isEven); + + this.DrawKey(entryRect, sharedEntry, GUIUtility.GetControlID(hint, FocusType.Keyboard)); + + if (isSelected) + { + FancyColor.PopBlend(); + } + + if (isCellPressed) + { + this.SelectSharedEntry(sharedEntry); + } + + break; + + case OdinGUITable.GUITableType.Default: + StringTableEntry entry = table.Asset.GetEntry(sharedEntry.Id); + + isSelected = this.IsEntrySelected(entry); + + if (isSelected) + { + this.SelectionAnimFloat.Move(1 / 0.18f, Easing.InSine); + + FancyColor start = FancyColor.Gray; + + FancyColor end = OdinLocalizationGUI.Selected; + + if (entry.IsSmart && OdinLocalizationConfig.Instance.useSyntaxHighlighter) + { + if (this.currentSyntaxSource != entry.Value) + { + this.currentSyntaxHighlightedText = OdinLocalizationSyntaxHighlighter.HighlightAsRichText(entry.Value); + this.currentSyntaxErrorMessage = OdinLocalizationSyntaxHighlighter.GetErrorMessage(entry.Value, out bool foundError, out Exception exception); + this.currentSyntaxHasErrors = foundError; + this.currentSyntaxException = exception; + this.currentSyntaxSource = entry.Value; + } + + if (this.currentSyntaxHasErrors) + { + FancyColor.PushBlend(start.Lerp(new FancyColor(0.68f, 0.2f, 0.2f), this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + else + { + FancyColor.PushBlend(start.Lerp(end, this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + } + else + { + FancyColor.PushBlend(start.Lerp(end, this.SelectionAnimFloat), FancyColor.BlendMode.Overlay); + } + } + + isCellPressed = DrawCell(entryRect, isEven); + + this.DrawEntry(entryRect, entry, GUIUtility.GetControlID(hint, FocusType.Keyboard), table, sharedEntry); + + if (isSelected) + { + if (OdinLocalizationConfig.Instance.useSyntaxHighlighter && entry.IsSmart && this.currentSyntaxHasErrors) + { + Rect errorRect = entryRect.AlignLeft(OdinLocalizationConstants.ROW_MENU_WIDTH).AlignMiddle(16); + + SdfIcons.DrawIcon(errorRect, SdfIconType.ExclamationOctagonFill, + Event.current.IsMouseOver(errorRect) ? new Color(1, 1, 1, 1f) : new Color(1, 1, 1, 0.6f)); + + if (Event.current.OnMouseDown(errorRect, 0)) + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationOctagonFill, + this.currentSyntaxErrorMessage, + new Color(0.68f, 0.2f, 0.2f), + 20.0f); + + if (this.currentSyntaxException != null) + { + Debug.LogException(this.currentSyntaxException); + } + } + } + + FancyColor.PopBlend(); + } + + if (isCellPressed) + { + if (entry is null) + { + entry = table.Asset.AddEntry(sharedEntry.Id, string.Empty); + } + + this.SelectEntry(entry); + } + + break; + } + } + } + } + + private void DrawEntry(Rect position, StringTableEntry entry, int id, OdinGUITable table, SharedTableData.SharedTableEntry sharedEntry) + { + bool changed; + string value; + + Rect smartToggleRect = position.TakeFromRight(OdinLocalizationConstants.ROW_MENU_WIDTH); + position.TakeFromLeft(OdinLocalizationConstants.ROW_MENU_WIDTH); + + if (entry?.Value is null) + { + value = OdinLocalizationGUI.TextField(position, string.Empty, out changed, id); + } + else if (OdinLocalizationConfig.Instance.useSyntaxHighlighter && entry.IsSmart && entry == this.CurrentSelectedEntry) + { + value = OdinLocalizationGUI.TextFieldSyntaxHighlighted(position, entry.Value, this.currentSyntaxHighlightedText, out changed, id); + + if (changed) + { + this.currentSyntaxHighlightedText = OdinLocalizationSyntaxHighlighter.HighlightAsRichText(value); + this.currentSyntaxErrorMessage = OdinLocalizationSyntaxHighlighter.GetErrorMessage(value, out bool foundError, out Exception exception); + this.currentSyntaxHasErrors = foundError; + this.currentSyntaxException = exception; + this.currentSyntaxSource = value; + } + } + else + { + value = OdinLocalizationGUI.TextField(position, entry.Value, out changed, id); + } + + if (changed) + { + if (entry == null) + { + entry = table.Asset.AddEntry(sharedEntry.Id, value); + } + + Undo.RecordObject(entry.Table, "Modified String Table Entry Text"); + entry.Value = value; + OdinLocalizationEvents.RaiseTableEntryModified(entry.SharedEntry); + EditorUtility.SetDirty(entry.Table); + } + + smartToggleRect = smartToggleRect.AlignMiddle(16); + + if (entry == null) + { + SdfIcons.DrawIcon(smartToggleRect, SdfIconType.Lightbulb, new Color(1, 1, 1, Event.current.IsMouseOver(smartToggleRect) ? 0.8f : 0.3f)); + + if (Event.current.OnMouseDown(smartToggleRect, 0)) + { + Undo.RecordObject(table.Asset, "Added String Table Entry By Smart Toggle"); + entry = table.Asset.AddEntry(sharedEntry.Id, string.Empty); + + entry.IsSmart = !entry.IsSmart; + EditorUtility.SetDirty(table.Asset); + } + } + else + { + SdfIcons.DrawIcon(smartToggleRect, + entry.IsSmart ? SdfIconType.LightbulbFill : SdfIconType.Lightbulb, + new Color(1, 1, 1, Event.current.IsMouseOver(smartToggleRect) ? 0.8f : 0.3f)); + + if (Event.current.OnMouseDown(smartToggleRect, 0)) + { + Undo.RecordObject(entry.Table, "Toggled Smart Flag On String Entry"); + entry.IsSmart = !entry.IsSmart; + EditorUtility.SetDirty(entry.Table); + } + } + + GUI.Label(smartToggleRect, GUIHelper.TempContent(string.Empty, "Toggle Smart String")); + } + + protected override void MeasureAllEntries() + { + for (var i = 0; i < this.SharedEntries.Length; i++) + { + this.MeasureEntry(this.SharedEntries[i]); + } + + this.HasGUIChanged = true; + } + + protected override void MeasureVisibleEntries(ref OdinGUIScrollView.VisibleItems visibleItems) + { + int dataOffset = visibleItems.Offset; + + for (var i = 0; i < visibleItems.Length; i++) + { + if (!visibleItems.HasAssociatedData(i)) + { + continue; + } + + var sharedEntry = visibleItems.GetAssociatedData(i); + + this.MeasureEntry(sharedEntry); + + this.EntryScrollView.ReallocateRect(dataOffset + i, this.SharedEntryHeights[sharedEntry.Id], sharedEntry); + } + } + + private void MeasureEntry(SharedTableData.SharedTableEntry sharedEntry) + { + float height = OdinLocalizationConstants.ROW_HEIGHT; + + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable currentTable = this.GUITables[i]; + + switch (currentTable.Type) + { + case OdinGUITable.GUITableType.Default: + StringTableEntry strEntry = currentTable.Asset.GetEntry(sharedEntry.Id); + + if (strEntry is null) + { + continue; + } + +#if USING_WIDTH_NON_PERCENT + float strEntryHeight = MeasureText(strEntry.Value, currentTable.Width); +#else + float strEntryHeight = MeasureText(strEntry.Value, currentTable.Width); +#endif + + if (strEntryHeight > height) + { + height = strEntryHeight; + } + + break; + + case OdinGUITable.GUITableType.Key: +#if USING_WIDTH_NON_PERCENT + float keyHeight = MeasureText(sharedEntry.Key, currentTable.Width); +#else + float keyHeight = MeasureText(sharedEntry.Key, currentTable.Width); +#endif + + if (keyHeight > height) + { + height = keyHeight; + } + + break; + } + } + + this.SharedEntryHeights[sharedEntry.Id] = height; + } + + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs.meta new file mode 100644 index 000000000..6d0618d28 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinStringTableCollectionEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b8803d1557464e9a9d34713c9c9755af +timeCreated: 1704811189 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs new file mode 100644 index 000000000..35b03a641 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs @@ -0,0 +1,2719 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#define USING_WIDTH_NON_PERCENT +//#undef USING_WIDTH_NON_PERCENT + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Serialization; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public enum OdinTableSelectionType + { + None, + SharedEntry, + SharedTable, + Table, + TableEntry + } + + public abstract class OdinTableCollectionEditor where TCollection : LocalizationTableCollection + where TTable : LocalizationTable + where TEntry : TableEntry + { + public const int SELECTOR_ID = Int32.MinValue + 14085; + + internal struct DragInfo + { + public static DragInfo None => new DragInfo {Index = -1}; + + public bool IsNone => this.Index == -1; + + public int Index; + } + + [HideInInspector] + public TCollection Collection; + + [HideInInspector] + public OdinGUITableCollection GUITables; + + [HideInInspector] + public OdinSharedEntryCollection SharedEntries; + + [HideInInspector] + public Dictionary SharedEntryHeights; + + [HideInInspector] + public OdinGUIScrollView EntryScrollView; + + [HideInInspector] + public Dictionary> LocaleTableMap; + + [HideInInspector] + public SearchField SearchField = new SearchField(); + + [HideInInspector] + public OdinTableSelectionType SelectionType = OdinTableSelectionType.None; + + [HideInInspector] + public OdinGUITable CurrentSelectedTable; + + [HideInInspector] + public SharedTableData.SharedTableEntry CurrentSelectedSharedEntry; + + [HideInInspector] + public TEntry CurrentSelectedEntry; + + [HideInInspector] + public OdinMenuItem MenuItem; + + protected OdinMenuEditorWindow RelatedWindow; + protected int RelatedWindowId; + protected OdinLocalizationEditorWindow.WindowState WindowState; + + protected float PinnedWidth; + + protected OdinGUITable KeyTable; + + protected SirenixAnimationUtility.InterpolatedFloat SelectionAnimFloat = 0.0f; + + protected int ControlIdHint = "Odin_LocalizationEditor_Control".GetHashCode(); + protected int DragDropIdHint = "Odin_LocalizationEditor_DropId".GetHashCode(); + + private bool isForceDeleteKey; + private SharedTableData.SharedTableEntry keyToRemove; + //private bool isDraggingNonHandle; + + protected Action OnTableEntryModified; + + protected Action OnAssetTableEntryAdded; + + protected Action OnAssetTableEntryRemoved; + + //protected Dictionary guiIDs; + //protected Dictionary ControlIds; + + protected bool HasHandledCurrentModifiedEntry; + protected TEntry CurrentModifiedEntry; + + private Action OnTableAddedToCollection; + + private Action OnTableRemovedFromCollection; + + private Undo.UndoRedoCallback OnUndoRedoPerformed; + + private float rightMenuWidth; + + private OdinGUITable sortedTable; + + protected readonly List LooseTables = new List(); + + public OdinTableCollectionEditor(TCollection collection, OdinMenuEditorWindow relatedWindow, OdinLocalizationEditorWindow.WindowState windowState) + { + this.Collection = collection; + this.WindowState = windowState; + + this.GUITables = new OdinGUITableCollection(this.Collection.Tables.Count); + +#if USING_WIDTH_NON_PERCENT + this.GUITables.AddKeyTable(); +#else + float averageWidthPercent = 1.0f / (this.Collection.Tables.Count + 1); + + this.GUITables.AddKeyTable(averageWidthPercent); +#endif + this.KeyTable = this.GUITables.Last(); + + this.LocaleTableMap = new Dictionary>(this.Collection.Tables.Count); + + for (var i = 0; i < this.Collection.Tables.Count; i++) + { + var tableAsset = (TTable) this.Collection.Tables[i].asset; + + Locale tableLocale = LocalizationEditorSettings.GetLocale(tableAsset.LocaleIdentifier); + + if (tableLocale == null) + { + Debug.LogWarning($"No locale found for {tableAsset.name} in {this.Collection.name}, searched for: {tableAsset.LocaleIdentifier}"); + continue; + } + +#if USING_WIDTH_NON_PERCENT + OdinGUITable table = OdinGUITable.CreateTable(tableAsset, tableLocale); +#else + OdinGUITable table = OdinGUITable.CreateTable(tableAsset, averageWidthPercent); +#endif + + this.GUITables.Add(table); + + this.LocaleTableMap[LocalizationEditorSettings.GetLocale(tableAsset.LocaleIdentifier)] = table; + } + + this.SharedEntries = new OdinSharedEntryCollection(this.Collection); + + //this.ControlIds = new Dictionary(this.SharedEntries.Length + 64); + + this.EntryScrollView = new OdinGUIScrollView(this.SharedEntries.Length + 64, adjustViewForVerticalScrollBar: false); + + this.RelatedWindow = relatedWindow; + this.RelatedWindowId = this.RelatedWindow.GetInstanceID(); + this.keyToRemove = null; + this.isForceDeleteKey = false; + + this.LooseTables.Clear(); + LocalizationEditorSettings.FindLooseStringTablesUsingSharedTableData(this.Collection.SharedData, this.LooseTables); + this.rightMenuWidth = EditorPrefs.GetFloat("OdinTableCollectionEditor_RightMenuWidth", 300.0f); + + this.OnUndoRedoPerformed += () => + { + this.Collection.RefreshAddressables(); + this.MenuItem.Name = this.Collection.SharedData.TableCollectionName; + }; + } + + protected abstract void OnInitialize(); + + private bool hasInitialized; + + public void Initialize() + { + if (this.hasInitialized) + { + return; + } + + this.SharedEntryHeights = new Dictionary(this.SharedEntries.Length + 128); + + this.OnTableAddedToCollection += (collection, table) => + { + if (this.Collection != collection) + { + return; + } + + Locale locale = LocalizationEditorSettings.GetLocale(table.LocaleIdentifier); + + if (locale == null) + { + Debug.LogWarning($"No locale found for {table.name} in {collection.name}, searched for: {table.LocaleIdentifier}"); + return; + } + + if (this.LocaleTableMap.ContainsKey(locale)) + { + return; + } + +#if USING_WIDTH_NON_PERCENT + OdinGUITable guiTable = OdinGUITable.CreateTable((TTable) table, locale); +#else + float lastAveragePercent = 1.0f / this.GUITables.Count; + + float newAveragePercent = 1.0f / (this.GUITables.Count + 1); + + for (var i = 0; i < this.GUITables.Count; i++) + { + this.GUITables[i].WidthPercentage *= newAveragePercent / lastAveragePercent; + } + + OdinGUITable guiTable = OdinGUITable.CreateTable((TTable) table, newAveragePercent); +#endif + + this.GUITables.Add(guiTable); + + this.LocaleTableMap[locale] = guiTable; + + this.LooseTables.Clear(); + LocalizationEditorSettings.FindLooseStringTablesUsingSharedTableData(this.Collection.SharedData, this.LooseTables); + }; + + this.OnTableRemovedFromCollection += (collection, table) => + { + if (this.Collection != collection) + { + return; + } + +#if !USING_WIDTH_NON_PERCENT + float lastAveragePercent = 1.0f / this.GUITables.Count; +#endif + + Locale locale = LocalizationEditorSettings.GetLocale(table.LocaleIdentifier); + + this.GUITables.Remove(this.LocaleTableMap[locale]); + + this.LocaleTableMap.Remove(locale); + +#if !USING_WIDTH_NON_PERCENT + float newAveragePercent = 1.0f / this.GUITables.Count; + + for (var i = 0; i < this.GUITables.Count; i++) + { + this.GUITables[i].WidthPercentage *= newAveragePercent / lastAveragePercent; + } +#endif + + this.LooseTables.Clear(); + LocalizationEditorSettings.FindLooseStringTablesUsingSharedTableData(this.Collection.SharedData, this.LooseTables); + }; + +#if false + this.UndoHandler = () => + { + switch (Undo.GetCurrentGroupName()) + { + case "Add table to collection": + for (var i = 0; i < this.Collection.Tables.Count; i++) + { + LocalizationTable tableAsset = this.Collection.Tables[i].asset; + Locale locale = LocalizationEditorSettings.GetLocale(tableAsset.LocaleIdentifier); + + if (locale == null) + { + Debug.LogWarning($"No locale found for {tableAsset.name} in {this.Collection.name}, searched for: {tableAsset.LocaleIdentifier}"); + continue; + } + + if (this.LocaleTableMap.ContainsKey(locale)) + { + continue; + } + + OdinGUITable table = OdinGUITable.CreateTable((TTable) tableAsset, locale); + + this.GUITables.Add(table); + + this.LocaleTableMap.Add(locale, table); + + this.Collection.RemoveTable(tableAsset); + this.Collection.AddTable(tableAsset); + } + + var localesToRemove = new Stack(); + + foreach (KeyValuePair> kvp in this.LocaleTableMap) + { + if (!this.Collection.ContainsTable(kvp.Key.Identifier)) + { + localesToRemove.Push(kvp.Key); + } + } + + while (localesToRemove.Count > 0) + { + Locale locale = localesToRemove.Pop(); + OdinGUITable table = this.LocaleTableMap[locale]; + + this.GUITables.Remove(table); + this.LocaleTableMap.Remove(locale); + } + + break; + } + }; +#endif + + this.OnInitialize(); + + this.hasInitialized = true; + } + + private bool needsToCheckForErrors = false; + + public void OnSelectInWindow() + { + this.needsToCheckForErrors = true; + + this.Initialize(); + + this.AttachEvents(); + } + + private bool hasAttachedEvents; + + public void AttachEvents() + { + if (this.hasAttachedEvents) + { + return; + } + + // this.SharedEntries.AttachEvents(); + + if (this.OnTableEntryModified != null) + { + LocalizationEditorSettings.EditorEvents.TableEntryModified += this.OnTableEntryModified; + } + + if (this.OnAssetTableEntryAdded != null) + { + LocalizationEditorSettings.EditorEvents.AssetTableEntryAdded += this.OnAssetTableEntryAdded; + } + + if (this.OnAssetTableEntryRemoved != null) + { + LocalizationEditorSettings.EditorEvents.AssetTableEntryRemoved += this.OnAssetTableEntryRemoved; + } + + if (this.OnTableAddedToCollection != null) + { + LocalizationEditorSettings.EditorEvents.TableAddedToCollection += this.OnTableAddedToCollection; + } + + if (this.OnTableRemovedFromCollection != null) + { + LocalizationEditorSettings.EditorEvents.TableRemovedFromCollection += this.OnTableRemovedFromCollection; + } + + if (this.OnUndoRedoPerformed != null) + { + Undo.undoRedoPerformed += this.OnUndoRedoPerformed; + } + + this.hasAttachedEvents = true; + } + + public void DetachEvents() + { + if (!this.hasAttachedEvents) + { + return; + } + + // this.SharedEntries.DetachEvents(); + + if (this.OnTableEntryModified != null) + { + LocalizationEditorSettings.EditorEvents.TableEntryModified -= this.OnTableEntryModified; + } + + if (this.OnAssetTableEntryAdded != null) + { + LocalizationEditorSettings.EditorEvents.AssetTableEntryAdded -= this.OnAssetTableEntryAdded; + } + + if (this.OnAssetTableEntryRemoved != null) + { + LocalizationEditorSettings.EditorEvents.AssetTableEntryRemoved -= this.OnAssetTableEntryRemoved; + } + + if (this.OnTableAddedToCollection != null) + { + LocalizationEditorSettings.EditorEvents.TableAddedToCollection -= this.OnTableAddedToCollection; + } + + if (this.OnTableRemovedFromCollection != null) + { + LocalizationEditorSettings.EditorEvents.TableRemovedFromCollection -= this.OnTableRemovedFromCollection; + } + + if (this.OnUndoRedoPerformed != null) + { + Undo.undoRedoPerformed -= this.OnUndoRedoPerformed; + } + + this.hasAttachedEvents = false; + } + + public virtual void RemoveKey(SharedTableData.SharedTableEntry sharedEntry) + { + this.SharedEntryHeights.Remove(sharedEntry.Id); + + this.GUITables.UndoRecordCollection(this.Collection.SharedData, "Removed Shared Table Entry from Collection"); + + this.Collection.RemoveEntry(sharedEntry.Id); + + this.GUITables.SetDirty(this.Collection.SharedData); + } + + public void SelectEntry(TEntry entry) + { +#if false + if (this.Collection.SharedData.Metadata.HasMetadata()) + { + var templateMetadata = this.Collection.SharedData.Metadata.GetMetadata(); + + if (templateMetadata.MetadataExpected.Count > 0) + { + for (var i = 0; i < templateMetadata.MetadataExpected.Count; i++) + { + if (this.HasMetadataAmountOfType(entry.MetadataEntries, templateMetadata.MetadataExpected[i], templateMetadata)) + { + continue; + } + + entry.AddMetadata((IMetadata) templateMetadata.MetadataExpected[i].InstantiateDefault(false)); + } + } + } +#endif + + OdinTableSelectionType lastSelectionType = this.SelectionType; + + this.SelectionType = OdinTableSelectionType.TableEntry; + + TEntry lastSelection = this.CurrentSelectedEntry; + + this.CurrentSelectedEntry = entry; + + if (lastSelection == entry && this.SelectionType == lastSelectionType) + { + return; + } + + this.SelectionAnimFloat = 0.0f; + this.SelectionAnimFloat.Destination = 1.0f; + + if (this.WindowState.CurrentTopTab != OdinLocalizationEditorWindow.RightMenuTopTabs.Metadata) + { + return; + } + + this.WindowState.ShowSharedMetadata = false; + + this.UpdateMetadataViewForEntry(entry); + } + + public void SelectSharedEntry(SharedTableData.SharedTableEntry sharedEntry) + { + this.SelectionType = OdinTableSelectionType.SharedEntry; + + if (this.CurrentSelectedSharedEntry != sharedEntry) + { + this.SelectionAnimFloat = 0.0f; + this.SelectionAnimFloat.Destination = 1.0f; + } + + this.CurrentSelectedSharedEntry = sharedEntry; + + if (this.WindowState.CurrentTopTab != OdinLocalizationEditorWindow.RightMenuTopTabs.Metadata) + { + return; + } + + this.WindowState.ShowSharedMetadata = true; + + this.WindowState.MetadataTree?.Dispose(); + + this.WindowState.MetadataTree = PropertyTree.Create(sharedEntry); + } + + public void SelectTable(OdinGUITable table) + { + this.SelectionType = table.Type == OdinGUITable.GUITableType.Key + ? OdinTableSelectionType.SharedTable + : OdinTableSelectionType.Table; + this.CurrentSelectedTable = table; + } + + public void UpdateMetadataViewForEntry(TEntry entry) + { + this.WindowState.MetadataTree?.Dispose(); + + object metadataData = null; + + if (this.WindowState.ShowSharedMetadata) + { + metadataData = entry.SharedEntry; + } + else + { + if (typeof(TEntry) == typeof(AssetTableEntry)) + { + metadataData = OdinLocalizationReflectionValues.AssetTableEntry_Data_Property.GetValue(entry); + } + + if (typeof(TEntry) == typeof(StringTableEntry)) + { + metadataData = OdinLocalizationReflectionValues.StringTableEntry_Data_Property.GetValue(entry); + } + } + + if (metadataData != null) + { + this.WindowState.MetadataTree = PropertyTree.Create(metadataData); + } + } + + public bool IsSharedEntrySelected(SharedTableData.SharedTableEntry sharedEntry) + { + return this.SelectionType == OdinTableSelectionType.SharedEntry && this.CurrentSelectedSharedEntry == sharedEntry; + } + + public bool IsEntrySelected(TEntry entry) + { + if (entry == null) + { + return false; + } + + return this.SelectionType == OdinTableSelectionType.TableEntry && this.CurrentSelectedEntry == entry; + } + + public bool IsTableSelected(OdinGUITable table) + { + + return (this.SelectionType == OdinTableSelectionType.Table || + this.SelectionType == OdinTableSelectionType.SharedTable) && this.CurrentSelectedTable == table; + } + + public void ClearSelection() + { + GUIUtility.hotControl = 0; + GUIUtility.keyboardControl = 0; + this.SelectionType = OdinTableSelectionType.None; + this.WindowState.MetadataTree?.Dispose(); + this.WindowState.MetadataTree = null; + } + + public void ClearFocus() + { + GUIUtility.hotControl = 0; + GUIUtility.keyboardControl = 0; + } + + protected bool HasGUIChanged = true; + private int lastGUIEntryCount; + + + private bool firstTimeSeeingTable = true; + + private AddressableEntryNotFoundException tableAddressableException; + private string exceptionHeaderMsg = string.Empty; + private string exceptionMsg = string.Empty; + + + [OnInspectorGUI] + public void DrawAndHandleExceptions() + { + if (this.tableAddressableException != null) + { + const float SPACING = 10; + + Rect rect = GUILayoutUtility.GetRect(0, 0, GUILayoutOptions.ExpandWidth().ExpandHeight()); + + rect = rect.AlignCenter(520, 200); + + Color shadowColor = EditorGUIUtility.isProSkin ? new Color(1, 0, 0, 0.2588235f) : new Color(1, 0, 0, 0.3137255f); + + OdinLocalizationGUI.DrawRoundBlur20(rect, shadowColor); + + Color backgroundColor = EditorGUIUtility.isProSkin ? new Color(0.6037736f, 0.1566394f, 0.1566394f) : new Color(0.8301887f, 0.238875f, 0.238875f); + + SirenixEditorGUI.DrawRoundRect(rect, backgroundColor, 7.5f); + + rect = rect.Padding(14); + + Rect buttonsArea = rect.TakeFromBottom(32); + + GUI.BeginClip(rect.Expand(14)); + { + Rect watermarkPosition = rect.SetPosition(Vector2.zero).AlignRight(80).Expand(34).AddX(30).SubY(20); + + SdfIcons.DrawIcon(watermarkPosition, SdfIconType.ExclamationDiamondFill, new Color(1, 1, 1, 0.075f)); + } + GUI.EndClip(); + + rect.height -= SPACING; + + float msgHeight = OdinLocalizationGUI.CardTitleWhite.CalcHeight(this.exceptionHeaderMsg, rect.width); + GUI.Label(rect.TakeFromTop(msgHeight), this.exceptionHeaderMsg, OdinLocalizationGUI.CardTitleWhite); + + rect.yMin += SPACING; + + GUI.Label(rect, this.exceptionMsg, SirenixGUIStyles.MultiLineWhiteLabel); + + if (OdinLocalizationGUI.OverlaidButton(buttonsArea.TakeFromRight(120), "Fix All", SdfIconType.Tools)) + { + this.Collection.RefreshAddressables(); + this.tableAddressableException = null; + + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Tools, + $"Refreshed Addressables for '{this.Collection.name}'.", + new Color(0.26f, 0.51f, 0.44f), + 12.0f); + } + + buttonsArea.width -= SPACING; + + if (OdinLocalizationGUI.OverlaidButton(buttonsArea.TakeFromRight(160), "Fix And Preload All", SdfIconType.Tools)) + { + this.Collection.RefreshAddressables(); + this.Collection.SetPreloadTableFlag(true); + this.tableAddressableException = null; + + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Tools, + $"Refreshed Addressables and Preloaded All Tables for '{this.Collection.name}'.", + new Color(0.26f, 0.51f, 0.44f), + 12.0f); + } + + return; + } + + try + { + this.Draw(); + + if (this.needsToCheckForErrors) + { + // NOTE: this attempts to catch any AddressableEntryNotFoundException errors, by fetching the Addressables for every table. + this.Collection.IsPreloadTableFlagSet(); + + this.needsToCheckForErrors = false; + } + } + catch (AddressableEntryNotFoundException e) + { + this.tableAddressableException = e; + + this.exceptionHeaderMsg = e.Message; + this.exceptionMsg = $"There could be multiple other tables facing the same issue in '{this.Collection.name}', " + + "this can potentially be resolved by refreshing the Addressables."; + + GUIHelper.ExitGUI(false); + } + } + + public void Draw() + { + if (Event.current.type == EventType.MouseUp) + { + SharedUniqueControlId.SetInactive(); + } + + if (this.EntryScrollView.IsDraggingMouse) + { + EditorGUIUtility.AddCursorRect(this.EntryScrollView.InteractRect, MouseCursor.Pan); + } + + if (this.HasHandledCurrentModifiedEntry) + { + this.CurrentModifiedEntry = null; + } + + // if (Event.current.type == EventType.MouseUp) + // { + // this.isDraggingNonHandle = false; + // } + // + bool shouldClearSelection = Event.current.OnKeyDown(KeyCode.Escape, false); + + //this.SharedEntries.UpdateIfChangesArePresent(); + + Rect position = GUILayoutUtility.GetRect(0, 0, GUILayoutOptions.ExpandWidth().ExpandHeight()); + + position = this.RelatedWindow.position.SetPosition(Vector2.zero); + position.TakeFromRight(this.RelatedWindow.MenuWidth); + + var leftMenuSliderRect = position.TakeFromLeft(10).SubX(1); + var rightMenuRect = position.TakeFromRight(this.WindowState.RightMenuWidth); + var rightMenuSliderRect = position.TakeFromRight(11); + + this.RelatedWindow.MenuWidth += this.VerticalSlideRect(leftMenuSliderRect.AddXMax(1), false); + this.RelatedWindow.MenuWidth = Mathf.Max(this.RelatedWindow.MenuWidth, 1); + + if (Event.current.clickCount > 1 && Event.current.IsMouseOver(leftMenuSliderRect)) + { + this.RelatedWindow.MenuWidth = 1; + + if (Event.current.control || Event.current.alt || Event.current.shift) + { + this.WindowState.RightMenuWidth = 0; + } + } + + if (Event.current.clickCount > 1 && Event.current.IsMouseOver(rightMenuSliderRect)) + { + if (Event.current.control || Event.current.alt || Event.current.shift) + { + if (this.WindowState.RightMenuWidth > 0) + { + this.WindowState.RightMenuWidth = 0; + this.WindowState.LeftMenuWidth = 0; + } + else + { + this.WindowState.RightMenuWidth = this.WindowState.LastOpenRightMenuWidth; + this.RelatedWindow.MenuWidth = this.WindowState.LastOpenRightMenuWidth; + } + } + else + { + if (this.WindowState.RightMenuWidth > 0) + { + this.WindowState.RightMenuWidth = 0; + } + else + { + this.WindowState.RightMenuWidth = this.WindowState.LastOpenRightMenuWidth; + } + } + } + + Rect toolbarRect = position.TakeFromTop(OdinLocalizationConstants.TOOLBAR_HEIGHT); + + Rect dragHandleRect = position.TakeFromLeft(OdinLocalizationConstants.DRAG_HANDLE_WIDTH); + + this.DrawToolbar(toolbarRect); + + this.GUITables.Sort(); + +#if USING_WIDTH_NON_PERCENT + for (var i = 0; i < this.GUITables.Count; i++) + { + this.GUITables[i].Width = this.GUITables[i].Width; + } +#endif + + float viewWidth = position.width; + +#if USING_WIDTH_NON_PERCENT + float columnsWidth = this.GUITables.GetVisibleWidth(); + + if (columnsWidth >= viewWidth) + { + viewWidth = columnsWidth; + } +#else + int columnsMinTotalWidth = this.GUITables.GetVisibleCount() * OdinLocalizationConstants.DEFAULT_COLUMN_WIDTH; + + if (columnsMinTotalWidth > viewWidth) + { + viewWidth = columnsMinTotalWidth; + } +#endif + + if (position != this.EntryScrollView.InteractRect) + { + this.HasGUIChanged = true; + } + + bool isEntryCountChanged = this.Collection.SharedData.Entries.Count != this.lastGUIEntryCount; + + if (this.HasGUIChanged || isEntryCountChanged) + { +#if false + if (isEntryCountChanged) + { + if (this.SharedEntries.IsSorted) + { + this.Resort(); + } + + if (this.SharedEntries.IsSearching) + { + this.SharedEntries.UpdateSearchTerm(this.SharedEntries.SearchTerm, this.GUITables, this.Collection); + } + } +#endif + + this.HasGUIChanged = false; + + if (isEntryCountChanged) + { + if (this.SharedEntries.IsSorted) + { + switch (this.sortedTable.Type) + { + case OdinGUITable.GUITableType.Default: + switch (this.sortedTable.Asset) + { + case AssetTable assetTable: + this.SharedEntries.SortByAssetTable(this.Collection as AssetTableCollection, assetTable, false); + break; + + case StringTable stringTable: + this.SharedEntries.SortByStringTable(stringTable, false); + break; + } + + break; + + case OdinGUITable.GUITableType.Key: + this.SharedEntries.SortByKeys(false); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + + if (this.SharedEntries.IsSearching) + { + this.SharedEntries.UpdateSearchTerm(this.SharedEntries.SearchTerm, this.GUITables, this.Collection, true); + } + } + + this.lastGUIEntryCount = this.Collection.SharedData.Entries.Count; + + float previousY = this.EntryScrollView.PositionY; + + this.EntryScrollView.SetBounds(position, viewWidth); + + this.EntryScrollView.BeginAllocations(); + { + this.AllocateItems(); + } + this.EntryScrollView.EndAllocations(); + + if (this.adjustViewForSeparatorChange && + this.lastViewHeight != 0.0f && + Math.Abs(this.lastViewHeight - this.EntryScrollView.ViewRect.height) > 0.01f) + { + float newHeight = this.EntryScrollView.ViewRect.height; + + float change = previousY / this.lastViewHeight; + + this.EntryScrollView.PositionY = change * newHeight; + + this.adjustViewForSeparatorChange = false; + } + } + else + { + this.EntryScrollView.SetBoundsForCurrentAllocations(position, viewWidth); + } + +#if !USING_WIDTH_NON_PERCENT + this.GUITables.CalcWidths(this.EntryScrollView); +#endif + + this.PinnedWidth = 0.0f; + + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable table = this.GUITables[i]; + + if (!table.IsVisible || !table.IsPinned) + { + continue; + } + +#if USING_WIDTH_NON_PERCENT + this.PinnedWidth += table.Width; +#else + this.PinnedWidth += this.GUITables[i].Width; +#endif + } + + if (this.PinnedWidth > this.EntryScrollView.Bounds.width) + { + this.PinnedWidth = this.EntryScrollView.Bounds.width; + this.GUITables.ResizePinnedToFit(this.EntryScrollView.Bounds.width); + } + + this.GUITables.UpdateVisibleTables(this.EntryScrollView, this.PinnedWidth); + + if (this.firstTimeSeeingTable && columnsWidth < viewWidth) + { + this.GUITables.ResizeToFit(this.EntryScrollView.Bounds.width - this.PinnedWidth); + this.firstTimeSeeingTable = false; + } + + + OdinGUIScrollView.VisibleItems visibleItems = this.EntryScrollView.GetVisibleItems(); + + this.DrawRows(ref visibleItems); + + this.DrawPseudoRows(); + + this.DrawItems(ref visibleItems); + + this.DrawColumnsAndSeparators(ref visibleItems); + + this.DrawDragHandles(dragHandleRect, ref visibleItems); + + this.DrawRightMenu(rightMenuRect); + + if (this.keyToRemove != null) + { + if (this.isForceDeleteKey || + EditorUtility.DisplayDialog("Odin Table Collection Editor", $"Are you sure you want to remove entry: {this.keyToRemove.Key}?", "Yes", "No")) + { + this.RemoveKey(this.keyToRemove); + } + + this.keyToRemove = null; + this.isForceDeleteKey = false; + } + + if (shouldClearSelection) + { + this.ClearSelection(); + } + + this.EntryScrollView.HandleMiddleMouseDrag(inverted: OdinLocalizationConfig.Instance.invertMouseDragNavigation, + speed: OdinLocalizationConfig.Instance.mouseDragSpeed); + + + this.WindowState.RightMenuWidth -= this.VerticalSlideRect(rightMenuSliderRect, true); + this.WindowState.RightMenuWidth = Mathf.Max(this.WindowState.RightMenuWidth, 0); + + if (this.WindowState.RightMenuWidth > 338) + { + this.WindowState.LastOpenRightMenuWidth = this.WindowState.RightMenuWidth; + } + } + + protected abstract void AllocateItems(); + + protected abstract void DrawItems(ref OdinGUIScrollView.VisibleItems visibleItems); + + protected abstract void MeasureAllEntries(); + + protected abstract void MeasureVisibleEntries(ref OdinGUIScrollView.VisibleItems visibleItems); + + // NOTE: returns true if pressed, TODO add xml comments later + protected static bool DrawCell(Rect rect, bool isEven) + { + Color background = isEven ? OdinLocalizationGUI.RowEvenBackground2 : OdinLocalizationGUI.RowOddBackground2; + + GUI.DrawTexture(rect, Texture2D.whiteTexture, ScaleMode.StretchToFill, false, 1, background, 0, 2.5f); + + if (Event.current.IsMouseOver(rect) && !DragAndDropUtilities.IsDragging) + { + GUI.DrawTexture(rect, Texture2D.whiteTexture, ScaleMode.StretchToFill, false, 1, OdinLocalizationGUI.RowBorderHover, 1, 2.5f); + } + else + { + GUI.DrawTexture(rect, Texture2D.whiteTexture, ScaleMode.StretchToFill, false, 1, OdinLocalizationGUI.RowBorder, 1, 2.5f); + } + + rect.x += OdinLocalizationConstants.ROW_MENU_WIDTH; + rect.width -= OdinLocalizationConstants.ROW_MENU_WIDTH + OdinLocalizationConstants.ROW_MENU_WIDTH; + bool isPressed = Event.current.OnMouseDown(rect, 0, false); + + return isPressed; + } + + protected void DrawKey(Rect rect, SharedTableData.SharedTableEntry sharedEntry, int id) + { + Rect removeRect = rect.TakeFromLeft(OdinLocalizationConstants.ROW_MENU_WIDTH); + Rect copyKeyIdRect = rect.TakeFromRight(OdinLocalizationConstants.ROW_MENU_WIDTH); + + Color removeBgColor = Event.current.IsMouseOver(removeRect) ? new Color(0.8f, 0.1f, 0.1f, 0.8f) : new Color(0, 0, 0, 0.2f); + + GUI.DrawTexture(removeRect, Texture2D.whiteTexture, ScaleMode.StretchToFill, false, 1.0f, removeBgColor, Vector4.zero, + new Vector4(2.5f, 0.0f, 0.0f, 2.5f)); + + if (Event.current.OnMouseDown(removeRect, 0)) + { + this.keyToRemove = sharedEntry; + + if (Event.current.modifiers == EventModifiers.Shift) + { + this.isForceDeleteKey = true; + } + + this.ClearSelection(); + + return; + } + + Color removeFgColor = Event.current.IsMouseOver(removeRect) ? new Color(1, 1, 1, 0.8f) : new Color(1, 1, 1, 0.5f); + + removeRect = removeRect.AlignCenter(14, 14); + + SdfIcons.DrawIcon(removeRect, SdfIconType.X, removeFgColor); + + // copyKeyIdRect.x -= 20; + + copyKeyIdRect = copyKeyIdRect.AlignCenter(16, 16); + + var isMouseOverKeyRect = Event.current.IsMouseOver(copyKeyIdRect); + + Matrix4x4 m = GUI.matrix; + GUIUtility.RotateAroundPivot(45.0f, copyKeyIdRect.center); + SdfIcons.DrawIcon(copyKeyIdRect, SdfIconType.KeyFill, new Color(1, 1, 1, isMouseOverKeyRect ? 0.8f : 0.3f)); + GUI.matrix = m; + + if (isMouseOverKeyRect) + { + GUI.Label(copyKeyIdRect, GUIHelper.TempContent(string.Empty, "Copy Shared Entry Id")); + } + + if (Event.current.OnMouseDown(copyKeyIdRect, 0)) + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Clipboard, + $"Copied Shared Entry Id '{sharedEntry.Id}' to the clipboard.", + new Color(0.23f, 0.36f, 0.68f), + 8.0f); + + Clipboard.Copy(sharedEntry.Id.ToString()); + + this.ClearSelection(); + } + + string result = OdinLocalizationGUI.TextField(rect, sharedEntry.Key, out bool changed, id); + + if (!changed) + { + return; + } + + if (this.Collection.SharedData.Contains(result) && result != sharedEntry.Key) + { + this.RelatedWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationOctagonFill, + $"Key '{result}' already exists in the collection.", + new Color(0.68f, 0.2f, 0.2f), + 8.0f); + } + else + { + Undo.RecordObject(this.Collection.SharedData, "Renamed Shared Table Entry Key"); + this.Collection.SharedData.RenameKey(sharedEntry.Id, result); + OdinLocalizationEvents.RaiseTableEntryModified(sharedEntry); + EditorUtility.SetDirty(this.Collection.SharedData); + } + } + + protected static float MeasureText(string text, float width) + { + // TODO: get rid of this magic number + width -= 20 + 20 + 8 + 16; + + float rowHeightWithoutText = OdinLocalizationConstants.ROW_HEIGHT - SirenixGUIStyles.MultiLineCenteredLabel.lineHeight; + + float heightOfText = SirenixGUIStyles.MultiLineCenteredLabel.CalcHeight(text, width) - SirenixGUIStyles.MultiLineCenteredLabel.padding.vertical; + + return rowHeightWithoutText + heightOfText; + } + + private void DrawToolbar(Rect position) + { + Rect originalPosition = position; + + Rect resizeToFitButtonRect = position.TakeFromRight(180f); + Rect addButtonRect = position.TakeFromRight(180f); + + position = position.Padding(4); + + if (GUI.Button(resizeToFitButtonRect, "Resize Columns To Fit", SirenixGUIStyles.ToolbarButton)) + { + this.GUITables.ResizeToFit(this.EntryScrollView.Bounds.width - this.PinnedWidth); + this.HasGUIChanged = true; + } + + if (GUI.Button(addButtonRect, "Add Shared Entry", SirenixGUIStyles.ToolbarButton)) + { + this.GUITables.UndoRecordCollection(this.Collection.SharedData, "Added Shared Entry To Collection"); + SharedTableData.SharedTableEntry sharedEntry = this.Collection.SharedData.AddKey(); + + OdinLocalizationEvents.RaiseTableEntryAdded(this.Collection, sharedEntry); + this.GUITables.SetDirty(this.Collection.SharedData); + } + + string searchTerm = this.SearchField.Draw(position, this.SharedEntries.SearchTerm, "Search for item(s)..."); + + if (this.SharedEntries.UpdateSearchTerm(searchTerm, this.GUITables, this.Collection)) + { + this.HasGUIChanged = true; + } + + if (!EditorGUIUtility.isProSkin) + { + EditorGUI.DrawRect(originalPosition, new Color(0, 0, 0, 0.05f)); + } + } + + private void DrawRows(ref OdinGUIScrollView.VisibleItems visibleItems) + { + Rect clipRect = this.EntryScrollView.GetClipRect(); + + clipRect.x -= OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + clipRect.width += OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + + this.EntryScrollView.BeginClip(clipRect, offset: new Vector2(0, OdinLocalizationConstants.COLUMN_HEIGHT)); + { + for (var i = 0; i < visibleItems.Length; i++) + { + Rect rect = visibleItems.GetRect(i); + + Rect dropZoneRect = rect; + + rect.width += OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + + bool isEven = (visibleItems.Offset + i) % 2 == 0; + + EditorGUI.DrawRect(rect, isEven ? OdinLocalizationGUI.RowEvenBackground : OdinLocalizationGUI.RowOddBackground); + + this.HandleDropZone(dropZoneRect, visibleItems.Offset + i); + } + } + this.EntryScrollView.EndClip(); + } + + private void DrawPseudoRows() + { + if (this.EntryScrollView.IsBeyondVerticalBounds) + { + return; + } + + var remainderRect = new Rect(this.EntryScrollView.Bounds.x - OdinLocalizationConstants.DRAG_HANDLE_WIDTH, + this.EntryScrollView.Bounds.y + this.EntryScrollView.ViewRect.height + OdinLocalizationConstants.COLUMN_HEIGHT, + this.EntryScrollView.Bounds.width + OdinLocalizationConstants.DRAG_HANDLE_WIDTH, + this.EntryScrollView.Bounds.height - this.EntryScrollView.ViewRect.height - OdinLocalizationConstants.COLUMN_HEIGHT); + + Rect maintainedRemainderRect = remainderRect; + + bool isNextEven = this.SharedEntries.Length % 2 == 0; + + while (remainderRect.height > 0) + { + Rect rect = remainderRect.TakeFromTop(OdinLocalizationConstants.ROW_HEIGHT); + Color color = isNextEven ? OdinLocalizationGUI.RowEvenBackground : OdinLocalizationGUI.RowOddBackground; + + EditorGUI.DrawRect(rect, color); + + isNextEven = !isNextEven; + } + + EditorGUI.DrawRect(maintainedRemainderRect, new Color(0, 0, 0, 0.25f)); + } + + private void DrawColumnsAndSeparators(ref OdinGUIScrollView.VisibleItems visibleItems) + { + EditorGUI.DrawRect(this.EntryScrollView.Bounds.AlignTop(OdinLocalizationConstants.COLUMN_HEIGHT), OdinLocalizationGUI.ColumnBackground); + + Rect columnArea = this.EntryScrollView.ViewRect; + + if (!this.EntryScrollView.IsBeyondVerticalBounds) + { + columnArea.height = this.EntryScrollView.Bounds.height; + } + + int lastIndex = this.GUITables.GetLastVisibleIndex(); + + this.EntryScrollView.BeginClip(offset: new Vector2(this.PinnedWidth, 0), ignoreScrollY: true); + { + this.DrawColumns(ref visibleItems, columnArea.AlignRight(columnArea.width), false, lastIndex); + } + this.EntryScrollView.EndClip(); + + int lastPinnedIndex = this.GUITables.GetLastVisiblePinnedIndex(); + + this.EntryScrollView.BeginClip(ignoreScrollX: true, ignoreScrollY: true); + { + this.DrawColumns(ref visibleItems, columnArea, true, lastPinnedIndex); + } + this.EntryScrollView.EndClip(); + + if (this.PinnedWidth > 0.0f && this.PinnedWidth + 20 <= this.EntryScrollView.Bounds.width) + { + Rect shadowRect = this.EntryScrollView.Bounds; + + shadowRect.x += this.PinnedWidth; + shadowRect.width = 24; + + GUI.DrawTexture(shadowRect, OdinLocalizationGUITextures.LeftToRightFade, ScaleMode.StretchToFill, true, 1.0f, new Color(0, 0, 0, 0.35f), 0, 0); + } + } + + private void DrawColumns(ref OdinGUIScrollView.VisibleItems visibleItems, Rect columnArea, bool pinned, int lastIndex) + { + for (var i = 0; i < this.GUITables.Count; i++) + { + OdinGUITable table = this.GUITables[i]; + + if (table.IsPinned != pinned) + { + continue; + } + + if (!this.GUITables.TablesWithinVisibleBounds.Contains(table)) + { + columnArea.TakeFromLeft(table.Width); + continue; + } + +#if USING_WIDTH_NON_PERCENT + Rect columnRect = columnArea.TakeFromLeft(table.Width); +#else + Rect columnRect = columnArea.TakeFromLeft(table.Width); +#endif + + Rect columnHeaderRect = columnRect.AlignTop(OdinLocalizationConstants.COLUMN_HEIGHT); + + bool isSelected = this.IsTableSelected(table); + + if (isSelected) + { + FancyColor.PushBlend(FancyColor.Gray.Lerp(OdinLocalizationGUI.Selected, 0.5f), FancyColor.BlendMode.Overlay); + EditorGUI.DrawRect(columnHeaderRect, OdinLocalizationGUI.ColumnBackground); + } + + Rect interactColumnRect = columnHeaderRect.Padding(4, 0); + + if (Event.current.IsMouseOver(interactColumnRect)) + { + EditorGUI.DrawRect(columnHeaderRect, new Color(1.0f, 1.0f, 1.0f, 0.035f)); + } + + Rect pinRect = columnHeaderRect.TakeFromRight(30).SubXMax(10).AlignMiddle(18); + SdfIconType pinIcon = table.IsPinned ? SdfIconType.PinAngleFill : SdfIconType.PinAngle; + + GUI.Label(pinRect, GUIHelper.TempContent(string.Empty, "Pin Table")); + + if (Event.current.IsMouseOver(pinRect)) + { + SdfIcons.DrawIcon(pinRect, pinIcon, Color.white); + } + else + { + SdfIcons.DrawIcon(pinRect, pinIcon); + } + + if (Event.current.OnMouseDown(pinRect, 0)) + { + table.IsPinned = !table.IsPinned; + + this.ClearFocus(); + } + + float columnTextWidth = SirenixGUIStyles.LabelCentered.CalcWidth(table.DisplayName); + + Rect minSortRect = columnHeaderRect.TakeFromLeft(30).AddXMin(10); + + Rect sortRect = columnHeaderRect.AlignCenter(20, 18); + + sortRect.x -= columnTextWidth * 0.5f + 12.0f; + + if (sortRect.x < minSortRect.x) + { + sortRect = minSortRect.AlignMiddle(18); + } + + sortRect = sortRect.AlignCenter(16, 16); + + if (EditorGUIUtility.isProSkin) + { + GUI.Label(columnHeaderRect, table.DisplayName, SirenixGUIStyles.LabelCentered); + } + else + { + var t = SirenixGUIStyles.LabelCentered.normal.textColor; + SirenixGUIStyles.LabelCentered.normal.textColor = new Color(0, 0, 0, 0.7f); + GUI.Label(columnHeaderRect, table.DisplayName, SirenixGUIStyles.LabelCentered); + SirenixGUIStyles.LabelCentered.normal.textColor = t; + } + + SdfIconType sortIcon; + + if (this.sortedTable == table) + { + switch (this.SharedEntries.CurrentSortOrderState) + { + case OdinSharedEntryCollection.SortOrderState.Unsorted: + sortIcon = SdfIconType.ArrowDownUp; + break; + + case OdinSharedEntryCollection.SortOrderState.Ascending: + sortIcon = SdfIconType.ArrowDown; + break; + + case OdinSharedEntryCollection.SortOrderState.Descending: + sortIcon = SdfIconType.ArrowUp; + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + else + { + sortIcon = SdfIconType.ArrowDownUp; + } + + if (Event.current.IsMouseOver(sortRect)) + { + SdfIcons.DrawIcon(sortRect, sortIcon, Color.white); + } + else + { + SdfIcons.DrawIcon(sortRect, sortIcon); + } + + GUI.Label(sortRect, GUIHelper.TempContent(string.Empty, "Sort Table")); + + if (Event.current.OnMouseDown(sortRect, 0)) + { + bool wasSorted = this.SharedEntries.IsSorted && this.sortedTable != table; + + if (this.sortedTable == table || this.SharedEntries.CurrentSortOrderState == OdinSharedEntryCollection.SortOrderState.Unsorted) + { + this.SharedEntries.GotoNextSortOrderState(); + } + + switch (table.Type) + { + case OdinGUITable.GUITableType.Default: + switch (table.Asset) + { + case AssetTable assetTable: + this.SharedEntries.SortByAssetTable(this.Collection as AssetTableCollection, assetTable, wasSorted); + break; + + case StringTable stringTable: + this.SharedEntries.SortByStringTable(stringTable, wasSorted); + break; + } + + break; + + case OdinGUITable.GUITableType.Key: + this.SharedEntries.SortByKeys(wasSorted); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + this.sortedTable = table; + + this.ClearFocus(); + + this.HasGUIChanged = true; + } + + if (Event.current.OnMouseDown(interactColumnRect, 0)) + { + this.SelectTable(table); + } + + if (isSelected) + { + FancyColor.PopBlend(); + } + +#if !USING_WIDTH_NON_PERCENT + if (i == lastIndex) + { + continue; + } +#endif + + this.DrawSeparator(ref visibleItems, columnRect, table, i, lastIndex); + } + } + + private bool hasSeparatorChanged = false; + private bool adjustViewForSeparatorChange = false; + private float lastViewHeight; + + private void DrawSeparator(ref OdinGUIScrollView.VisibleItems visibleItems, Rect columnRect, OdinGUITable table, int index, int lastIndex) + { + Rect separatorRect = columnRect.AlignRight(1); + + EditorGUI.DrawRect(separatorRect, OdinLocalizationGUI.RowBorder); + + Rect separatorMouseRect = separatorRect.Expand(1, 0); + + switch (Event.current.type) + { + case EventType.MouseDown: + if (Event.current.button == 0 && Event.current.IsMouseOver(separatorMouseRect)) + { + //this.isDraggingNonHandle = true; + this.ClearFocus(); + } + + break; + + case EventType.MouseUp: + //if (this.isDraggingNonHandle) + //{ + // NOTE: we only adjust the ones we can see while we drag separators, to avoid unnecessary computations. + if (this.hasSeparatorChanged) + { + this.MeasureAllEntries(); + this.hasSeparatorChanged = false; + + this.adjustViewForSeparatorChange = true; + } + //} + + //this.isDraggingNonHandle = false; + break; + } + + Vector2 slideAmount = table.HandleSlider(separatorMouseRect); + + if (slideAmount.x == 0.0f) + { + return; + } + + if (!this.hasSeparatorChanged) + { + this.lastViewHeight = this.EntryScrollView.ViewRect.height; + } + + + this.hasSeparatorChanged = true; + +#if USING_WIDTH_NON_PERCENT + this.AppendWidth(slideAmount.x, index, lastIndex); +#else + float newWidth = table.Width + slideAmount.x; + + OdinGUITable nextTable = this.GUITables.GetNextVisible(index); + + float nextNewWidth = nextTable.Width - slideAmount.x; + + if (nextNewWidth < OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + float diff = OdinLocalizationConstants.MIN_COLUMN_WIDTH - nextNewWidth; + + newWidth -= diff; + + nextNewWidth += diff; + } + + if (newWidth < OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + float diff = OdinLocalizationConstants.MIN_COLUMN_WIDTH - newWidth; + + newWidth += diff; + + nextNewWidth -= diff; + } + + table.WidthPercentage *= newWidth / table.Width; + + nextTable.WidthPercentage *= nextNewWidth / nextTable.Width; +#endif + this.MeasureVisibleEntries(ref visibleItems); + } + + private void AppendWidth(float change, int index, int lastIndex) + { + OdinGUITable table = this.GUITables[index]; + + table.Width += change; + + if (change < 0.0f && table.Width <= OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + int previousIndex = index - 1; + + while (previousIndex > -1) + { + OdinGUITable previousTable = this.GUITables[previousIndex]; + + if (previousTable.IsPinned != table.IsPinned) + { + break; + } + + previousTable.Width += change; + + if (previousTable.Width <= OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + previousIndex--; + continue; + } + + break; + } + + if (previousIndex == -1) + { + previousIndex = 0; + } + + if (index != lastIndex && this.GUITables[previousIndex].Width > OdinLocalizationConstants.MIN_COLUMN_WIDTH) + { + this.GUITables[index + 1].Width -= change; + } + } + else if (index != lastIndex) + { + this.GUITables[index + 1].Width -= change; + } + } + + private void DrawDragHandles(Rect position, ref OdinGUIScrollView.VisibleItems visibleItems) + { + if (this.EntryScrollView.IsBeyondHorizontalBounds) + { + OdinGUIScrollView.ScrollBackground(position.AlignBottom(OdinGUIScrollView.SCROLL_BAR_SIZE), false); + } + + Rect clipRect = this.EntryScrollView.GetClipRect(); + + clipRect.x -= position.width; + clipRect.width = position.width; + + this.EntryScrollView.BeginClip(clipRect, offset: new Vector2(0, OdinLocalizationConstants.COLUMN_HEIGHT), ignoreScrollX: true); + { + if (this.SharedEntries.IsSorted || this.SharedEntries.IsSearching) //(this.isDraggingNonHandle) + { + for (var i = 0; i < visibleItems.Length; i++) + { + Rect dragHandleRect = visibleItems.GetRect(i); + + dragHandleRect.width = OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + + dragHandleRect.x += 2; + dragHandleRect.width -= 4; + + if (EditorGUIUtility.isProSkin) + { + SdfIcons.DrawIcon(dragHandleRect.AlignMiddle(16), SdfIconType.GripVertical, new Color(0.35f, 0.35f, 0.35f, 1.0f)); + } + else + { + SdfIcons.DrawIcon(dragHandleRect.AlignMiddle(16), SdfIconType.GripVertical, new FancyColor(0.66f)); + } + } + } + else + { + bool isDraggingAnything = this.IsDraggingAnything(); + + for (var i = 0; i < visibleItems.Length; i++) + { + Rect dragHandleRect = visibleItems.GetRect(i); + + dragHandleRect.width = OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + + bool isMouseOver = Event.current.IsMouseOver(dragHandleRect); + + if (!isDraggingAnything) + { + var dragData = new DragInfo {Index = visibleItems.Offset + i}; + DragAndDropUtilities.DragZone(dragHandleRect, dragData, false, false); + } + + dragHandleRect.x += 2; + dragHandleRect.width -= 4; + + if (EditorGUIUtility.isProSkin) + { + SdfIcons.DrawIcon(dragHandleRect.AlignMiddle(16), SdfIconType.GripVertical, new Color(1, 1, 1, isMouseOver ? 0.8f : 0.6f)); + } + else + { + SdfIcons.DrawIcon(dragHandleRect.AlignMiddle(16), SdfIconType.GripVertical, new Color(0, 0, 0, isMouseOver ? 0.6f : 0.4f)); + } + } + } + } + this.EntryScrollView.EndClip(); + + EditorGUI.DrawRect(position.TakeFromTop(OdinLocalizationConstants.COLUMN_HEIGHT), OdinLocalizationGUI.ColumnBackground); + } + + // NOTE: for now we pass by index, since you can't drag stuff around when you're searching or sorting + private void HandleDropZone(Rect position, int indexTo) + { + position.x += OdinLocalizationConstants.DRAG_HANDLE_WIDTH; + + float halfHeight = position.height * 0.5f; + + Rect topDropRect = position.AlignTop(halfHeight); + Rect bottomDropRect = position.AlignBottom(halfHeight); + + int topId = this.DragDropIdHint + indexTo; + + DragInfo topValue = DragAndDropUtilities.DropZone(topDropRect, DragInfo.None, this.DragDropIdHint + indexTo); + + int bottomId = this.DragDropIdHint + indexTo + this.SharedEntries.Length; + + DragInfo bottomValue = DragAndDropUtilities.DropZone(bottomDropRect, DragInfo.None, bottomId); + + if (DragAndDropUtilities.IsDragging) + { + if (DragAndDropUtilities.HoveringAcceptedDropZone == topId) + { + if (EditorGUIUtility.isProSkin) + { + GUI.DrawTexture(topDropRect.AlignTop(40.0f).SubXMin(OdinLocalizationConstants.DRAG_HANDLE_WIDTH), + OdinLocalizationGUITextures.TopToBottomFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0.16f, 0.7f, 1f, 0.25f), + Vector4.zero, + Vector4.zero); + } + else + { + GUI.DrawTexture(topDropRect.AlignTop(40.0f).SubXMin(OdinLocalizationConstants.DRAG_HANDLE_WIDTH), + OdinLocalizationGUITextures.TopToBottomFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0.8f, 0.8f, 1, 0.7f), + Vector4.zero, + Vector4.zero); + } + //EditorGUI.DrawRect(topDropRect.AlignTop(1), new Color(0, 1, 1, 0.5f)); + } + + if (DragAndDropUtilities.HoveringAcceptedDropZone == bottomId) + { + if (EditorGUIUtility.isProSkin) + { + GUI.DrawTexture(bottomDropRect.AlignBottom(40.0f).SubXMin(OdinLocalizationConstants.DRAG_HANDLE_WIDTH), + OdinLocalizationGUITextures.BottomToTopFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0.16f, 0.7f, 1f, 0.25f), + Vector4.zero, + Vector4.zero); + } + else + { + GUI.DrawTexture(bottomDropRect.AlignBottom(40.0f).SubXMin(OdinLocalizationConstants.DRAG_HANDLE_WIDTH), + OdinLocalizationGUITextures.BottomToTopFade, + ScaleMode.StretchToFill, + true, + 1.0f, + new Color(0.8f, 0.8f, 1, 0.7f), + Vector4.zero, + Vector4.zero); + } + //EditorGUI.DrawRect(bottomDropRect.AlignBottom(1), new Color(0, 1, 1, 0.5f)); + } + } + + if (!topValue.IsNone) + { + this.SharedEntries.MoveEntry(topValue.Index, indexTo); + + this.HasGUIChanged = true; + + return; + } + + if (!bottomValue.IsNone) + { + this.SharedEntries.MoveEntry(bottomValue.Index, indexTo + 1); + + this.HasGUIChanged = true; + } + } + + protected void MoveScrollPositionToTable(OdinGUITable table) + { + var x = 0.0f; + +#if USING_WIDTH_NON_PERCENT + for (var i = 0; i < this.GUITables.Count; i++) + { + if (this.GUITables[i] == table) + { + x += this.GUITables[i].Width * 0.5f; + break; + } + + if (!this.GUITables[i].IsVisible || this.GUITables[i].IsPinned) + { + continue; + } + + x += this.GUITables[i].Width; + } +#else + for (var i = 0; i < this.GUITables.Count; i++) + { + if (this.GUITables[i] == table) + { + x += this.GUITables[i].Width * 0.5f; + break; + } + + if (!this.GUITables[i].IsVisible || this.GUITables[i].IsPinned) + { + continue; + } + + x += this.GUITables[i].Width; + } +#endif + + x -= this.EntryScrollView.Bounds.width * 0.5f; + + x += this.PinnedWidth * 0.5f; + + this.EntryScrollView.ScrollTo(1.0f / 0.35f, xPosition: x, easing: Easing.OutQuad); + } + + private float rightMenuTopPanelHeight; + private Rect topPanelRect = Rect.zero; + private Rect bottomPanelRect = Rect.zero; + + private void DrawRightMenu(Rect position) + { + EditorGUI.DrawRect(position, OdinLocalizationGUI.WindowBackground); + + var topPanelMaxHeight = position.height - 32; + this.topPanelRect = position.TakeFromTop(this.WindowState.RightMenuTopPanelHeight); + var topSlideRect = this.topPanelRect.TakeFromBottom(14); + this.bottomPanelRect = position; + + this.WindowState.RightMenuTopPanelHeight += this.HorizontalSlideRect(topSlideRect); + // 183 is enough height to show exactly 3 collapsed entries. + this.WindowState.RightMenuTopPanelHeight = Mathf.Clamp(this.WindowState.RightMenuTopPanelHeight, 183, topPanelMaxHeight); + + EditorGUI.DrawRect(this.topPanelRect, OdinLocalizationGUI.Panel); + EditorGUI.DrawRect(this.bottomPanelRect, OdinLocalizationGUI.Panel); + + + EditorGUI.DrawRect(this.topPanelRect.AlignTop(32), OdinLocalizationGUI.TabsBackground); + EditorGUI.DrawRect(this.bottomPanelRect.AlignTop(32), OdinLocalizationGUI.TabsBackground); + + this.WindowState.CurrentTopTab = OdinLocalizationGUI.Tabs(this.topPanelRect.TakeFromTop(32), this.WindowState.CurrentTopTab, 115); + + this.WindowState.CurrentBottomTab = OdinLocalizationGUI.Tabs(this.bottomPanelRect.TakeFromTop(32), this.WindowState.CurrentBottomTab, 115); + + switch (this.WindowState.CurrentTopTab) + { + case OdinLocalizationEditorWindow.RightMenuTopTabs.Metadata: + this.DrawTopTabMetadata(this.topPanelRect); + break; + + case OdinLocalizationEditorWindow.RightMenuTopTabs.Settings: + this.DrawTopTabSettings(this.topPanelRect); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + switch (this.WindowState.CurrentBottomTab) + { + case OdinLocalizationEditorWindow.RightMenuBottomTabs.Locale: + this.DrawBottomTabLocale(this.bottomPanelRect); + break; + +#if false + case OdinLocalizationEditorWindow.RightMenuBottomTabs.Template: + this.DrawBottomTabTemplate(this.bottomPanelRect); + break; +#endif + + case OdinLocalizationEditorWindow.RightMenuBottomTabs.Settings: + this.DrawBottomTabSettings(this.bottomPanelRect); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + if (Event.current.type == EventType.MouseUp && Event.current.button == 0) + { + this.dragging = false; + GUIHelper.RequestRepaint(); + } + } + + private string metadataSearchTerm = string.Empty; + private SearchField metadataSearchField = new SearchField(); + + public InspectorProperty[] GetMetadataProperties() + { + InspectorProperty metadataCollection = + this.WindowState?.MetadataTree?.RootProperty?.Children[ + OdinLocalizationReflectionValues.TABLE_ENTRY_DATA__METADATA__PATH]; + + InspectorProperty items = + metadataCollection?.Children[OdinLocalizationReflectionValues.METADATA_COLLECTION__ITEMS__PATH]; + + return items?.Children.OrderBy(c => c.ValueEntry.TypeOfValue.Name).ToArray(); + } + + private LocalizationMetadata localizationMetadata; + + private void DrawTopTabMetadata(Rect rect) + { + if (Event.current.OnMouseDown(rect, 0, false)) + { + GUIHelper.RemoveFocusControl(); + } + + if (this.SelectionType == OdinTableSelectionType.None) + { + return; + } + + if (this.localizationMetadata == null) + { + this.localizationMetadata = new LocalizationMetadata(this.Collection, this.WindowState); + } + + switch (this.SelectionType) + { + case OdinTableSelectionType.None: + break; + case OdinTableSelectionType.SharedEntry: + this.localizationMetadata.Target = this.CurrentSelectedSharedEntry; + break; + case OdinTableSelectionType.SharedTable: + this.localizationMetadata.Target = this.Collection; + break; + case OdinTableSelectionType.Table: + this.localizationMetadata.Target = this.CurrentSelectedTable.Asset; + break; + case OdinTableSelectionType.TableEntry: + this.localizationMetadata.Target = this.CurrentSelectedEntry; + break; + default: + throw new ArgumentOutOfRangeException(); + } + + this.localizationMetadata.Draw(rect); + } + + private void DrawTopTabSettings(Rect position) + { + position = position.Padding(4); + + GUILayout.BeginArea(position); + { + bool value; + + switch (this.SelectionType) + { + case OdinTableSelectionType.Table: + EditorGUI.BeginChangeCheck(); + + value = GUILayout.Toggle(LocalizationEditorSettings.GetPreloadTableFlag(this.CurrentSelectedTable.Asset), "Preload Table"); + + if (EditorGUI.EndChangeCheck()) + { + LocalizationEditorSettings.SetPreloadTableFlag(this.CurrentSelectedTable.Asset, value, true); + } + + break; + + case OdinTableSelectionType.TableEntry: + if (this.CurrentSelectedEntry is StringTableEntry stringTableEntry) + { + EditorGUI.BeginChangeCheck(); + + value = GUILayout.Toggle(stringTableEntry.IsSmart, "Smart"); + + if (EditorGUI.EndChangeCheck()) + { + stringTableEntry.IsSmart = value; + EditorUtility.SetDirty(stringTableEntry.Table); + } + + break; + } + + goto default; + + default: + GUILayout.Label("No item with settings selected.", SirenixGUIStyles.LabelCentered); + break; + } + } + GUILayout.EndArea(); + } + + private Vector2 bottomTabLocaleScrollPosition = Vector2.zero; + + private List toggles; + private static FancyColor ThumbColorGrayscale = FancyColor.White; + private static FancyColor BackgroundColorGrayscale = FancyColor.Gray; + private static FancyColor BorderColorGrayscale = new FancyColor(0.91f, 0.91f, 0.91f); + private static readonly FancyColor EnabledColor = new FancyColor(EditorGUIUtility.isProSkin ? 0.66f : 0.86f); + private static readonly FancyColor DisabledColor = new FancyColor(EditorGUIUtility.isProSkin ? 0.46f : 0.66f); + private bool dragging; + private Toggle lastChangedToggle; + private bool newValue; + private Vector2 localeTabScrollPosition; + private void DrawBottomTabLocale(Rect position) + { + position = position.Padding(4); + + GUILayout.BeginArea(position); + { + ReadOnlyCollection projectLocales = LocalizationEditorSettings.GetLocales(); + + if (this.toggles == null) + { + this.toggles = new List + { + new Toggle + { + Label = "Key", + Toggled = this.KeyTable.IsVisible, + } + }; + this.toggles.AddRange(projectLocales.Select(locale => + { + this.LocaleTableMap.TryGetValue(locale, out var table); + + return new Toggle + { + Label = locale.LocaleName, + Toggled = table?.IsVisible ?? false, + }; + })); + } + + bool hasAllLocales = projectLocales.Count == this.LocaleTableMap.Count; + + if (!hasAllLocales) + { + if (SirenixEditorGUI.Button("Add Missing Locales", ButtonSizes.Large)) + { + for (var i = 0; i < projectLocales.Count; i++) + { + Locale locale = projectLocales[i]; + + if (this.LocaleTableMap.ContainsKey(locale)) + { + continue; + } + + LocalizationTable table = this.Collection.GetTable(locale.Identifier); + + if (table != null) + { + this.Collection.AddTable(table, true); + } + else + { + this.Collection.AddNewTable(locale.Identifier); + } + } + } + + GUILayout.Space(4); + SirenixEditorGUI.HorizontalLineSeparator(); + GUILayout.Space(4); + } + + const float LINE_HEIGHT = 20.0f; + const float LOCALE_SPACING = 2.0f; + + this.localeTabScrollPosition = GUILayout.BeginScrollView(this.localeTabScrollPosition /*, GUILayoutOptions.MaxHeight(MAX_HEIGHT)*/); + { + var keyRect = GUILayoutUtility.GetRect(0, LINE_HEIGHT, GUILayoutOptions.ExpandWidth()); + this.KeyTable.IsVisible = this.DrawLocaleToggle(ref keyRect, this.toggles[0], this.KeyTable); + + if (this.EntryScrollView.IsBeyondHorizontalBounds && this.KeyTable.IsVisible && + !this.KeyTable.IsPinned) + { + if (Event.current.OnMouseDown(keyRect, 0)) + { + this.MoveScrollPositionToTable(this.KeyTable); + } + } + + var lastLocaleIndex = projectLocales.Count - 1; + + for (var i = 0; i < projectLocales.Count; i++) + { + var locale = projectLocales[i]; + var toggle = this.toggles[i + 1]; + + var totalRect = GUILayoutUtility.GetRect( + width: 0, + height: LINE_HEIGHT, + options: GUILayoutOptions.ExpandWidth().ExpandHeight(false)); + + if (locale != null && !this.LocaleTableMap.ContainsKey(locale)) + { + GUIHelper.PushGUIEnabled(false); + { + this.DrawLocaleToggle(ref totalRect, toggle, null); + } + GUIHelper.PopGUIEnabled(); + + LocalizationTable looseTable = null; + + foreach (LocalizationTable localizationTable in this.LooseTables) + { + if (localizationTable.LocaleIdentifier == locale.Identifier) + { + looseTable = localizationTable; + break; + } + } + + var buttonRect = totalRect.TakeFromRight(80); + + if (looseTable != null) + { + if (GUI.Button(buttonRect, "Add")) + { + this.Collection.AddTable(looseTable, createUndo: false); + Undo.ClearUndo(looseTable); + Undo.ClearUndo(this.Collection); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + else + { + if (GUI.Button(buttonRect, "Create")) + { + this.Collection.AddNewTable(locale.Identifier); + Undo.ClearUndo(this.Collection); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + + if (i != lastLocaleIndex) + { + GUILayout.Space(LOCALE_SPACING); + } + + continue; + } + + + OdinGUITable table = locale == null ? this.KeyTable : this.LocaleTableMap[locale]; + + table.IsVisible = this.DrawLocaleToggle(ref totalRect, toggle, table); + + if (table.Type != OdinGUITable.GUITableType.Key) + { + Rect removeLocaleRect = totalRect.TakeFromRight(80); + + if (GUI.Button(removeLocaleRect, "Remove")) + { + if (EditorUtility.DisplayDialog("Odin Localization Editor", + $"Are you sure you want to remove the locale '{locale.Identifier.CultureInfo.EnglishName}' from '{this.Collection.name}'?\n" + + "This can have side effects that can't be undone.", + "Yes", + "No")) + { + this.Collection.RemoveTable(table.Asset, createUndo: false); + Undo.ClearUndo(table.Asset); + Undo.ClearUndo(this.Collection); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + } + + if (this.EntryScrollView.IsBeyondHorizontalBounds && table.IsVisible && !table.IsPinned) + { + if (Event.current.OnMouseDown(totalRect, 0)) + { + this.MoveScrollPositionToTable(table); + } + } + + if (i != lastLocaleIndex) + { + GUILayout.Space(LOCALE_SPACING); + } + } + } + GUILayout.EndScrollView(); + + GUILayout.Space(4); + SirenixEditorGUI.HorizontalLineSeparator(); + GUILayout.Space(4); + + if (SirenixEditorGUI.Button("Manage Locales", ButtonSizes.Medium)) + { + try + { + TwoWaySerializationBinder.Default.BindToType("UnityEditor.Localization.UI.LocaleGeneratorWindow, Unity.Localization.Editor")? + .GetMethod("ShowWindow", BindingFlags.Static | BindingFlags.Public)?.Invoke(null, null); + } + catch (NullReferenceException nullReferenceException) + { + Debug.LogError($"[Odin]: Failed to find LocaleGeneratorWindow.ShowWindow.\n{nullReferenceException.Message}"); + } + } + } + GUILayout.EndArea(); + } + + private bool DrawLocaleToggle(ref Rect rect, Toggle toggle, OdinGUITable table) + { + const int toggleWidth = 35; + + var toggleRect = rect.TakeFromLeft(toggleWidth).SubXMax(4).VerticalPadding(2).AddY(1); + var color = GUI.enabled ? toggle.CurrentColor : new Color(0.35f, 0.35f, 0.35f); + toggle.Enabled = GUI.enabled; + + // Draw toggle background + GUI.DrawTexture( + position: toggleRect, + image: Texture2D.whiteTexture, + scaleMode: ScaleMode.StretchToFill, + alphaBlend: false, + imageAspect: 1f, + color: BackgroundColorGrayscale.Blend(color, FancyColor.BlendMode.Multiply), + borderWidth: 0, + borderRadius: float.MaxValue); + + // Draw toggle thumb + GUI.DrawTexture( + position: toggle.CurrentThumbRect, + image: Texture2D.whiteTexture, + scaleMode: ScaleMode.StretchToFill, + alphaBlend: false, + imageAspect: 1f, + color: ThumbColorGrayscale.Blend(color, FancyColor.BlendMode.Multiply), + borderWidth: 0, + borderRadius: float.MaxValue); + + AnimateThumb(toggleRect, toggle); + + GUI.Label(rect, toggle.Label, + GUI.enabled && Event.current.IsMouseOver(rect) ? SirenixGUIStyles.WhiteLabel : SirenixGUIStyles.Label); + + if (GUI.enabled && Event.current.OnMouseDown(toggleRect, 0)) + { + this.dragging = true; + this.lastChangedToggle = toggle; + this.newValue = !toggle.Toggled; + toggle.Toggled = this.newValue; + + switch (Event.current.modifiers) + { + case EventModifiers.Control: + for (var i = 0; i < this.toggles.Count; i++) + { + if (!this.toggles[i].Enabled) continue; + this.toggles[i].Toggled = this.newValue; + } + + break; + case EventModifiers.Shift: + for (var i = 0; i < this.toggles.Count; i++) + { + if (!this.toggles[i].Enabled) continue; + this.toggles[i].Toggled = table.IsVisible; + } + + break; + case EventModifiers.Alt: + for (var i = 0; i < this.toggles.Count; i++) + { + if (!this.toggles[i].Enabled) continue; + this.toggles[i].Toggled = this.toggles[i] == toggle; + } + + break; + } + } + + if (GUI.enabled && this.dragging) + { + var mp = Event.current.mousePosition; + if (toggle != this.lastChangedToggle && toggleRect.y < mp.y && toggleRect.yMax > mp.y) + { + this.lastChangedToggle = toggle; + toggle.Toggled = this.newValue; + } + + GUIHelper.RequestRepaint(); + } + + if (Event.current.type == EventType.MouseUp && Event.current.button == 0) + { + this.dragging = false; + GUIHelper.RequestRepaint(); + } + + return toggle.Toggled; + } + + private static void AnimateThumb(Rect toggleRect, Toggle toggle) + { + const float thumbAnimationDurationInSeconds = 0.07f; + const float thumbAnimationSpeed = 1f / (thumbAnimationDurationInSeconds / 2f); // divided by 2 since the animation is split into 2 phases. + const float colorAnimationDurationInSeconds = 0.6f; + const float colorAnimationSpeed = 1f / colorAnimationDurationInSeconds; + + var targetRect = toggle.Toggled + ? toggleRect.AlignRight(toggleRect.height).AlignCenterY(toggleRect.height).Padding(2) + : toggleRect.AlignLeft(toggleRect.height).AlignCenterY(toggleRect.height).Padding(2); + + var targetColor = toggle.Toggled ? EnabledColor : DisabledColor; + + if (toggle.CurrentColor != (Color)targetColor) + { + if (toggle.T1.IsDone) + { + toggle.T1.Reset(0f); + } + + toggle.T1.Move(colorAnimationSpeed, Easing.InOutExpo); + toggle.CurrentColor = Color.Lerp(toggle.StartColor, targetColor, toggle.T1.GetValue()); + } + + if (Event.current.type == EventType.Repaint && toggle.CurrentThumbRect == Rect.zero) + { + toggle.CurrentThumbRect = targetRect; + toggle.CurrentColor = targetColor; + GUIHelper.RequestRepaint(); + } + + if (Event.current.type == EventType.Repaint && toggle.CurrentThumbRect != targetRect) + { + if (toggle.Toggled) + { + if (toggle.CurrentThumbRect.xMax < targetRect.xMax) + { + if (toggle.T2.IsDone) + { + toggle.T2.Reset(0f); + } + + toggle.T2.Move(thumbAnimationSpeed); + var xMax = Mathf.Lerp(toggle.StartXMax, targetRect.xMax, toggle.T2.GetValue()); + toggle.CurrentThumbRect.xMax = xMax; + } + else if (toggle.CurrentThumbRect.xMin < targetRect.xMin) + { + if (toggle.T2.IsDone) + { + toggle.T2.Reset(0f); + } + + toggle.T2.Move(thumbAnimationSpeed); + var xMin = Mathf.Lerp(toggle.StartXMin, targetRect.xMin, toggle.T2.GetValue()); + toggle.CurrentThumbRect.xMin = xMin; + } + } + else + { + if (toggle.CurrentThumbRect.xMin > targetRect.xMin) + { + if (toggle.T2.IsDone) + { + toggle.T2.Reset(0f); + } + + toggle.T2.Move(thumbAnimationSpeed); + var xMin = Mathf.Lerp(toggle.StartXMin, targetRect.xMin, toggle.T2.GetValue()); + toggle.CurrentThumbRect.xMin = xMin; + } + else if (toggle.CurrentThumbRect.xMax > targetRect.xMax) + { + if (toggle.T2.IsDone) + { + toggle.T2.Reset(0f); + } + + toggle.T2.Move(thumbAnimationSpeed); + var xMax = Mathf.Lerp(toggle.StartXMax, targetRect.xMax, toggle.T2.GetValue()); + toggle.CurrentThumbRect.xMax = xMax; + } + } + + GUIHelper.RequestRepaint(); + } + } + + private void LocaleToggle(Rect position, Locale locale) + { + if (locale != null && !this.LocaleTableMap.ContainsKey(locale)) + { + Rect createLocaleRect = position.TakeFromRight(80); + + GUIHelper.PushGUIEnabled(false); + { + GUI.Toggle(position.TakeFromLeft(GUI.skin.toggle.padding.left), false, GUIContent.none); + + GUI.Label(position, locale.LocaleName, SirenixGUIStyles.Label); + } + GUIHelper.PopGUIEnabled(); + + LocalizationTable looseTable = null; + + foreach (LocalizationTable localizationTable in this.LooseTables) + { + if (localizationTable.LocaleIdentifier == locale.Identifier) + { + looseTable = localizationTable; + break; + } + } + + if (looseTable != null) + { + if (GUI.Button(createLocaleRect, "Add")) + { + this.Collection.AddTable(looseTable, createUndo: true); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + else + { + if (GUI.Button(createLocaleRect, "Create")) + { + this.Collection.AddNewTable(locale.Identifier); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + + return; + } + + OdinGUITable table = locale == null ? this.KeyTable : this.LocaleTableMap[locale]; + + EditorGUI.BeginChangeCheck(); + { + table.IsVisible = GUI.Toggle(position.TakeFromLeft(GUI.skin.toggle.padding.left), table.IsVisible, GUIContent.none); + } + if (EditorGUI.EndChangeCheck()) + { + switch (Event.current.modifiers) + { + case EventModifiers.Shift: + for (var i = 0; i < this.GUITables.Count; i++) + { + this.GUITables[i].IsVisible = table.IsVisible; + } + + break; + + case EventModifiers.Alt: + for (var i = 0; i < this.GUITables.Count; i++) + { + this.GUITables[i].IsVisible = this.GUITables[i] == table; + } + + break; + } + } + + if (table.Type != OdinGUITable.GUITableType.Key) + { + Rect removeLocaleRect = position.TakeFromRight(80); + + if (GUI.Button(removeLocaleRect, "Remove")) + { + this.Collection.RemoveTable(table.Asset, createUndo: true); + FancyColor.PopBlend(); + GUIHelper.ExitGUI(false); + } + } + + if (this.EntryScrollView.IsBeyondHorizontalBounds && table.IsVisible && !table.IsPinned) + { + bool isMouseOver = Event.current.IsMouseOver(position); + + GUI.Label(position, table.DisplayName, isMouseOver ? SirenixGUIStyles.WhiteLabel : SirenixGUIStyles.Label); + + if (Event.current.OnMouseDown(position, 0)) + { + this.MoveScrollPositionToTable(table); + } + } + else + { + GUI.Label(position, table.DisplayName, SirenixGUIStyles.Label); + } + } + + protected bool IsDraggingAnything() + { + if (this.EntryScrollView.IsDraggingMouse || + this.EntryScrollView.IsDraggingHorizontalScrollBar || + this.EntryScrollView.IsDraggingVerticalScrollBar) + { + return true; + } + + for (var i = 0; i < this.GUITables.Count; i++) + { + if (this.GUITables[i].IsDraggingSlider) + { + return true; + } + } + + return false; + } + +#if false + private void DrawBottomTabTemplate(Rect position) + { + if (!this.Collection.SharedData.Metadata.HasMetadata()) + { + this.Collection.SharedData.Metadata.AddMetadata(new OdinTemplateMetadata()); + EditorUtility.SetDirty(this.Collection.SharedData); + } + + var templateMetadata = this.Collection.SharedData.Metadata.GetMetadata(); + + GUILayout.BeginArea(position); + { + GUILayout.BeginScrollView(Vector2.zero); + + int removedItemIndex = -1; + + for (var i = 0; i < templateMetadata.MetadataExpected.Count; i++) + { + if (OdinLocalizationStyles.Metadata(templateMetadata.MetadataExpected[i], i == 0)) + { + removedItemIndex = i; + } + } + + GUILayout.EndScrollView(); + + if (removedItemIndex != -1) + { + templateMetadata.MetadataExpected.RemoveAt(removedItemIndex); + EditorUtility.SetDirty(this.Collection.SharedData); + } + + Rect addMetadataRect = GUILayoutUtility.GetRect(0, (int) ButtonSizes.Large); + + if (GUI.Button(addMetadataRect, "Add Metadata")) + { + this.ShowAddMetadataTemplateSelector(addMetadataRect, templateMetadata); + } + + GUILayoutUtility.GetRect(0, 5); + } + GUILayout.EndArea(); + } + + private void ShowAddMetadataTemplateSelector(Rect rect, OdinTemplateMetadata templateMetadata) + { + TypeSelector selector = this.MakeMetadataSelector(); + + selector.SelectionConfirmed += types => + { + foreach (Type type in types) + { + if (templateMetadata.MetadataExpected.Contains(type) && !OdinLocalizationMetadataRegistry.MetadataAllowsMultiple[type]) + { + continue; + } + + templateMetadata.MetadataExpected.Add(type); + + EditorUtility.SetDirty(this.Collection.SharedData); + } + }; + + selector.ShowInPopup(rect); + } + + private TypeSelector MakeMetadataSelector() + { + TypeSelector selector; + + switch (this.Collection) + { + case AssetTableCollection _: + selector = new TypeSelector(OdinLocalizationMetadataRegistry.AssetEntryMetadataTypes, excludeInheritors: true); + break; + + case StringTableCollection _: + selector = new TypeSelector(OdinLocalizationMetadataRegistry.StringEntryMetadataTypes, excludeInheritors: true); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + return selector; + } + + protected bool HasMetadataAmountOfType(IList metadata, Type metadataType, OdinTemplateMetadata templateMetadata) + { + int count = CountMetadataType(metadata, metadataType); + + var expectedCount = 0; + + for (var i = 0; i < templateMetadata.MetadataExpected.Count; i++) + { + if (templateMetadata.MetadataExpected[i] == metadataType) + { + expectedCount++; + } + } + + return count >= expectedCount; + } + + protected static int CountMetadataType(IList metadata, Type metadataType) + { + var result = 0; + + for (var i = 0; i < metadata.Count; i++) + { + if (metadata[i].GetType() == metadataType) + { + result++; + } + } + + return result; + } +#endif + + + private void DrawBottomTabSettings(Rect position) + { + position = position.Padding(6); + + GUILayout.BeginArea(position); + { + // Table Collection Name + { + Rect namePosition = EditorGUILayout.GetControlRect(); + + GUI.Label(namePosition.TakeFromLeft(130), "Collection Name"); + + EditorGUI.BeginChangeCheck(); + + string value = SirenixEditorFields.DelayedTextField(namePosition, this.Collection.SharedData.TableCollectionName); + + if (EditorGUI.EndChangeCheck()) + { + if (!string.IsNullOrEmpty(value) && OdinLocalizationEditorSettings.IsTableNameValid(this.Collection.GetType(), value)) + { + this.Collection.SetTableCollectionName(value, true); + this.MenuItem.Name = this.Collection.SharedData.TableCollectionName; + this.MenuItem.Select(); + } + } + } + + // Preload All Tables + { + EditorGUI.BeginChangeCheck(); + + bool value = GUILayout.Toggle(this.Collection.IsPreloadTableFlagSet(), "Preload All Tables"); + + if (EditorGUI.EndChangeCheck()) + { + this.Collection.SetPreloadTableFlag(value, true); + } + } + + GUILayout.Space(4); + SirenixEditorGUI.HorizontalLineSeparator(); + GUILayout.Space(4); + + if (SirenixEditorGUI.Button("Manage Collection", ButtonSizes.Large)) + { + GUIHelper.OpenInspectorWindow(this.Collection); + } + } + GUILayout.EndArea(); + } + + private float VerticalSlideRect(Rect rect, bool connect) + { + var offset = SirenixEditorGUI.SlideRect(rect, MouseCursor.SplitResizeLeftRight).x; + + var slideThumbColor = Event.current.IsMouseOver(rect) + ? EditorGUIUtility.isProSkin ? new Color(0.5f, 0.5f, 0.5f) : new Color(1f, 1f, 1f) + : this.WindowState.RightMenuWidth > 0 + ? EditorGUIUtility.isProSkin ? new Color(0.25f, 0.25f, 0.25f) : new Color(0.8f, 0.8f, 0.8f) + : EditorGUIUtility.isProSkin + ? new Color(0.4f, 0.4f, 0.4f) + : new Color(1f, 1f, 1f); + + EditorGUI.DrawRect(rect, Event.current.IsMouseOver(rect) + ? EditorGUIUtility.isProSkin ? new Color(0.26f, 0.26f, 0.26f) : new Color(0.7f, 0.7f, 0.7f) + : EditorGUIUtility.isProSkin + ? new Color(0.2f, 0.2f, 0.2f) + : new Color(0.6f, 0.6f, 0.6f)); + + var h2 = connect ? this.WindowState.RightMenuTopPanelHeight : rect.height / 2f - 40; + + EditorGUI.DrawRect(rect.AlignLeft(1), new Color(0, 0, 0, 0.4f)); + var left = new Rect(rect.center.x - 1, 0, 1, rect.height); + EditorGUI.DrawRect(left, slideThumbColor); + + if (!connect) + { + var right = new Rect(rect.center.x + 1, rect.y, 1, rect.height); + EditorGUI.DrawRect(right, slideThumbColor); + EditorGUI.DrawRect(rect.AlignRight(1), new Color(0, 0, 0, 0.4f)); + } + else if (this.WindowState.RightMenuWidth > 0) + { + var crossTop = new Rect(rect.AlignCenterX(1).AddX(2).x, this.WindowState.RightMenuTopPanelHeight - (14 / 2 + 1), 4, 1); + var crossBottom = crossTop.AddY(2); + var rightTop = new Rect(rect.center.x + 1, 0, 1, crossTop.y + 1); + var rightBottom = new Rect(rect.center.x + 1, crossBottom.y, 1, rect.height - crossBottom.y); + EditorGUI.DrawRect(crossTop, slideThumbColor); + EditorGUI.DrawRect(crossBottom, slideThumbColor); + EditorGUI.DrawRect(rightTop, slideThumbColor); + EditorGUI.DrawRect(rightBottom, slideThumbColor); + EditorGUI.DrawRect(rect.AlignRight(1).SetHeight(connect ? h2 - 13 : rect.height), new Color(0, 0, 0, 0.4f)); + EditorGUI.DrawRect(rect.AlignRight(1).AddY(connect ? h2 - 1 : 0), new Color(0, 0, 0, 0.4f)); + } + else + { + var right = new Rect(rect.center.x + 1, 0, 1, rect.height); + EditorGUI.DrawRect(right, slideThumbColor); + EditorGUI.DrawRect(rect.AlignRight(1), new Color(0, 0, 0, 0.4f)); + } + + return offset; + } + + private float HorizontalSlideRect(Rect rect) + { + var offset = SirenixEditorGUI.SlideRect(rect, MouseCursor.SplitResizeUpDown).y; + + var slideThumbColor = Event.current.IsMouseOver(rect) + ? EditorGUIUtility.isProSkin ? new Color(0.5f, 0.5f, 0.5f) : new Color(1f, 1f, 1f) + : this.WindowState.RightMenuWidth > 0 + ? EditorGUIUtility.isProSkin ? new Color(0.25f, 0.25f, 0.25f) : new Color(0.8f, 0.8f, 0.8f) + : EditorGUIUtility.isProSkin + ? new Color(0.4f, 0.4f, 0.4f) + : new Color(1f, 1f, 1f); + + EditorGUI.DrawRect(rect, Event.current.IsMouseOver(rect) + ? EditorGUIUtility.isProSkin ? new Color(0.26f, 0.26f, 0.26f) : new Color(0.7f, 0.7f, 0.7f) + : EditorGUIUtility.isProSkin + ? new Color(0.2f, 0.2f, 0.2f) + : new Color(0.6f, 0.6f, 0.6f)); + + var top = new Rect(rect.x, rect.center.y - 1, rect.width, 1); + var bottom = new Rect(rect.x, rect.center.y + 1, rect.width, 1); + + EditorGUI.DrawRect(top, slideThumbColor); + EditorGUI.DrawRect(bottom, slideThumbColor); + EditorGUI.DrawRect(rect.AlignTop(1), new Color(0, 0, 0, 0.4f)); + EditorGUI.DrawRect(rect.AlignBottom(1), new Color(0, 0, 0, 0.4f)); + + return offset; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs.meta new file mode 100644 index 000000000..30c39b740 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTableCollectionEditor.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b8f34a530ab34e11b148c6c45d14fd12 +timeCreated: 1704797131 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs new file mode 100644 index 000000000..7348ac9d6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs @@ -0,0 +1,23 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Localization.Metadata; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ +#if false + [HideInInspector] // ReadOnly + [Metadata(AllowedTypes = MetadataType.SharedTableData, AllowMultiple = false)] + public class OdinTemplateMetadata : IMetadata + { + public Type TableAssetType; + public List MetadataExpected = new List(); + } +#endif +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs.meta new file mode 100644 index 000000000..39e647dc9 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/OdinTemplateMetadata.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 50bcb1c3eb1c42b3b6a84c57b1c240dd +timeCreated: 1707729097 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs new file mode 100644 index 000000000..398883480 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using Sirenix.OdinInspector.Editor.Internal; +using UnityEngine; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class Toggle + { + public string Label; + public float StartXMin; + public float StartXMax; + public Color StartColor; + public Rect CurrentThumbRect; + public Color CurrentColor; + public bool Enabled; + public SirenixAnimationUtility.InterpolatedFloat T1 = new SirenixAnimationUtility.InterpolatedFloat {Destination = 1f}; + public SirenixAnimationUtility.InterpolatedFloat T2 = new SirenixAnimationUtility.InterpolatedFloat {Destination = 1f}; + + private bool _toggled; + + public bool Toggled + { + get => this._toggled; + set + { + this._toggled = value; + this.StartXMin = this.CurrentThumbRect.xMin; + this.StartXMax = this.CurrentThumbRect.xMax; + this.StartColor = this.CurrentColor; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs.meta new file mode 100644 index 000000000..30fd43a39 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/GUI/Toggle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e4e8615bf94265a4a96bf4c23380de7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal.meta new file mode 100644 index 000000000..33f60f63e --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7cf3a6e0f9c8495d843c313b4437232b +timeCreated: 1704797609 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs new file mode 100644 index 000000000..c70a40b7c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs @@ -0,0 +1,68 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using Sirenix.Config; +using UnityEditor; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationAssetCache + { + private readonly struct AssetIdentifier + { + public readonly Type AssetType; + public readonly string Guid; + + public AssetIdentifier(Type assetType, string guid) + { + this.AssetType = assetType; + this.Guid = guid; + } + } + + private static readonly Dictionary Assets = new Dictionary(); + + public static UnityEngine.Object Get(string guid, Type assetType) + { + if (string.IsNullOrEmpty(guid)) + { + return null; + } + + var identifier = new AssetIdentifier(assetType, guid); + + if (Assets.TryGetValue(identifier, out UnityEngine.Object result)) + { + return result; + } + + string path = AssetDatabase.GUIDToAssetPath(guid); + + result = AssetDatabase.LoadAssetAtPath(path, assetType); + + Assets.Add(identifier, result); + + return result; + } + + public static UnityEngine.Object Get(SharedTableData.SharedTableEntry sharedEntry, AssetTable assetTable, Type assetType) + { + AssetTableEntry entry = assetTable.GetEntry(sharedEntry.Id); + + if (entry == null || entry.IsEmpty) + { + return null; + } + + return Get(entry.Guid, assetType); + } + + public static void Clear() => Assets.Clear(); + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs.meta new file mode 100644 index 000000000..ceb0dd5b7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationAssetCache.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f5b97d1f7b884ac99cc8ebcdeb3363a7 +timeCreated: 1704809501 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs new file mode 100644 index 000000000..ce40bd225 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs @@ -0,0 +1,68 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using UnityEditor; +using UnityEditor.AddressableAssets.Settings; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization.Settings; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationEditorSettings + { + public static LocalizationEditorSettings Instance => + (LocalizationEditorSettings) OdinLocalizationReflectionValues.LocalizationEditorSettings_Instance.GetValue(null); + + public static AddressableAssetSettings GetAddressableAssetSettings(bool create) + { + return OdinLocalizationReflectionValues.LocalizationEditorSettings_GetAddressableAssetSettingsFunc(create); + } + + public static bool IsTableNameValid(Type collectionType, string name, out string errorMessage) + { + errorMessage = (string) OdinLocalizationReflectionValues.LocalizationEditorSettings_IsTableNameValid.Invoke(Instance, + new object[] {collectionType, name}); + + return string.IsNullOrEmpty(errorMessage); + } + + public static bool IsTableNameValid(Type collectionType, string name) + { + return IsTableNameValid(collectionType, name, out string _); + } + + public static bool CreateDefaultLocalizationSettingsAsset() + { + if (LocalizationEditorSettings.ActiveLocalizationSettings != null) + { + return false; + } + + string localizationSettingsPath = EditorUtility.SaveFilePanelInProject("Create Localization Settings", + "Localization Settings", + "asset", + "Create the Localization Settings asset"); + + if (string.IsNullOrEmpty(localizationSettingsPath)) + { + return false; + } + + var settings = ScriptableObject.CreateInstance(); + settings.name = "Default Localization Settings"; + + + AssetDatabase.CreateAsset(settings, localizationSettingsPath); + AssetDatabase.SaveAssets(); + + LocalizationEditorSettings.ActiveLocalizationSettings = settings; + + return true; + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs.meta new file mode 100644 index 000000000..b9236a29f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEditorSettings.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 645f3592e85448d7a963218911547f3c +timeCreated: 1706732179 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs new file mode 100644 index 000000000..30a9d3771 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs @@ -0,0 +1,50 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using UnityEditor.Localization; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationEvents + { + private static readonly Action RaiseTableEntryModifiedAction; + + private static readonly Action RaiseTableEntryAddedAction; + + private static readonly Action RaiseTableEntryRemovedAction; + + private static readonly Action RaiseAssetTableEntryAddedAction; + + private static readonly Action RaiseAssetTableEntryRemovedAction; + + static OdinLocalizationEvents() + { + RaiseTableEntryModifiedAction = OdinLocalizationReflectionValues.Create_RaiseTableEntryModified_Method_Delegate(LocalizationEditorSettings.EditorEvents); + RaiseTableEntryAddedAction = OdinLocalizationReflectionValues.Create_RaiseTableEntryAdded_Method_Delegate(LocalizationEditorSettings.EditorEvents); + RaiseTableEntryRemovedAction = OdinLocalizationReflectionValues.Create_RaiseTableEntryRemoved_Method_Delegate(LocalizationEditorSettings.EditorEvents); + RaiseAssetTableEntryAddedAction = + OdinLocalizationReflectionValues.Create_AssetTableEntryAdded_Method_Delegate(LocalizationEditorSettings.EditorEvents); + RaiseAssetTableEntryRemovedAction = + OdinLocalizationReflectionValues.Create_AssetTableEntryRemoved_Method_Delegate(LocalizationEditorSettings.EditorEvents); + } + + public static void RaiseTableEntryModified(SharedTableData.SharedTableEntry sharedEntry) => RaiseTableEntryModifiedAction(sharedEntry); + + public static void RaiseTableEntryAdded(LocalizationTableCollection collection, SharedTableData.SharedTableEntry sharedEntry) => + RaiseTableEntryAddedAction(collection, sharedEntry); + + public static void RaiseTableEntryRemoved(LocalizationTableCollection collection, SharedTableData.SharedTableEntry sharedEntry) => + RaiseTableEntryRemovedAction(collection, sharedEntry); + + public static void RaiseAssetTableEntryAdded(AssetTableCollection assetCollection, AssetTable table, AssetTableEntry entry) => + RaiseAssetTableEntryAddedAction(assetCollection, table, entry); + + public static void RaiseAssetTableEntryRemoved(AssetTableCollection assetCollection, AssetTable table, AssetTableEntry entry, string guid) => + RaiseAssetTableEntryRemovedAction(assetCollection, table, entry, guid); + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs.meta new file mode 100644 index 000000000..fe8f09c3a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationEvents.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a7cf7883289c4de29b6e2ae8a072c3bd +timeCreated: 1705050052 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs new file mode 100644 index 000000000..b0ad75e50 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs @@ -0,0 +1,438 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.Reflection.Editor; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEngine; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + // TODO: update name + public static class OdinLocalizationGUI + { + public static GUIStyle RichLabelTextCenteredMultiLine + { + get + { + if (_richLabelTextCenteredMultiLine == null) + { + _richLabelTextCenteredMultiLine = new GUIStyle(SirenixGUIStyles.MultiLineCenteredLabel) + { + richText = true + }; + } + + return _richLabelTextCenteredMultiLine; + } + } + + public static GUIStyle CardTitleWhite + { + get + { + if (_cardTitleWhite == null) + { + _cardTitleWhite = new GUIStyle(SirenixGUIStyles.MultiLineWhiteLabel) + { + fontSize = 12, + fontStyle = FontStyle.Bold + }; + } + + return _cardTitleWhite; + } + } + + public static FancyColor Background => EditorGUIUtility.isProSkin ? Color.black : Color.white; + + // TODO: LIGHT MODE + public static FancyColor MenuBackground => EditorGUIUtility.isProSkin ? DarkMenuBackground : LightMenuBackground; + public static FancyColor WindowBackground => EditorGUIUtility.isProSkin ? DarkWindowBackground : LightWindowBackground; + public static FancyColor Panel => EditorGUIUtility.isProSkin ? DarkPanel : LightPanel; + public static FancyColor PanelGap => EditorGUIUtility.isProSkin ? DarkPanelGap : LightPanelGap; + + public static FancyColor Selected => EditorGUIUtility.isProSkin ? DarkSelected : LightSelected; + + public static FancyColor TabsBackground => EditorGUIUtility.isProSkin ? DarkTabsBackground : LightTabsBackground; + + public static FancyColor ColumnBackground => EditorGUIUtility.isProSkin ? DarkColumnBackground : LightColumnBackground; + + public static FancyColor RowEvenBackground => EditorGUIUtility.isProSkin ? DarkRowEvenBackground : LightRowEvenBackground; + public static FancyColor RowEvenBackground2 => EditorGUIUtility.isProSkin ? DarkRowEvenBackground2 : LightRowEvenBackground2; + public static FancyColor RowOddBackground => EditorGUIUtility.isProSkin ? DarkRowOddBackground : LightRowOddBackground; + public static FancyColor RowOddBackground2 => EditorGUIUtility.isProSkin ? DarkRowOddBackground2 : LightRowOddBackground2; + public static FancyColor RowBorder => EditorGUIUtility.isProSkin ? DarkRowBorder : LightRowBorder; + public static FancyColor RowBorderHover => EditorGUIUtility.isProSkin ? DarkRowBorderHover : LightRowBorderHover; + + public static FancyColor Tab => EditorGUIUtility.isProSkin ? DarkTab : LightTab; + public static FancyColor TabHover => EditorGUIUtility.isProSkin ? DarkTabHover : LightTabHover; + public static FancyColor TabSelected => EditorGUIUtility.isProSkin ? DarkTabSelected : LightTabSelected; + + public static FancyColor Checkerboard => DarkCheckerboard; + public static FancyColor CheckerboardBorder => DarkCheckerboardBorder; + + public static FancyColor DarkMenuBackground; + + public static FancyColor DarkWindowBackground; + public static FancyColor DarkPanel; + public static FancyColor DarkPanelGap; + + public static FancyColor DarkSelected; + + public static FancyColor DarkTabsBackground; + + public static FancyColor DarkColumnBackground; + + public static FancyColor DarkRowEvenBackground; + public static FancyColor DarkRowEvenBackground2; + public static FancyColor DarkRowOddBackground; + public static FancyColor DarkRowOddBackground2; + public static FancyColor DarkRowBorder; + public static FancyColor DarkRowBorderHover; + + public static FancyColor DarkTab; + public static FancyColor DarkTabHover; + public static FancyColor DarkTabSelected; + + public static FancyColor LightMenuBackground; + + public static FancyColor LightWindowBackground; + public static FancyColor LightPanel; + public static FancyColor LightPanelGap; + + public static FancyColor LightSelected; + + public static FancyColor LightTabsBackground; + + public static FancyColor LightColumnBackground; + + public static FancyColor LightRowEvenBackground; + public static FancyColor LightRowEvenBackground2; + public static FancyColor LightRowOddBackground; + public static FancyColor LightRowOddBackground2; + public static FancyColor LightRowBorder; + public static FancyColor LightRowBorderHover; + + public static FancyColor LightTab; + public static FancyColor LightTabHover; + public static FancyColor LightTabSelected; + + + public static FancyColor DarkCheckerboard; + public static FancyColor DarkCheckerboardBorder; + + private static GUIStyle DefaultTextStyle; + + private static GUIStyle _richLabelTextCenteredMultiLine; + private static GUIStyle _cardTitleWhite; + + static OdinLocalizationGUI() + { + DarkWindowBackground = new Color(0.15f, 0.15f, 0.15f, 1.0f); + LightWindowBackground = new Color(0.358f, 0.358f, 0.358f, 1.0f); + + DarkPanel = new Color(0.2156863f, 0.2156863f, 0.2156863f, 1.0f); + DarkPanelGap = new Color(0.0856863f, 0.0856863f, 0.0856863f, 1.0f); + + LightPanel = new Color(0.761f, 0.761f, 0.761f, 1.0f); + LightPanelGap = new Color(0.532f, 0.532f, 0.532f, 1.0f); + + DarkSelected = new Color(0.7076807f, 0.8213042f, 0.8773585f, 1.0f); + LightSelected = new Color(0.358f, 0.446f, 0.509f, 1.0f); + + DarkTabsBackground = new Color(0.1886792f, 0.1886792f, 0.1886792f, 1.0f); + LightTabsBackground = new Color(0.538f, 0.538f, 0.538f, 1.0f); + + DarkColumnBackground = new Color(0.099f, 0.099f, 0.099f, 1.0f); + LightColumnBackground = new FancyColor(0.84f); + + var rowBaseBlend = new FancyColor(0.42f); + +#region DARK_ROW + + var darkRowEvenBackground = new FancyColor(0.2f); + var darkRowOddBackground = new FancyColor(0.16f); + + DarkRowEvenBackground = darkRowEvenBackground; + DarkRowOddBackground = darkRowOddBackground; + + DarkRowEvenBackground2 = darkRowEvenBackground.Blend(rowBaseBlend, FancyColor.BlendMode.Overlay); + DarkRowOddBackground2 = darkRowOddBackground.Blend(rowBaseBlend, FancyColor.BlendMode.Overlay); + + DarkRowBorder = new Color(0, 0, 0, 0.3607843f); + DarkRowBorderHover = new Color(1, 1, 1, 0.2470588f); + +#endregion + +#region LIGHT_ROW + + var lightRowEvenBackground = new FancyColor(0.711f); + var lightRowOddBackground = new FancyColor(0.611f); + + LightRowEvenBackground = lightRowEvenBackground; + LightRowOddBackground = lightRowOddBackground; + + LightRowEvenBackground2 = lightRowEvenBackground.Blend(rowBaseBlend, FancyColor.BlendMode.Overlay); + LightRowOddBackground2 = lightRowOddBackground.Blend(rowBaseBlend, FancyColor.BlendMode.Overlay); + + LightRowBorder = new Color(0, 0, 0, 0.2f); + LightRowBorderHover = new Color(1, 1, 1, 0.4f); + +#endregion + + DarkTab = new Color(0.254717f, 0.254717f, 0.254717f, 1.0f); + DarkTabHover = new Color(0.277f, 0.277f, 0.277f, 1.0f); + DarkTabSelected = new Color(0.312f, 0.312f, 0.312f, 1.0f); + + float scalar = 0.925f; + LightTab = new FancyColor(0.85f * scalar); + LightTabHover = new FancyColor(0.915f * scalar); + LightTabSelected = new FancyColor(0.95f * scalar); + + DarkCheckerboard = new Color(0.298f, 0.298f, 0.298f, 1.0f); + DarkCheckerboardBorder = new Color(0, 0, 0, 0.5529412f); + + DefaultTextStyle = new GUIStyle(SirenixGUIStyles.MultiLineCenteredLabel); + DefaultTextStyle.focused.textColor = DefaultTextStyle.normal.textColor; + + DarkMenuBackground = DarkPanel; + + LightMenuBackground = new FancyColor(0.84f); + } + + public static string TextField(Rect position, string text, out bool changed, int id) + { + if (id == 0) + { + GUI.Label(position, text, SirenixGUIStyles.MultiLineCenteredLabel); + changed = false; + return text; + } + + Color lastCursorColor = GUI.skin.settings.cursorColor; + + bool isMouseDown = Event.current.type == EventType.MouseDown; + + if (isMouseDown) + { + GUI.skin.settings.cursorColor = Color.clear; + } + + text = EditorGUI_Internals.DoTextField(id, position, text, DefaultTextStyle, null, out changed, false, true, false); + + if (isMouseDown) + { + GUI.skin.settings.cursorColor = lastCursorColor; + } + + return text; + } + + public static string TextFieldSyntaxHighlighted(Rect position, string text, string syntaxRichText, out bool changed, int id) + { + if (string.IsNullOrEmpty(syntaxRichText)) + { + return TextField(position, text, out changed, id); + } + + GUIHelper.PushContentColor(Color.clear); + text = EditorGUI_Internals.DoTextField(id, position, text, SirenixGUIStyles.MultiLineCenteredLabel, null, out changed, false, true, false); + GUIHelper.PopContentColor(); + + GUI.Label(position, syntaxRichText, RichLabelTextCenteredMultiLine); + + return text; + } + + public static bool ObjectPickerButton(Rect position) + { + bool isMouseOver = Event.current.IsMouseOver(position); + + var c1 = EditorGUIUtility.isProSkin + ? new Color(1, 1, 1, isMouseOver ? 0.8f : 0.3f) + : new Color(0, 0, 0, isMouseOver ? 0.8f : 0.3f); + + SdfIcons.DrawIcon(position, SdfIconType.StopCircle, c1); + + return Event.current.OnMouseDown(position, 0); + } + + public static TEnum Tabs(Rect rect, TEnum value, float width) where TEnum : Enum + { + EnumTypeUtilities.EnumMember[] infos = EnumTypeUtilities.VisibleEnumMemberInfos; + + for (var i = 0; i < infos.Length; i++) + { + Rect itemRect = rect.TakeFromLeft(width); + + bool isMouseOver = Event.current.IsMouseOver(itemRect); + bool isSelected = value.Equals(infos[i].Value); + bool isPressed = Event.current.OnMouseDown(itemRect, 0); + + Color tabColor; + + if (isSelected) + { + tabColor = TabSelected; + } + else if (isMouseOver) + { + tabColor = TabHover; + } + else + { + tabColor = Tab; + } + + SirenixEditorGUI.DrawSolidRect(itemRect, tabColor); + + Vector2 textSize = EditorStyles.label.CalcSize(GUIHelper.TempContent(infos[i].NiceName)); + float iconSize = textSize.y; + float size = iconSize + 2.0f + textSize.x + 1.0f; + + if (size > itemRect.width) + { + if (iconSize > itemRect.width) + { + continue; + } + + SdfIcons.DrawIcon(itemRect.AlignCenter(iconSize), infos[i].Icon); + } + else + { + Rect contentRect = itemRect.AlignCenter(size); + + Rect iconRect = contentRect.TakeFromLeft(iconSize).AlignMiddle(iconSize); + SdfIcons.DrawIcon(iconRect, infos[i].Icon); + + contentRect.TakeFromLeft(2); + + GUI.Label(contentRect, infos[i].NiceName); + } + + if (isPressed) + { + value = infos[i].Value; + } + } + + return value; + } + + public static bool OverlaidButton(Rect position, string text, SdfIconType icon = SdfIconType.None, GUIStyle labelStyle = null, bool invert = false) + { + const float ICON_SIZE = 18; + const float SPACE = 4; + + bool isMouseOver = Event.current.IsMouseOver(position); + + ref SirenixAnimationUtility.InterpolatedFloat t = ref SirenixAnimationUtility.GetTemporaryFloat(position, isMouseOver ? 1.0f : 0.0f); + + t.ChangeDestination(isMouseOver ? 1.0f : 0.0f); + + t.Move(1.0f / 0.15f, Easing.OutQuad); + + float value = t.GetValue(); + float inverseValue = 1.0f - value; + + if (invert) + { + SirenixEditorGUI.DrawRoundRect(position, new Color(0, 0, 0, 0.2f * inverseValue), 5.0f, new Color(0, 0, 0, 0.05f * inverseValue), 1); + SirenixEditorGUI.DrawRoundRect(position, new Color(0, 0, 0, 0.4f * value), 5.0f, new Color(1.0f, 1.0f, 1.0f, 0.05f * value), 1); + } + else + { + SirenixEditorGUI.DrawRoundRect(position, new Color(1, 1, 1, 0.2f * inverseValue), 5.0f, new Color(0, 0, 0, 0.05f * inverseValue), 1); + SirenixEditorGUI.DrawRoundRect(position, new Color(1, 1, 1, 0.4f * value), 5.0f, new Color(1.0f, 1.0f, 1.0f, 0.05f * value), 1); + } + + labelStyle = labelStyle ?? SirenixGUIStyles.WhiteLabelCentered; + + if (icon == SdfIconType.None) + { + GUI.Label(position, text, labelStyle); + } + else + { + float textWidth = SirenixGUIStyles.WhiteLabelCentered.CalcWidth(text); + + Rect contentPosition = position.AlignCenter(ICON_SIZE + SPACE + textWidth); + + SdfIcons.DrawIcon(contentPosition.AlignLeft(ICON_SIZE), icon, Color.white); + + GUI.Label(contentPosition.AlignRight(textWidth), text, labelStyle); + } + + return Event.current.OnMouseDown(position, 0); + } + + public static bool Metadata(Type metadataType, bool isFirst) + { + var isRemoved = false; + + if (isFirst) + { + EditorGUI.DrawRect(GUILayoutUtility.GetRect(0, 1), new FancyColor(0.06603771f)); + } + + Vector2 padding = new Vector2(4, 4); + Rect rect = GUILayoutUtility.GetRect(0, 24); + + if (Event.current.IsMouseOver(rect)) + { + EditorGUI.DrawRect(rect, new FancyColor(0.2784314f)); + } + else + { + EditorGUI.DrawRect(rect, new FancyColor(0.2431373f)); + } + + + EditorGUI.DrawRect(GUILayoutUtility.GetRect(0, 1), new FancyColor(0.06603771f)); + + var iconWidth = 16.0f; + var iconPadding = new Vector2(2, 2); + + SdfIcons.DrawIcon(rect.TakeFromLeft(iconWidth).Padding(iconPadding.x, iconPadding.y), SdfIconType.GripVertical); + + rect = rect.Padding(padding.x, 0); + + SdfIcons.DrawIcon(rect.TakeFromLeft(iconWidth).Padding(iconPadding.x, iconPadding.y), SdfIconType.Braces); + + rect.TakeFromLeft(5); + GUI.Label(rect, metadataType.GetNiceName(), SirenixGUIStyles.BoldLabel); + + var removeRect = rect.TakeFromRight(iconWidth).Padding(iconPadding.x, iconPadding.y); + + SdfIcons.DrawIcon(removeRect, SdfIconType.X); + + if (GUI.Button(removeRect, GUIContent.none, GUIStyle.none)) + { + isRemoved = true; + } + + return isRemoved; + } + + public static void DrawRoundBlur20(Rect position, Color color) + { + position = position.Expand(63); + SirenixEditorGUI.DrawTextureSliced(position, OdinLocalizationGUITextures.RoundBlur20, color, 63); + } + + public static void DrawRoundBlur6(Rect position, Color color) + { + position = position.Expand(10); + SirenixEditorGUI.DrawTextureSliced(position, OdinLocalizationGUITextures.RoundBlur6, color, 10); + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs.meta new file mode 100644 index 000000000..1aab03c1a --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUI.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 12ea4fb9c8db4471801a31e2e0b353de +timeCreated: 1704803170 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs new file mode 100644 index 000000000..b17855197 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs @@ -0,0 +1,310 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using Sirenix.Utilities.Editor; +using UnityEngine; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationGUITextures + { + private const float FADE_STRENGTH = 0.4f; + + public static Texture2D LeftToRightFade + { + get + { + if (leftToRightFade != null) + { + return leftToRightFade; + } + + leftToRightFade = new Texture2D(32, 32) + { + hideFlags = HideFlags.HideAndDontSave + }; + + var pixels = new Color[32 * 32]; + + var index = 0; + + for (var x = 0; x < 32; x++) + { + for (var y = 0; y < 32; y++) + { + pixels[index++] = Color.Lerp(Color.white, Color.clear, Mathf.Pow(y / 31.0f, FADE_STRENGTH)); + } + } + + leftToRightFade.SetPixels(pixels); + + leftToRightFade.Apply(); + + CleanupUtility.DestroyObjectOnAssemblyReload(leftToRightFade); + + return leftToRightFade; + } + } + + public static Texture2D TopToBottomFade + { + get + { + if (topToBottomFade != null) + { + return topToBottomFade; + } + + topToBottomFade = new Texture2D(32, 32) + { + hideFlags = HideFlags.HideAndDontSave + }; + + var pixels = new Color[32 * 32]; + + var index = 0; + + for (var x = 0; x < 32; x++) + { + for (var y = 0; y < 32; y++) + { + pixels[index++] = Color.Lerp(Color.white, Color.clear, Mathf.Pow(1.0f - x / 31.0f, FADE_STRENGTH)); + } + } + + topToBottomFade.SetPixels(pixels); + + topToBottomFade.Apply(); + + CleanupUtility.DestroyObjectOnAssemblyReload(topToBottomFade); + + return topToBottomFade; + } + } + + public static Texture2D BottomToTopFade + { + get + { + if (bottomToTopFade != null) + { + return bottomToTopFade; + } + + bottomToTopFade = new Texture2D(32, 32) + { + hideFlags = HideFlags.HideAndDontSave + }; + + var pixels = new Color[32 * 32]; + + var index = 0; + + for (var x = 0; x < 32; x++) + { + for (var y = 0; y < 32; y++) + { + pixels[index++] = Color.Lerp(Color.white, Color.clear, Mathf.Pow(x / 31.0f, FADE_STRENGTH)); + } + } + + bottomToTopFade.SetPixels(pixels); + + bottomToTopFade.Apply(); + + CleanupUtility.DestroyObjectOnAssemblyReload(bottomToTopFade); + + return bottomToTopFade; + } + } + + public static Texture2D RoundBlur6 + { + get + { + if (roundBlur6 == null) + { + const string BASE64 = + "iVBORw0KGgoAAAANSUhEUgAAAGYAAABmCAYAAAA53+RiAAAFDElEQVR4Ae2dzZIURRSFaQFBDGBBsHGB76Ju0BfxkXwRZaXvIgs3BhEiIT/DYHu+pG+R3XN6mDa6uZuTEacr61ZWVcb3kVXFaq5dSwuBELg6gVUN" + + "Xa/X1a1tHWO7G8bU8RqfrSdQYNnuhjPq+Dh7tXqP9cbY2/4p4J+pTK5PqRrbGqdu2iUEAP/vlHfqV6rO6VuCdsUAm5SQm+p/vgl9wjklSN3RIqlIvN/OkAv+uQ693eRMW8I+khhDW87bFcNBoFO/pdxW7ihfbML+" + + "LCdCBOSSVqulpLzW2FebvNSW/TcKxxG0tFnMvFKQgpC7yn3l3qZPreTkcSYYH2klhpWBBGS8UJ4r/AOHIY1xNZbtWBlsqzGQE4CPlAfKQ+Vb5XvlkcKjLe1wAjy6nio/K78pcKbxGKvHWT3SPrzA9VWGFKCzKlgl" + + "SPlK+VF5rKQdj8ATXeon5Q/lmcIKYjWd6atsyKmlpNqQxBcYcninIOcbJVIE4cgNpjyFYAxrmMN+eWc7MSwxBvMo+0FJOw0BXg0whjXMLxWDqHrH8Eh7pKSdhgBsYWw/pnZXDPt8qZUclljaaQjAtqTAHPb2Ucbt" + + "OTjLoZZ2OgIsgJIC96XNO9iq/8uUoGVgOichUJzZFv9xo1nMfOetQfOB9I9KYC/nfWKOevdc7HACTgwW0z4tgQvMnZhPO6XczRKIGIulvxgx/Q7sDCLGYukvRky/AzuDiLFY+osR0+/AziBiLJb+YsT0O7AziBiL" + + "pb8YMf0O7AwixmLpL0ZMvwM7g4ixWPqLEdPvwM4gYiyW/mLE9DuwM4gYi6W/GDH9DuwMIsZi6S9GTL8DO4OIsVj6ixHT78DOIGIslv5ixPQ7sDOIGIulvxgx/Q7sDCLGYukvRky/AzuDiLFY+osR0+/AziBiLJb+" + + "YsT0O7AziBiLpb8YMf0O7AwixmLpL0ZMvwM7g4ixWPqLEdPvwM4gYiyW/mLE9DuwM4gYi6W/GDH9DuwMIsZi6S9GTL8DO4OIsVj6ixHT78DOIGIslv5ixPQ7sDOIGIulvxgx/Q7sDCLGYukvRky/AzuDiLFY+osR" + + "0+/AziBiLJb+YsT0O7AziBiLpb8YMf0O7AwixmLpL0ZMvwM7g4ixWPqLEdPvwM4gYiyW/mLE9DuwM4gYi6W/GDH9DuwMnJjxZ8vt6BRPReACcyfmVDfPdQ8gsE8MBi9YPOC6GXo1Ans5z2JqEH9PvnK1y2fU/yVQ" + + "nNkW/3GtWQyFGniu/tsxIj+nJABjWBf35V6zGIwxoKS8Vv9sGZnOsQnAFsazHByM5sQwkBNeKk/HqPycggBsYVxy6nE27rUr5p2qiHmlvFB+UdJOQwC2MIY1zGG/d8VwkCXG4L+VX5UnStpxCcAUtjCGNcy3xCx/" + + "fHm9XtO/odxSvlTuKw+Uh8p3ymPla+WmknY4AVbF7worBSl/Ks+U58o/yhvlfLVajVWzK4ZHG3JuK3eUuwqC7m361DiGHMYu56ufdpEAkHl3zO9tHl+sFITQr/fM+DorMUioVhdhSWGPVhfF6F9KSeG8iBGEj7Ri" + + "On/p8ugiJQTWMN96+c9idGw0BnAhLsoJ9THAKiElZf5wyMoRmKnBrho8iyksCe8UQr+kqPuhLUD1jqlq1QBPrk+pGtsap27aJQRq1ZQgRFSqxulDgB5l41IL3EnMOKCfOsZ2N4yp4/TT9hOof/Fsd8NZdXxcocSM" + + "nfyEQAhckcB/Z2rwteNGzXsAAAAASUVORK5CYII="; + + byte[] bytes = Convert.FromBase64String(BASE64); + + roundBlur6 = TextureUtilities.LoadImage(102, 102, bytes); + + roundBlur6.hideFlags = HideFlags.HideAndDontSave; + + CleanupUtility.DestroyObjectOnAssemblyReload(roundBlur6); + } + + return roundBlur6; + } + } + + public static Texture2D RoundBlur20 + { + get + { + if (roundBlur20 == null) + { + const string BASE64 = + "iVBORw0KGgoAAAANSUhEUgAAAMEAAADBCAYAAAB2QtScAAAgAElEQVR4Ae2di5bjOI5Ep3f3//94t1fXruuMhEGKsmVnVlXiHDkCgQdBiazqeZ35z39+7OcN/LyBnzfw8wZ+3sDPG/h5Az9v4OcN/LyBnzfw8wZ+" + + "3sBf/Ab+6fb+77//dvKP9vwbaN/3pO3Ph5i8nEdD//zz+TP8z6ON/tK6z2/v9S/h2fV+LtHCN/q5BJ9f0rOH7nO3r/f29vNzSbZv9Ddfgr0D8vVH+PUTdO/gr7sYf8sl6D7264/Y77lC967+6IvxJ1+C7mP+nsfy" + + "66fOd/nHXYg/6RLkh/rKY/OuOb7qMNb9fdUcp33jP+ES1I9y2suJRu9YI5ZbokdmeuVBdY5XrrH0Qh5N+l0vgS/+0X2P6l7Vd7Teu/TRvs48uLnGmX1f/o5+t0uQL/rZl3NmrzrLK3uz1lmHrJvzjN72PaNXfben" + + "+7/LJfClPvsCnu3zbP2z81u/OscjhzB7P1LvjKC9nu2TPU/n3/0S+BIf3fij9Y/WzeZ8tOczB2i05mrPWr9aV9+DfR6tr/1O9b/rJfClPbLZo7VH85npkZpH9vLoWnuHrZt/r6bOspJf9+y6j9TWXqf53/ES+KKO" + + "bnK1bjWP9Y/k1nmfqa290l85QKO1Z7W1ZpbLPObv5eXscmofqbP+VPxOl8CXenSDK3Vn5TDbSq+jeziSv7p+d8i62i6v7nOUk3mznG5/znK0ruv1lPZdLoEvZHUzK/l7Oc/GnXWvj3mvxnqYRnPt5dU4c2evLr6a" + + "070Deo96dvmna7m5W/M3/u8J2vVvg/Rkr2YWf0Usp5z1z7yz+OrhmeW9Isb+Zn1H+3+kZtRrqNf/PUH70d50Cdq1h5N//tOops16jWJHddYc1RyZp+Y+4q8ellneKHZUZ/5RzV6s2/usV5d/WPsul2D1MLHBWe4o" + + "dkQ/krs3T36QUd/MeYSvHpJR3hH9SC57GeXvxep7mPWpuYf973AJjhyOWW4Xe4fGS+/WyY+xF8/cR/jeIRnFO/0dmnvs1jJW8UhurZ36X30JVg/HLK+LrWg1p/q8uKpV35c70rse1pyNs0MyilW9+sxYtT2/qxlp" + + "6FjteVXvf1fz7isnyldegtnByZFHeZ2+omVOctY86nc1zl57qXe4l3vk449yO71qR/y9XPZZc0baTCeW1vXM+GH+VZdg76O7kVFe1atPfWrJz4rVPvhYXeuqXn9nscxb5bMD0cWqNvPPirGXWa/ca83LWPLVvKwZ" + + "8q+4BKsHoctb0TInOS8h/aN8Vu8Lzp4zzVjFWn/kY3e5e1qNp3+Us5dRTY2578yfacYSu9qML/N3X4L6kbtBRzlVn/kZezVnD7lG57vPmqf+KI4OQtVnfsZezdlnrtH5vouap564kpP5LX/nJVg5AKOcqqefnE2m" + + "LxePxPdqaq8Vnxwt+6ut4OzD19jMz1jHVzVmNldMrfIVnxws+12V+9+VnPuqUN51CVY++Cin6unv8S4+02YxXptxMTVfa8a6uHl7scyTzz54jc18YyL95WKnzWJdfmozXmP4Wq6pVnElp9bc/O9yCerBccDUkxNP" + + "Xy5mXK3iSs6spqtHw6y7evf+nm684uhjV33kp95xtT1krkdyss692aeLdTlqidkj9SX+jktQD0Q3WM2Z+RnruNqrkPlr79Qq7/yRhr5n3QevWvodn2nGzkb2Zc8Zr7HOR6uWvWts6r/6EnhYZkN0Oant8S6ulpic" + + "eTq/00a5qa9y8jDXuXrHf7sPntoeN76CZ+Sww9ontRknhll/9frflZy7ynoJ3v1fpe4OQ2p73PgKdjmrGi+O3C7fl1pj1hjv/JXY7MPWWPpykbXkiXBm75CaGkM7anu96ec6lbtWxtVegix0Zw/+t0jbXtG8i6e2" + + "x413uKdlfMQZlVjGZxoxrOandkn49WNeaivcA5y5qclF8uSJyc3Z0zI+4rNexhJXOXmY6169+9+9+F3Fq/4m2PvAXTy1PW48MTkbxU+t8upnzSxm3gpmTuX4mGtdvfFv93FT67jaDDPWceZTTz6alNy6J7UO6ZN9" + + "R9z1Mq6WuBfP3Ja/+x+HHILBtT1uHExOfdUybqzTsnYvnrnyGWascnzNdfVFD6C+mHrH1TpMrXJ8ZgF90mf96qN1Zq+MqSUSt+eMZ5+X8TMuAZuZWY1X39rU5YmrvObh+7CWPLHqM9/YCmYOPI31O+OwdJa6fAUz" + + "B77im8OMWeNc6vodUuce5YnUjPpUvfp1vb14zf/kn3EJPjUsDsPNzLhIrjxxxmsM38d++h3OcmosffkMMwbXmGNmHJZqqclnmDF456uDzJS+POfInNST2wut42ogZk/xqt7/7sXvKxaVZy8Bgx2xzE9uD7XEGSdW" + + "42pHkPVn+TWevrzD1OCY81698a+HxIz05R2mBu98dZE15HvoPDOkh/vsuBqYRo1a8swZ8aP5tz7PXoJbo4b4Egyl33G1xBknlg/rpN/x/1rIsW7Ur+r6MySG0fuIeSCs0Z8hsYzri/SS7+H/ufAE2RN9qqG5346r" + + "JdIj+yWvMfxT7JlL4AafGcQeHaZWOf4zz5HLUNdhv6mlL0+svPPR0jgYaenLEyvvfLTVx8PPe1qpyVmTU8u7wjqulnjNfuyXteh1yJ65BLOF3Lg56cvFmpM6XF9+BEeH/aieazJv+nAsUZ565fh7lh+0cv1EuA+9" + + "5SPksHexUa2Xg/iq0d/3Acfw1dUugV8/xnGTd/6vksfh0UvgprqVj8YyXw76sIZ8BesBP+q7Rq1TB7H0q2b8kvgrt+NqHebh6Diaulykn7xiHnzmNl719MnB551k/uYuGTW+Iwr0Qcw5xNQuCeUn80ro1qvqQ//R" + + "SzBs2ARy84bVKhJHU09ffYT10KZ/lLtG1qlVrDPqd4iG0WNmHg5z9DtES12/Qw4ya2fMw44ur/3yAsAx3g15+mgzs6d7Tx/uXGL26rSMP8VffQncMEMmz6HVQbn5ajOsBzV9uUgfecWMuZ45+nuYc8tBjFotuVqi" + + "BwSt42jq8hVk3czjAKvJwdp7ky4aMd4JcThW/as6/rW37wDfGWpV6slr3lP+I5fA4buFZzHzzRHRK8dfefKQdlxtFVnT3Mo73xndQ+cTw4hpydUSPSholeuDPubpix5ofdaVE9OXd0g+lkge7wkNjuHLL8LOj/2c" + + "gXS5OGsxy5nF7no+cgnumgwEBtGSo+mLavipoWvGOuwOLpp6h51G76qn1q3dacysLgcx9BXzkJArBytX65C9oHM4QXw5cxiDo4sb/bRO+uTZBz15tzfWqJZ5xtHgojXpJzf+NB69BAwxslnMmi4HrepqifRIn5eP" + + "v4KZs8K7vqnlHB3PWeUgRv6KeTjIlYOVq3XogWfPctYnN7FeAGJomOvh0wdTA9UTL0m/8rr9Wk+e8dTUq4ae5h5Sk89i5lzw6CX4VLzouEnT9UE5Mf1ncHbAa2zmMwNxc/SdLXW1xNyPPLFyfC0/vDyxcvz6cCDR" + + "mLNy5iSWCCfPPcAx9av3cfiJ25scrGJql4TBD7Ng1uds18g1Zp7aaXjWJXADDlZ99NQqT98e1hCrj4cwsfLOR/Ohp1xMTd5havDu2eSbLgcx8meWH1wOVq6W6AFFk4P4zo0PV3N+9fS3tJuRr9kbX56ITp+0rFc3" + + "xxh+xzPfOFrmm3MIj1wChz2yQK1JPzk98esz0jOPA6zvYRbR5StY89OXg5WrVcz55aBGflp+XHR9sHK1ihxENTmYB9Q5yZOL5I2M/DRyqePdyomjYSLcteBp2ZN8/eTkVz97PMWPXILVhXLj1nQaMfRHH168tSsH" + + "fDWHnjVXrUNnGOHW7jYnHCN3Zh4EcuD68hlyGImD7CPRg+o+0h/Nnzr5ndnH9dyfSE3yrgea+8w4dVXvtKyRL+WdcQlWNudQIPkrNZknB3nR+nlY1cSMjfh//+o3iruecf3EXE8OYp1/jVx/zVOrH1sf9CFXDnIA" + + "O18drIc0tTrjlj411soa3o1W13F/1pAHn1nWzPIyRs1e38z/xM+4BJ8ahuNmKpqC/ujDi6+1HtQZdoe+07oerKcudwZ0ecUtdIvBMXJmlh8Uri+vyOFTk3vQmU0O1vn0t9DF9EczOov5tafr2Ye87JXcHonZn1z8" + + "ipn/NF+9BHuDO8he3l6cPuSYJ+/QA7mKedhHfLUX85Cb2M2Y2pZ+21fl+FoeAjm493AYyUmE10OaMyXfUj+9e/zOnKmLodX10FgHozb5RRz8kDdbay9u29281Utgw0fRjVMPTz81dXOO4ugQe+hF8uSitdVXT2Qu" + + "/MTKnT33Jwc18rD6wfXBytU88PjyRPjo+d8t5ozOIG6hu2+EhjmLPHt0nDz7ivSQ2wfE1F0HX35JOPvn2UvgwHUudZF4cn201NNXV/PQ6Yvd4UzNQ72H1JhjffXRWde4PNG5Km5lt70Sm5kfPRHePXnoiXvomVEu" + + "1oOfPvM4l4hWLWdiDQ297tkZ0I2L1Nkr11Mjbl3y1NC1kW58iM9egmycG0k9+SgH3Zh8hh5C0LzURtxDvYr2Md/11NPPOeQgpi9PhKd5CBIrx/fwJ/ewG9PPw46mz7rOCO8s1ybe+fTgXWjk2Ne9p09e5tjTepD8" + + "Tj+ak/ktP/MStAtsops3ni9FnjG4NcZFD58+mJq8Yh5iOTji1hvX79AZEnM+ufvCXzEOgIdAXjEPOzEPvejaYB5+fC8CiHVzuT5xeSKcd4LBXU+NNdVAcxI3eXdta8k93VYuAQN0tqdnPPmolzmJ8NnDyyaeh7P6" + + "xrpD7yGvMWoyZo8RumbOSi4+lvpV+YjpixwQDe6DBudgqaXvwR9hHvqci76Y2tX7/Ot6qHL2B8dA/dxrx8lFFzd66wOvZi66XJzlZmyUf8lZuQTZ7BnOINXQ1OWr6CHrEI3Hg6yv5qE33vnmJmaf5MyMn1j3sYUv" + + "cXQtOZqHSq4P1sfLkLh6AfJCsBZWZ0HLNfGx1NgzfsW69+rTx/WoT05MQyf+UjvrEriJOmzV8fMx37xE88iRi/XApQ/PJw+4h34WN2eEWStnLniis1bc0m4fHd6ZHx4cPXn4yXnmAjhDrqWWmHE5+4ZXzH3TI33y" + + "8RPNATXimvn64kg3votnXYLdhSYJbAJLlHc6sXzy8MH3nnopRj59Hr0IzOdczrpJt7nhGLG0/OhwfTno4Zfrd5cg/8Rnrdk//+cc8lx3xtkrcfeaSC984pgx8xOvGW/+PfsSsEFMrPwS/PXjy8icWmdOh3nI4Eee" + + "0cGvOj1XLwIzOpNY5x7tFV3zsCTC88mDj756AZzHy+CaFXOtVe7+yXedDoljxMwV0Y3DNXPx5aI5D+PeJWChzkZ6l4tGfn3MtVdizU0/D1jyzIETq4+HXF1/huSuXATXTKwz4WPi1bv/9SCA3bN3Cbq/AVhz9fCz" + + "X2y0drcv3hP5xJJ3uWjmJm5y+27IWTV71/yR/p+9S1AbHfFZdM/MSYQfeTzQFemRmgcZzUOfXK3DzOt65lry0R54J8Qw8epdDwbcjw52T14CODOBHn76yhM3eWisw94x18SXg66VWvLRnkc6tcQSN3do5g4THgmc" + + "cQkY7BGzrmLtRfzIk4e043xYdTm491CT+faoyKxos5m38MXISeMwaHm4Kq+XAN/18jKsXAB7s7eOsxf15Lmma8/QfSWST++KmbPCrV/Jvcs54xLUpgykJVcDq64Pjh7riNdDhu9jXH+E9UDvXYIuv+vt+qN9oGPi" + + "1fv45VBgHrwOu0uAdvQCuI6YF4G9sbaYnHVSx3e/6u5PvUN6ooNa9Tt9lGPuITzzEjBYZ+j1MS9rzCEmN56+nJftUzV8YqJ5o4OcOnz20Mv85LmWHOyeTb7oYDUPBNg9HkAPHjPA/VOf9eTgzOjPXmZIf+K5bmru" + + "NWete97KP72H9KnTT/5LvoGxm7AR1un0zNnlZ16C3cVKAhvAxKv32a8vc+bzYYzD9x4Pcodos4fe1nXrMAe68yRu8m3P6Gl+0ER4PhxGfNDH/vhnXABmZw33JhdZhzWJy51hhlv6xcihl6Yvqr8FH7kEDLpneznG" + + "E+H1YZ29HOJ54Pxw6vpiHl55h2ijh17WJM814fryTbrtET4yDoiHRM5hg7OeB0/uwWcdTLx697/0Yf4O3Y9r4ctZF9913Z/zuM/ELf02T+rJ6Y+fSF1n5nUxtZUcc1/67w7dFimEAVeMvKMPH8caPxa+vEMPc4do" + + "o8de1unnes5ScWt7OxjwNA4CBuZDf3wPHL6c/nkRZv8YRA9m7tA9EJO7jr5rqte97flb612jBzO8xWZ/EzDIns1yulhqcrB7WHsvhzgfo6Kauh9whB7kPPDkpl+58a6n6ybCMVCuD+ZHh+vLOXxwe3oY7Qd6ETba" + + "GvXso8PcB/H04a6njq8u5izJt9TbnlNP7t5AjJj8Igy0ldg0Z3YJLDyCDJ6WfnJzOq3GyKl5ajP0YyWan5qcwyEH9evhr3rWJGctfNcUN+m2H7Q0P3oinIdeefDsl5i9KqcHs3eYc7sOfauesVy38lzbGBp8ZMSY" + + "LS215ORUP+sO8bMuAQONjFiNp5+cHpnfcfONJfKR0q+8+6ip5QFH15frg8mzh5y14XUGfEy8eh+/HgSwPtSgjXp+dPlg9mBeeEXn7dA//bv1yO/irJz56VeOj7mvyvVBZu8sa7v4rnbWJdhdaCehvjTS0bSM7/Hu" + + "Yz6i5SGX0wfuo9/1Z070bt5N/rQ/fM2P7eFNpBf+ak9ymRWTg8wldrOvaN0F6OZC0yo3n1m+zL7iEvgixG7zxnxJZ+LeB84DX3Pz8BPL3OTMSzwx98Ce8TvzQID5eOhE+9Ue1qNnPfPgO7ccv3vsfyZuSw33bYy5" + + "WBN8i73iErCBkdVY56uJtRe6Mfke5kc2N7URz4Ndub7Y9ci15OwHjolX7+PDewBAHg8+nBr8tNqHGLnMZg85c6J186LRiyfjanu4ld3q4dWox+xz9a6/aMylVV8dnMUyb4m/4hKsLMwmNLhPanD1xKpXP3Ph+WH1" + + "R5p6HgD47KCbmzmjdXI25h6ZB1ekDu7h7/p4gKwRPfz4zkofefaCdzpazUt/C3+KV99cdRBTB50/+SXp1T/vvARsbsXME7MGTV0+w/rx0vdjp0avqqdfuQdfzLi9EuFYxav6cRA8EB5kDq0atV4G6xKtSWSuPPj6" + + "zlbnVgd9yJHPkFmMw9PQMfHqjX/Jc9/jrCcjr7oEK5vscqqGn4/bVcOX72F+xOTU5SHo+ErOrK7O5txgNT96HmLqOcTiSo31efjRRnM6I/GOq42QmYzBMX3xql5/0aqhuf8a01/JMXcJj16CbvCVhbLuKM/+1Pqg" + + "y49g/cjp1z55YIilv8KtqX2dHazmIfAQi+QZW63xAlDHvF6kOo97UceXH0Hmynz8asS1yt0fesetW8HsMc0/egmyWW4gdblxUb0i8cyRqydSW+Ojflm3wj0Iidap4ctBfTFjNW4vEBOv3sevHx/MhwxjH9lXjbWI" + + "ifC8AB7+Op8z5myrPGeAWycX1UV1EFPv9nbNuOYQJ3clz7olfOYS1AUYsFqn1Zwjvv1EauH5pJY8c+B5AJJnnofG/JpnXL3zrbVvzgSvxkfODw73QIvWEGNNLOtcM2vJ8zI4i3n67kM/kTX0k6emngg/w1iH/aR1" + + "WsaX+JmXYGVBhsbEq/fxqy5+RO5ryBk91I1iz+r1oNNPLXt7oMSMwTHx6t0ffnV6eAHyIKNjHA564XsZMq+u/Yy/LTF9t8S1uj90NdFcEd391ENvzqn47ktwZHheRj7Wjl5exs1ZwVxjxD3Ionmdj6Ze0TpmhVdD" + + "ywOQB5peXgTrzKWOePXNX70Q9HWuGRojv7OMw/Pp8r9U+06XIF/c6KWY40s1T7/GU38VHx30kZ4zOv8e5gXIA+3BF1+1x9qXeVNzfjXj6iMk/8vtjEvw6EaybsT3XhB1WUu+/iNov3ege3NO/hTH8OUX4dePeWfP" + + "RvvsfcT/Ndql3h5qM8zcyru9z3oRo8cjdZe+o0uQg10SX/TDOqtrmSd2IxlbQXLyoV/6yY2JGXuU0wujfsXMW12Pnns15tSe6itITrVct8Y63/UfPshd04HGWp/WGV2CQf3bZF+iC674Ncda0TiYnHhq6Wde5sgz" + + "vlc3qqEOsxcfSH4J/PpBM2YvQuaqrfrWZv5IQ+/MNTNmP7U937wvw3degvoyVjeddZXjp0ZP/YoZg2vm4cPTr9osPqtb6UOO5mHH908t19YnpjZb2xzytarVevJSk1es/YyP6s1fRfrlflfrDuXxL6i+k9WXmP7K" + + "nKP81OWifTs/tcrxU6OPmpgaHMvYUd9a8dLw148aqFWePjkjP/Xk9u1qM9Zx+mSv5F3+27SvuATv2LxriKMXalwkD179rM+Y+Ymz3IzVmtp3lmvMGrHqnU9u5stFayoaF2v8TP8da9zm/YpLcFv8zeSMF/tMD2qz" + + "PrmvIrWab84qZq/Vmpp3Ro/a89v5f9Ml+HYv/2eg7/EG/qZLcMa/wHqmB7VZn9zTkFrNN2cVs9dqTc07o0ft+e38r7gE73ixriGOXrxxkTx49bM+Y+YnznIzVmtq31muMWvEqnc+uZkvF62paFys8TP9d6xxm/cr" + + "LsFt8Ybk5uHpN+l30ig/dblok85PrXL81OijJqYGxzJ21LdWvDT89aMGapWnT87ITz25fbvajHWcPtkreZf/Nu2d/zkBm37kX2jly6ocPzVenH7FjME18/Dh6VdtFh/VuWfj+HL6VzMGysmpfmqZl3rl+FjtVevN" + + "uST/yk+t5tsv9RG35wpmj5X8h3LeeQmODFg3v+LXnLqecTA5eamln3mZI894rfOwm0NcM4ZfLwla9k9eY/qiuSt+5shFZxbRO8v1jNeaPd+6L8PRJWBwP84rh+te4mg9X6bY5RlbQXLyoV/6yY2JGZtx88E9o482" + + "67kao5c9RzXm1Lj6CpJTLdetsc53/S52tuZst76jS3BLWCA0feTCZF0OlnxveXJrvv4jaL+zkPmdI/eC5jurcX3wHQ9z5ZpHfHIx57x6+7+uZ60Vqaut4KN1l95nXIKVIVdyVjZiDiint75a+q/m/vf7RdfD5994" + + "EJlzxbo90ANdzDU63firkH1kb3xMTX4RJz/kf7l9p0tQX4YvVDS+9+Iy39wZmj9DD7JoLj5/oqfvnHkBzCPXhxr/NrAGDbNfIj3wQZ8urpb5anu4tb6ssYf0mVnG65qzui+JvfsS8EI8NPUA8AJ8eWK+lKrhjx57" + + "jeLP6BwuD7J7QcP06Y+WF4E4Rsx6eDVnQ5ePDjS6MXL1U7PHWZhzdT2Ja8SrqYlH4zX/af/MS8Cm+LhpnZbxo9wXJ1IPzye15JkDz4OSPPM8VB5m9gc3h7h7BvE1a0TiPtRbZ75IDHMN0RmdaeRnfs0xlmgOWvLM" + + "gWNqyVNTT4SfYc6QvTot40v8mUvAAKMPyeLGxdFAxHk0uXoiOTVunZj5RzgHoD4eeHT22h1oY2A13w+YD3nGak3dn3ugPxzMR000lj48fXNAY0dxK/1k1iPCMbVE9UtC5Oh3mP26uJp5+kt49BKwyOjjzRbMuhm3" + + "x2gz6D7kyo9gfngPw6jeOHvuLoDvQmSmNHUwH3KMZT6cWbA6k3M70wrSI/NqT31z0pcfwTo3fjX6aUe5dSuYvaf5Ry/BtFkEGWD0kU3rcurg+PlkrbkZn3E+tPHkaB6CiuwBbXQB3KO4pd6Mvv5NApJjXkWLqMES" + + "na9inXXkWzeKo5Pjk35y4yN0buJazVUHM0+904yJKznmLuGrLkG3OMP78bu4mpsU1UE0dfkM60dMH56PfVLz8KN5iBM3uTV6UYuRj5918Jk5S0VnQ5fzf9YHF9UrZg0xe3d55prT+RlLvrW+9YankYeJV2/8u5o3" + + "7rAQeeclyHHYnAcB7mOOm1dPJGfmZwyeH1y/aqnnwSePOf1/hewOsvvY0m5zeQHoSxzf2o3e9p616ORjic4GyuvBnfnd5cg+9hXtpW9u+pU7s3r1q04cUwe15GovxVdcAjZRP66bqLHO9yWI1oroxuR76IcFzU2t" + + "cuZHy8OffAt9MudRdA36cAHw4T4bnb4j4vYQnT3RGUF5HvoRN7/DXM+42h7m3PBq1GP2uXrXX2Nq1VcHZ7HMW+KvuAR7C7MBDoPY5btJ8OzHDztCDztx5hThxDT8as7qwRfJzYe6rh59tndmId7NXg98+jV/FjPX" + + "vZyJuT94tdx7jb3M/4pL0G0mX7RxXwh+xve4H/FR5HBSy0GBg5iH+Opdf52xm4l8dOsSqcbvbNaTuYh3e/Ngg3L3oS929Ue1bs8jzX26N/zMNf4leNYlYEN7HzXjmZ+cl+DLGXHiGTMf5EP6p2/q8r0PzSFhzopq" + + "W6g1+ydSgw/mQwN8TLx613w4dVj2gzO/2O2FuT3oyclNPf2uj1pdP31y0pdv8ic9/crxMWq15GjZ15zEmp+xJX7WJXAxBsoPm37yUb466OZAuXG1GfohE70gqck5JMzeoet22M1AT9YS6et7SU4/9dyjPYnL6QVP" + + "hOeTBx2eD3kZTz97wHPNUcycDrcWNzOOAB9ZF0stOT2qP+q7q88uAYv4gUaNZjldLDU52D2siY51cTU+Uh44P9rswLMv80AOB1qHm9ya6+f/OySa88BdB8yHhvidUYfZv6Jzo8vdg34e/uSZh56+tSN0DuOun2hO" + + "Rfcj1ji+sV/09u31azz1vZi5rqN/wdkl+JR4osMgowOQy3Qvak/jA9XD7wXx44Gsr98dfOLoI2OOPPzyuj59WB/kwZJflftf90lETu/k+qAHOjla99Sc9OHdw7rqOYP8CG6tdo1+b7NHLgED+kFHg+7lGE+E14f+" + + "aFiNpc8Hmh1+5vUjcjD05R1uaUPrZmL9nMHDz7oefN9bRRfKvmi5Rzn94O6nIntBA0eP8Q5Tg+eT69Z59CtuLXa/Yc3BHxn993Q2/NkAABGMSURBVGwl59bjkUtwK36SMCiHQbRdbgC++vCx8hDi0z8xeXfwyUef" + + "GfP4Jz/ryV3fwy/Ssz70R+vM/Y/2zTrEwOTMrSYHRw+5mZe+fUbobMTlK7ilX4zcNH0xYy/nZ14CNtB92G5j5mUNXF8OYunL+QAerjz8aPjERTR8Pjp8hlt4aKztoRfRWCdnyHWdMZEF8DujH+Y+O/TwgfXpDjZa" + + "9/hOZmh/5oCL8vRTy7m3sk/7SR+Oka9lrdxYYtakfoifeQlcmMH8wMmNg1XXB0ePdcR52axhrj5aHsDU5WJehK3sNjO8M9by4Ise/kRnAEeP/YmnsYbm3jpkD+hg9xy5CF4O+ljX9Uytrp0zkqe/0RtXSzQOasQ7" + + "Sz15l3tIO+MSMFD9mCtDWFex1hI/8vARPHwd9/CTU3ldW5/1PfgiB1/OOl4E+sKdoeIWur0vYmmsgyV2e/eggcnzEMsT4fWxh3n4yY1X7OaaaVvbO8t9EtS/S9wRHq27tD3jEozmY7D6kWuuOYnwIw8fpx40fA5i" + + "xviw5sExfPlFaH6YxcNekZiHn7U8/KLrJbIE/szoi43eA2sRS4T7eIg7ROseatVrH33X1E8czTrTtyVvB5+8PVvJ2etxF9+7BCzafbCRfrfAL6Eb3r72SoSPHl48tcST13xj5PrwkbHqX9X7X3rWg6/v4Rfp6eEX" + + "XUdkBTgmXr2PX9bEEru9obFHEZ4Pe8Xv0MNe0Xp1/cQ6iz45HVeruKV/2iM+VvPwj9gof6T/Z+8SHFmcXBbi44qpwdMcKvNrHf7o4aVbK8dfefjIM3NND3xFD77Imsn1cxbW03dt/DTW1ZwBXw7Ww6YP1od9oiVW" + + "jl+f2mfPdz7y5CPcUi5GHEuUXyMfv6nLxY+sB9nZl+CRMdgMhyFRTj83C3YPL5560YM2wi1113LNvQvgn/oVZ+sTm1mu3+0ZzQOXCK9PHnpi6dfDn37tM/KdhXg36ybfvqGcPHniVX3z71mXgE11H7bqbt5tWmNe" + + "Irzz0Xjh1I6QmM9G78wYWI3+9eDr+6d9RfrsXQLWcV04VtdnbQ2uL0/00CXCuycPPvH0Pfi1Tl2scXzmEZ2t+uiY8fTVLwklx7yMyRNrXsaW+FmXYGUxhh19dHQ3kwgfPbxs6kaYa8F9NvrJXA8R7oGvWA9++vT2" + + "EriOPn3VQC25Gljncf/G6iHTB2dPHnzy0q9cP/tVjbmId+jMK7i1uH1jeBr1L7eVS8Ag3Qfb0zOevNsUcYx1zAX3Hj4CNSAG1wcxtat3/+vaROSu60XIA185/T3womsm0l8fvmfOQJ68YncI0UZPHmQ5uMdrP+ZI" + + "Tb/O1/lb6d17RhsZPTS5qC4e1S91K5fABR5FBuPja92gxs1NhPvw4jHyO424vSpaB6bRBwM99CIaBzt91siLwDp5+JPnDMm3ktuc8LScBx0/NX3mqBzNh5jcQ1599RGSb8zaxFzDWUYaOlZRLevNuRREjf6peOYl" + + "YHA/9GjIUY6bpl6eCE+fD6FZo+YMI7SuYvaH18Pvwadv5Wrg6GE9Yph49e5/cxai+KOHfRNLrByfpx7o9OUVrR2hc2VcbYbbOLc9watRu2crOXs9nv63SBmi+6DqIoMk1wcxe5CD4ZsP8vCSOXz6IrpGnb49jSVS" + + "iyXaL//UR/PAJzoLa6CDlattoVtcDmrkYc5y9T585zJHH2QOfXkifPR42I3ri+hy0VzQ9dWcI9E8NCxRrm7dJfHXT80xN3Pkmau2hGf+TTBbkAHrx9anLjeArt8h2ujhpWvZXw20Z/LaLw98x+nt4RfRZg/r5UzJ" + + "iWkr89V58T1wifDVJw/6iNde3RwrGnvNPHxNPX35S3D1EjDY6KPlYHt5e3F6kYOxnjwRzsMHmdnevPahh3yGrOeFoHce/uTE8tncmw/HVma7Zn7Mhj+aj9mMycHK1TrMg2+804yN0Dn2kP3MjPqZ7cWt3c1bvQQ2" + + "PIIszseuaI+94TIuB3n4ABw8fbVNutnooGWNyakldx0Pvz6968GvPr3J89EHtToja6fp50zE02emzlcHfciTd3jGoadvzpN8Cw1j5pGjoWEVr+pJv2dcAgasH3M2nhvaq8k8OchL9gLANTVyzDM2Q/NF+9PPnmrM" + + "jJYInz1b+BaHY+TPjFk058KXz5BZiXeI5mOO/irWtbPOGJocxPSv3vh3NS87uEZqy/yMS1AXY6D6kTuNupXhM0cO8qLzkNKvGnlHnuyZa7COMZD9eRmOXID6XqrPmmn67oGYfITMZ0wOVt755o2Qvl2srqd/FLf2" + + "d0aPap1Wc/CX8o5cAhrWj9YtnFqtST85NfjVWC91eSIfZXQZZvPSoz6uh25fkVge/OTE6rNJN00OYuTOzP2RI3dWNf2KzKsm7zA1uA+18oo1VtfR73A0N7pGnZYcrfrmPY1HLsFsMQbMD1t9alOrnHjW42Pkpenz" + + "cTiEieSpwbHak3ofcuUi+XD7wtH0QXzXgXfPJt90eWLl+BpravLEyvHrw5xqlesnwo/69K91aq5dcSu5M3MM4GvJR1qXY+4SnnUJZosxJAdF03d4Y/rmdZg58kQ+igeUenvDySOGwfXlIPmJ9kOvHG30bKFbTA5i" + + "1KwYc2hysHK1DplZXd5haiucnubZ/1HMPdIDE6/eva9+Ch69BAw3+oizmMN2OW44+6pZBxJPnY/ggRftIapbD9IjLwMcjcc1El0HDQ7uPVvKLUcOYtSuWO5V7pzUy1cwD6x8hkdirF/znWk0J7qWuWog+p7Ncmax" + + "T32PXoJPxTsOQ/jBk1OmL6qBmHVX7/pLbjU1PoIHWw5i9qpIrRdAJMeZ7IMGB8kD67NJn7T04Rg1WnK1RPeFVrk+6GOevsjccjD9jqutYu2Za8mZrZoxUJOLVcevMXOewkcuAYOMPuIs5qDmiOiVm7uHfKw8/MyF" + + "j+6Miazjga9orbPgJ8e3L7x7Nvmmy0GMfC25WiLrah1HU5evoIfbXH0RXS7uabWX/h7u7c/4COk/slnsruaRS3DXZCIwjB88eZaoO3jmZ96I87GoWbkM9gZZz4tgvbPgmyMf4ZZ6yTWu3yEaRu7MfBfm6HeIlrp+" + + "h3mwjad2lNMja+w5w9wTeZh49T5+U0/+kXECe/UlYESGrx9draL5oDWrm+djUDO7DPYEeehNvlwdzAuSOhybacYvib9yO67WYe6742jqcpF+8oqjQ1v1o35dp/ruUT195000PtIy/hR/9BKwEQ9DHeBoLPPloMY6" + + "6auP0MtAHQc5fXt58PVB8+XOoi+yrlxUE9G1ETc+w9x35fqJcB/6ykdYD7p5R3XrRlhn0Qcx6jCx8kswfjIv5AudxWruxX/0ErTNQmSQ/Pjpy0XL9EV0OEYv+UVY/KkXgD7OJU907dQqZ+nU0pcnVt75aGl1r+nL" + + "EyvvfLTVZ3QJVuszj33pu0d8TLx6H7+pJ5/VfFQfZM9cAobjMDxj9uiQvvT3JSTv1rRHHtDK+RsAG12OzCcvfXnV9WdIDKPHEXPv1ujPkFjG9UV6yfdw5TLM+mWs42qJ8EeN/Ry2Zy7B3mIMlB89/Y6rJbIGPdCw" + + "5Ffl+mtNah0fHX5y6T16ajx9eYepwTHWWDH3bG768g5Tg3e+usga8kewq0+t42qJM15j+KfYs5eAF7b6URk485O7GbVEYqyBhiW/KuNf+1AzeqhejWWufIYZg2usNzP3mjmpyWeYMXjnq+/FzGMeeWLV0++4Gpjm" + + "HGjJM2fEj+bf+jx7CW6NBoTBZh/cuEgbeSI6fdCw5Ffl86+1de3UiflUnW7G7KFvbAUzB55m39Tg7nGmm7OCmQNf8Ud5I925a+9OVwOxrLkq/a95ffQJ9YxLwHCjD8poNV59x09dnkge66DNzJrMUXPO9NVAH2pn" + + "3HiHqVWOr7muvjjaX+odV+swtcpX/L0cZicn82YaMcz8q/fxW/Xqf2Re2V685n/yz7gEnxouOgztIdjjxutGqa9aXd7aupa1oE/NVacnHNvDzKkcH7PH1Rv/dntLreNqM8xY5dVnOjSf9Ds+04yBmGvN+CXx1T9n" + + "XQI2NPu4XTy1PW48Md8NaxObmbXkjDh93Edicur1k3cacS3jaivY7Ss1uUhPeWJyc/a0jI/4rJexxFVOHua6V+/+dy9+X1GU9sP8++/Dfdt+sWYXT22PG1/BLmdVY2Ryu3y3U2PWGO/8ldjs5ddY+nKRteSJyWtO" + + "F1vVaq/OT23GiWGuffXuf/fi9xWb8s8/frpr+Ky/CdrFGpGhP09w3ahaxjuuBj5iWV/XrDF91jFXTG3GiWFZd1WO/Xb7TW2PG1/BM3LYXe2T2owTw6y/ei/8bT/OE38TMGrbs+yh5sz8jHVc7VWYe3KN1Crv/JGG" + + "vmfdYaha+h2facbORvZlzxmvsc5Hq5a9a2zq178J8qPeCp+8BPRp+94WGMezLnntaUzMuFrFlZxZTVePhll39e79Pd14xdGHrvrIT73janvIXI/kZJ17s08X63LUErNH6kv8u1wChq0Hxw1UPf093sVn2iyWM3Z5" + + "K/OaI2YftRnOPnaNzXxjImvKxU6bxbr81Ga8xvC1XFOt4kpOrbn577oELLjywUc5VZ/5GZOLdQ51MeOdlvHKV3xytOyvtoKzD15jMz9jHV/VmNlcMbXKV3xysOx3Ve5/V3Luq0J55yVg2ZUPP8qp+szP2Kt5t69c" + + "M1730v4zf4+PDkDVZ37GXs3ZT67R+e655qknruRkfsvffQkYYnRA6oBd3oqWOcnr2hlb4bN6Z88+M81YxVp/5CN3uXtajad/lLOXUU2Nue/Mn2nGErvajC/zr7gEDFc/9mjgUV7Vq1/XqPH0kx+pq7nuofZTH+Vn" + + "/CifHYQuVrWZf1aMPc165Z5rXsaSr+ZlzZB/1SVgoNlhyYFHeZ2+omVO8m6mvXhX4+y1Vr3DvdwjH32U2+lVO+Lv5bLPmjPSZjqxtK5nxg/zr7wEDLv38d3QLK+LrWg1p/rdfF1Ol+fce7HMe5bPDscoVvXqM1PV" + + "9vyuZqShY7XnVb3/Xc27r5woX30JGG10sLqxZ7ld7B3ayh66Obr9PartHY5RvNPfobnPbi1jFY/k1tqp/x0uAQMeOSSz3FHsiH4k98jso77TD7QQXD0co7wj+pFcRh/l78Xqtmd9au5h/7tcAgY/ekhm+Y/ERjUj" + + "/cjMsx6HP1pTsHpIZnmj2FGd8UY1e7Fma9NeXf5h7TtdAoZ/5LDs1czir4jlR5j1z7yz+Ozw5RqzvFfEWHvWN2dL/khN1i/x73YJHPro4VnJ38t5Nv7o7NadjasHaC/v2Tj72utR9340v9Yf8r/rJWATe4dytNGV" + + "urNynplzNP+r9NWDtZJ3Vk6315XeXd3DWr0E7/7fE8wG92WsHNjss1JnDnWj/plj/y63yzM/savN+KN8df2u/5Ha1dzVvDrPo3W1z9P+d7oEboaX88gB8qXu1ZrnerP8mrtSY86o1vgr8ZG1j9Yczc/9PlObfU7h" + + "3/ESsDFf0uyAjl6AtcRX6jPfnnt1XY21I9zrOap7ZK1RL/VHez5a9+y61r8Ev+slcLO+9LMO0Gof13UOcbXe/MRRz8w5mz+75rP17uesPvY7Fb/7JXCzvsRnDiG97AN/pFfW02Nkj/Qe9er01Tm62j3tzN5n9tqb" + + "++H473IJ3KAv9YxDZi97g2f0pU/XG/272avmfFXfl7y/3+0S+BLyJZ91cOmdfV0LPHON7PsuPtrXmeu/Y40z5731+l0vwW0DG/Hlv/KgukauO+KvnCPXPDJT1p3Nv8scD+/rT7gEbr5+jHcdRtcX6xzqfwr+cfv7" + + "ky5BPWT5sb7qQtSZflc/3+Xvuofh3H/yJchNdx/x52LkG/rg3bv6iP6B7G+5BN2n6z7233YxunfQvas/WvubL0H3YfcOxe92Sfb2072Dv077uQTHPvmzh+roJXp2vWO7+8n+eQM/b+DnDfy8gZ838PMGft7Azxv4" + + "eQM/b+DnDfyFb+D/AdGPZ94O5ww1AAAAAElFTkSuQmCC"; + + byte[] bytes = Convert.FromBase64String(BASE64); + + roundBlur20 = TextureUtilities.LoadImage(193, 193, bytes); + + roundBlur20.hideFlags = HideFlags.HideAndDontSave; + + CleanupUtility.DestroyObjectOnAssemblyReload(roundBlur20); + } + + return roundBlur20; + } + } + + private static Texture2D leftToRightFade; + private static Texture2D topToBottomFade; + private static Texture2D bottomToTopFade; + private static Texture2D roundBlur6; + private static Texture2D roundBlur20; + + public static void Clear() + { + if (leftToRightFade != null) + { + UnityEngine.Object.Destroy(leftToRightFade); + } + + if (topToBottomFade != null) + { + UnityEngine.Object.Destroy(topToBottomFade); + } + + if (bottomToTopFade != null) + { + UnityEngine.Object.Destroy(bottomToTopFade); + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs.meta new file mode 100644 index 000000000..f2e2bd753 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationGUITextures.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 78842ff15d254d9b8994383880b759f1 +timeCreated: 1704903394 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs new file mode 100644 index 000000000..9958dc1b7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs @@ -0,0 +1,55 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEditor; +using UnityEngine.Localization.Metadata; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public class OdinLocalizationMetadataRegistry + { + public static readonly List AssetEntryMetadataTypes = new List(); + + public static readonly List StringEntryMetadataTypes = new List(); + + public static readonly Dictionary MetadataAllowsMultiple = new Dictionary(); + + static OdinLocalizationMetadataRegistry() + { + TypeCache.TypeCollection metadataTypes = TypeCache.GetTypesDerivedFrom(typeof(IMetadata)); + + for (var i = 0; i < metadataTypes.Count; i++) + { + Type currentType = metadataTypes[i]; + + var attr = currentType.GetCustomAttribute(); + + if (attr is null) + { + MetadataAllowsMultiple[currentType] = true; + continue; + } + + MetadataAllowsMultiple[currentType] = attr.AllowMultiple; + + MetadataType currentAllowedTypes = attr.AllowedTypes; + + if (currentAllowedTypes.HasFlag(MetadataType.StringTableEntry)) + { + StringEntryMetadataTypes.Add(currentType); + } + + if (currentAllowedTypes.HasFlag(MetadataType.AssetTableEntry)) + { + AssetEntryMetadataTypes.Add(currentType); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs.meta new file mode 100644 index 000000000..114a4e9fa --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationMetadataRegistry.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7deb6e0b5f6c4579ba2ead2af5620d3e +timeCreated: 1706509329 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs new file mode 100644 index 000000000..59f0bac5b --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs @@ -0,0 +1,43 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if SIRENIX_INTERNAL +using System.Collections; +using System.Reflection; +using Sirenix.OdinInspector.Editor.Validation; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; + +[assembly: RegisterValidator(typeof(OdinLocalizationReflectionValidator))] +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public class OdinLocalizationReflectionValidator : GlobalValidator + { + public override IEnumerable RunValidation(ValidationResult result) + { + OdinLocalizationReflectionValues.EnsureInit(); + + FieldInfo[] fields = typeof(OdinLocalizationReflectionValues).GetFields(BindingFlags.Static | BindingFlags.Public); + + for (var i = 0; i < fields.Length; i++) + { + if (fields[i].IsLiteral) + { + continue; + } + + if (fields[i].GetValue(null) != null) + { + continue; + } + + result.AddError($"[Odin Localization Module]: {fields[i].Name} was not found."); + } + + return null; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs.meta new file mode 100644 index 000000000..0932e3569 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValidator.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c12d37dc91fe4285bd661d45717bf34a +timeCreated: 1704797628 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs new file mode 100644 index 000000000..986d1d373 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs @@ -0,0 +1,174 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Reflection; +using Sirenix.Serialization; +using UnityEditor.AddressableAssets.Settings; +using UnityEditor.Localization; +using UnityEngine.Localization; +using UnityEngine.Localization.Metadata; +using UnityEngine.Localization.Tables; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationReflectionValues + { + public const string TABLE_ENTRY_DATA__METADATA__PATH = "m_Metadata"; + public const string METADATA_COLLECTION__ITEMS__PATH = "m_Items"; + public const string TABLE_ENTRY__DATA__PATH = "Data"; + + public static readonly bool HasAPIForCustomUndo = false; + + public static readonly PropertyInfo TableEntry_Data_Property; + public static readonly PropertyInfo AssetTableEntry_Data_Property; + public static readonly PropertyInfo StringTableEntry_Data_Property; + + public static readonly FieldInfo TableEntryData_m_Metadata_Field; + public static readonly FieldInfo MetadataCollection_m_Items_Field; + + public static readonly PropertyInfo LocalizationEditorSettings_Instance; + public static readonly MethodInfo LocalizationEditorSettings_GetAddressableAssetSettings; + public static readonly MethodInfo LocalizationEditorSettings_IsTableNameValid; + + public static readonly MethodInfo RaiseTableEntryModified_Method; + public static readonly MethodInfo RaiseTableEntryAdded_Method; + public static readonly MethodInfo RaiseTableEntryRemoved_Method; + public static readonly MethodInfo RaiseAssetTableEntryAdded_Method; + public static readonly MethodInfo RaiseAssetTableEntryRemoved_Method; + public static readonly MethodInfo AssetTableCollection_SetEntryAssetType_PrivateMethod; + public static readonly MethodInfo AssetTableCollection_RemoveEntryAssetType_PrivateMethod; + + public static readonly Type AddressHelper; + public static readonly MethodInfo FormatAssetLabelMethod; + public static readonly MethodInfo UpdateAssetGroupMethod; + + private const BindingFlags INSTANCE_ALL = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; + private const BindingFlags INSTANCE_NON_PUBLIC = BindingFlags.Instance | BindingFlags.NonPublic; + private const BindingFlags STATIC_NON_PUBLIC = BindingFlags.Static | BindingFlags.NonPublic; + + internal static Func LocalizationEditorSettings_GetAddressableAssetSettingsFunc; + + static OdinLocalizationReflectionValues() + { + TableEntry_Data_Property = typeof(TableEntry).GetProperty(TABLE_ENTRY__DATA__PATH, INSTANCE_ALL); + AssetTableEntry_Data_Property = typeof(AssetTableEntry).BaseType.GetProperty(TABLE_ENTRY__DATA__PATH, INSTANCE_ALL); + StringTableEntry_Data_Property = typeof(StringTableEntry).BaseType.GetProperty(TABLE_ENTRY__DATA__PATH, INSTANCE_ALL); + + Type tableEntryDataType = TwoWaySerializationBinder.Default.BindToType("UnityEngine.Localization.Tables.TableEntryData, Unity.Localization"); + + TableEntryData_m_Metadata_Field = tableEntryDataType?.GetField(TABLE_ENTRY_DATA__METADATA__PATH, INSTANCE_ALL); + MetadataCollection_m_Items_Field = typeof(MetadataCollection).GetField(METADATA_COLLECTION__ITEMS__PATH, INSTANCE_ALL); + + LocalizationEditorSettings_Instance = typeof(LocalizationEditorSettings).GetProperty("Instance", STATIC_NON_PUBLIC); + LocalizationEditorSettings_GetAddressableAssetSettings = typeof(LocalizationEditorSettings).GetMethod("GetAddressableAssetSettings", + INSTANCE_NON_PUBLIC); + LocalizationEditorSettings_IsTableNameValid = typeof(LocalizationEditorSettings).GetMethod("IsTableNameValid", INSTANCE_NON_PUBLIC); + + + RaiseTableEntryModified_Method = LocalizationEditorSettings.EditorEvents.GetType().GetMethod("RaiseTableEntryModified", INSTANCE_ALL); + RaiseTableEntryAdded_Method = LocalizationEditorSettings.EditorEvents.GetType().GetMethod("RaiseTableEntryAdded", INSTANCE_ALL); + RaiseTableEntryRemoved_Method = LocalizationEditorSettings.EditorEvents.GetType().GetMethod("RaiseTableEntryRemoved", INSTANCE_ALL); + RaiseAssetTableEntryAdded_Method = LocalizationEditorSettings.EditorEvents.GetType().GetMethod("RaiseAssetTableEntryAdded", INSTANCE_ALL); + RaiseAssetTableEntryRemoved_Method = LocalizationEditorSettings.EditorEvents.GetType().GetMethod("RaiseAssetTableEntryRemoved", INSTANCE_ALL); + AssetTableCollection_SetEntryAssetType_PrivateMethod = typeof(AssetTableCollection).GetMethod("SetEntryAssetType", INSTANCE_NON_PUBLIC); + AssetTableCollection_RemoveEntryAssetType_PrivateMethod = typeof(AssetTableCollection).GetMethod("RemoveEntryAssetType", INSTANCE_NON_PUBLIC); + + if (LocalizationEditorSettings_Instance != null && LocalizationEditorSettings_GetAddressableAssetSettings != null) + { + LocalizationEditorSettings_GetAddressableAssetSettingsFunc = + (Func) Delegate.CreateDelegate(typeof(Func), + LocalizationEditorSettings_Instance.GetValue(null), + LocalizationEditorSettings_GetAddressableAssetSettings); + } + + AddressHelper = TwoWaySerializationBinder.Default.BindToType("UnityEngine.Localization.AddressHelper"); + + FormatAssetLabelMethod = AddressHelper?.GetMethod("FormatAssetLabel", + BindingFlags.Static | BindingFlags.Public, + null, + new[] {typeof(LocaleIdentifier)}, + null); + + UpdateAssetGroupMethod = typeof(AssetTableCollection).GetMethod("UpdateAssetGroup", + BindingFlags.Instance | BindingFlags.NonPublic, + null, + new[] + { + typeof(AddressableAssetSettings), + typeof(AddressableAssetEntry), + typeof(bool) + }, + null); + + HasAPIForCustomUndo = AddressHelper != null && + FormatAssetLabelMethod != null && + UpdateAssetGroupMethod != null && + LocalizationEditorSettings_GetAddressableAssetSettingsFunc != null; + } + + public static Action Create_RaiseTableEntryModified_Method_Delegate(LocalizationEditorEvents events) + { + return (Action) Delegate.CreateDelegate(typeof(Action), + events, + RaiseTableEntryModified_Method); + } + + public static Action Create_RaiseTableEntryAdded_Method_Delegate( + LocalizationEditorEvents events) + { + return (Action) + Delegate.CreateDelegate(typeof(Action), + events, + RaiseTableEntryAdded_Method); + } + + public static Action Create_RaiseTableEntryRemoved_Method_Delegate( + LocalizationEditorEvents events) + { + return (Action) + Delegate.CreateDelegate(typeof(Action), + events, + RaiseTableEntryRemoved_Method); + } + + public static Action Create_AssetTableEntryAdded_Method_Delegate( + LocalizationEditorEvents events) + { + return (Action) + Delegate.CreateDelegate(typeof(Action), + events, + RaiseAssetTableEntryAdded_Method); + } + + public static Action Create_AssetTableEntryRemoved_Method_Delegate( + LocalizationEditorEvents events) + { + return (Action) + Delegate.CreateDelegate(typeof(Action), + events, + RaiseAssetTableEntryRemoved_Method); + } + + public static Action Create_AssetTableCollection_SetEntryAssetType_PrivateMethod_Delegate(AssetTableCollection collection) + { + return (Action) Delegate.CreateDelegate(typeof(Action), + collection, + AssetTableCollection_SetEntryAssetType_PrivateMethod); + } + + public static Action Create_AssetTableCollection_RemoveEntryAssetType_PrivateMethod_Delegate(AssetTableCollection collection) + { + return (Action) Delegate.CreateDelegate(typeof(Action), + collection, + AssetTableCollection_RemoveEntryAssetType_PrivateMethod); + } + +#if SIRENIX_INTERNAL + public static void EnsureInit() { } +#endif + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs.meta new file mode 100644 index 000000000..c7bebc9e0 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationReflectionValues.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b54903c48e344164a8ef89c56ba21f22 +timeCreated: 1704797678 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs new file mode 100644 index 000000000..1ad1d258c --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs @@ -0,0 +1,223 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Text; +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; +using Sirenix.Utilities; +using UnityEditor; +using UnityEngine; +using UnityEngine.Localization.SmartFormat; +using UnityEngine.Localization.SmartFormat.Core.Parsing; +using UnityEngine.Localization.SmartFormat.Core.Settings; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor.Internal +{ + public static class OdinLocalizationSyntaxHighlighter + { + private const string END_RICH_COLOR = ""; + + private static readonly SmartFormatter Formatter; + + private static readonly StringBuilder Buffer; + + // TODO: if this works nicely, maybe implement a custom solution that doesn't rely on SmartFormatter + + static OdinLocalizationSyntaxHighlighter() + { + Formatter = Smart.CreateDefaultSmartFormat(); + Formatter.Settings.ParseErrorAction = ErrorAction.MaintainTokens; + Formatter.Settings.FormatErrorAction = ErrorAction.MaintainTokens; + + Buffer = new StringBuilder(); + } + + public static string HighlightAsRichText(string source) + { + Format format; + + try + { + format = Formatter.Parser.ParseFormat(source, Formatter.GetNotEmptyFormatterExtensionNames()); + } + catch (Exception) + { + return source; + } + + Buffer.Clear(); + + int expectedSize = source.Length; + AppendToBuffer(format, source, ref expectedSize); + + // NOTE: we fallback to source in-case any obvious discrepancies are happening. + return Buffer.Length != expectedSize ? source : Buffer.ToString(); + } + + public static string GetErrorMessage(string source, out bool foundError, out Exception exception) + { + Formatter.Settings.ParseErrorAction = ErrorAction.OutputErrorInResult; + Formatter.Settings.FormatErrorAction = ErrorAction.OutputErrorInResult; + + Format format; + + try + { + format = Formatter.Parser.ParseFormat(source, Formatter.GetNotEmptyFormatterExtensionNames()); + } + catch (Exception e) + { + foundError = true; + + exception = e; + + Debug.LogException(e); + + return $"Unity Formatter threw {ObjectNames.NicifyVariableName(e.GetType().GetNiceName())}: '{e.Message}'\nCheck the console for more information."; + } + + exception = null; + + Buffer.Clear(); + + int expectedSize = source.Length; + AppendToBuffer(format, source, ref expectedSize); + + foundError = expectedSize != Buffer.Length; + + Formatter.Settings.ParseErrorAction = ErrorAction.MaintainTokens; + Formatter.Settings.FormatErrorAction = ErrorAction.MaintainTokens; + + return Buffer.ToString(); + } + + private static void AppendColorAsRichTag(Color color, ref int expectedSize) + { + var color32 = (Color32) color; + + var richTag = $""; + expectedSize += richTag.Length; + + Buffer.Append(richTag); + } + + private static bool IsLastBufferEqual(string expected) + { + if (expected.Length > Buffer.Length) + { + return false; + } + + int bufferIndex = Buffer.Length - 1; + + for (int i1 = expected.Length - 1; i1 >= 0; i1--, bufferIndex--) + { + if (Buffer[bufferIndex] != expected[i1]) + { + return false; + } + } + + return true; + } + + private static void AppendToBuffer(Format format, string source, ref int expectedSize) + { + for (var i = 0; i < format.Items.Count; i++) + { + if (Buffer.Length == source.Length) + { + break; + } + + FormatItem item = format.Items[i]; + + if (!(item is Placeholder placeholder)) + { + Buffer.Append(item.RawText); + continue; + } + + AppendColorAsRichTag(OdinLocalizationConfig.Instance.placeholderColor, ref expectedSize); + + Buffer.Append('{'); + + for (var j = 0; j < placeholder.Selectors.Count; j++) + { + Selector selector = placeholder.Selectors[j]; + + AppendColorAsRichTag(OdinLocalizationConfig.Instance.selectorColor, ref expectedSize); + + string op = selector.Operator; + + if (!string.IsNullOrEmpty(op)) + { + Buffer.Append(selector.Operator); + } + + Buffer.Append(selector.RawText); + + Buffer.Append(END_RICH_COLOR); + expectedSize += END_RICH_COLOR.Length; + } + + if (placeholder.Alignment != 0) + { + Buffer.Append(','); + + Buffer.Append(placeholder.Alignment); + } + + if (!string.IsNullOrEmpty(placeholder.FormatterName)) + { + Buffer.Append(':'); + + AppendColorAsRichTag(OdinLocalizationConfig.Instance.formatterColor, ref expectedSize); + + Buffer.Append(placeholder.FormatterName); + + if (!string.IsNullOrEmpty(placeholder.FormatterOptions)) + { + Buffer.Append('('); + Buffer.Append(placeholder.FormatterOptions); + Buffer.Append(')'); + } + + Buffer.Append(END_RICH_COLOR); + expectedSize += END_RICH_COLOR.Length; + } + + if (placeholder.Format != null) + { + Format nextFormat = placeholder.Format; + + bool showColon; + + if (nextFormat.startIndex > 0) + { + showColon = nextFormat.baseString[nextFormat.startIndex - 1] == ':'; + } + else + { + showColon = true; + } + + if (showColon) + { + Buffer.Append(':'); + } + + AppendToBuffer(nextFormat, source, ref expectedSize); + } + + Buffer.Append('}'); + + Buffer.Append(END_RICH_COLOR); + expectedSize += END_RICH_COLOR.Length; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs.meta new file mode 100644 index 000000000..974f63e40 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Internal/OdinLocalizationSyntaxHighlighter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: edfba57bc4284142a39f658cc44f70c6 +timeCreated: 1704797761 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs new file mode 100644 index 000000000..8c162eb6f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs @@ -0,0 +1,39 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +#if UNITY_EDITOR + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + using UnityEngine.Localization; + using Sirenix.OdinInspector.Editor; + using System; + using Sirenix.Utilities.Editor; + + public class LocalizedReferenceResolver : OdinPropertyResolver + { + public override int ChildNameToIndex(string name) + { + throw new NotSupportedException(); + } + + public override int ChildNameToIndex(ref StringSlice name) + { + throw new NotSupportedException(); + } + + public override InspectorPropertyInfo GetChildInfo(int childIndex) + { + throw new NotSupportedException(); + } + + protected override int GetChildCount(LocalizedReference value) + { + return 0; + } + } +} +#endif \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs.meta new file mode 100644 index 000000000..fb8dd64cf --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/LocalizationSupport.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46db7b2a049564544ad19a2e480a1333 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs new file mode 100644 index 000000000..c3af5f79f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs @@ -0,0 +1,25 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public static class OdinLocalizationConstants + { + public static int AssetPreviewRowHeight => OdinLocalizationConfig.Instance.assetRowHeight; + public const int DEFAULT_COLUMN_WIDTH = 300; + public const int MIN_COLUMN_WIDTH = 200; + public const int COLUMN_HEIGHT = 38; + public const int ROW_MENU_WIDTH = 28; + public const int ROW_HEIGHT = 30; + public const int EMPTY_ASSET_ROW_HEIGHT = ROW_HEIGHT; //96; + public const int ASSET_ROW_HEIGHT = 104; //96; + public const int ENTRY_PADDING = 4; + public const int TOOLBAR_HEIGHT = 28; + public const int DRAG_HANDLE_WIDTH = 27; + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs.meta new file mode 100644 index 000000000..8f9327770 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/OdinLocalizationConstants.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cd2728f4c9e842db8d6b5e8c18cce611 +timeCreated: 1706411619 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef new file mode 100644 index 000000000..65e228403 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef @@ -0,0 +1,29 @@ +{ + "name": "Sirenix.OdinInspector.Modules.UnityLocalization.Editor", + "references": [ + "Unity.Localization", + "Sirenix.Serialization", + "Sirenix.OdinInspector.Attributes", + "Sirenix.OdinInspector.Editor", + "Sirenix.Utilities.Editor", + "Unity.Localization.Editor", + "Sirenix.Utilities", + "Unity.Addressables.Editor" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": true, + "overrideReferences": false, + "precompiledReferences": [ + "Sirenix.Serialization.dll", + "Sirenix.OdinInspector.Attributes.dll", + "Sirenix.OdinInspector.Editor.dll", + "Sirenix.Utilities.Editor.dll" + ], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef.meta new file mode 100644 index 000000000..dd01fd365 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3656feb4b010c5941972fb7b3b9eec3e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows.meta new file mode 100644 index 000000000..810986a66 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 835e118525d8475f939f4105af066578 +timeCreated: 1704796852 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs new file mode 100644 index 000000000..2aa15ba2d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs @@ -0,0 +1,663 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using Sirenix.OdinInspector.Editor; +using Sirenix.OdinInspector.Editor.Internal; +using Sirenix.OdinInspector.Modules.Localization.Editor.Configs; +using Sirenix.OdinInspector.Modules.Localization.Editor.Internal; +using Sirenix.Serialization; +using Sirenix.Utilities; +using Sirenix.Utilities.Editor; +using UnityEditor; +using UnityEditor.Localization; +using UnityEngine; +using UnityEngine.Localization; + +namespace Sirenix.OdinInspector.Modules.Localization.Editor +{ + public class OdinLocalizationCreateTableMenu + { + [Serializable] + public class LocaleItem + { + [HideInInspector] + public Locale Locale; + + [HideLabel] + public bool Enabled; + } + + public enum TableCollectionType + { + StringTableCollection, + AssetTableCollection + } + + private string FolderPath => string.IsNullOrEmpty(this.Folder) ? "Assets" : $"Assets/{this.Folder}"; + + [ValidateInput(nameof(ValidateName), "@this." + nameof(nameErrorMessage))] + [VerticalGroup("Split/Left")] + [PropertySpace(SpaceAfter = 2, SpaceBefore = 2)] + public string Name; + + [EnableIf("@this." + nameof(EnableFolder))] + [InfoBox("The directory is not found, this will create a new directory on creation.", visibleIfMemberName: nameof(ShowFolderInfoBox))] + [HorizontalGroup("Split")] + [VerticalGroup("Split/Left")] + [FolderPath(ParentFolder = "Assets")] + public string Folder; + + [VerticalGroup("Split/Left")] + [PropertySpace(SpaceAfter = 2, SpaceBefore = 2)] + [HideLabel] + [EnumToggleButtons] + public TableCollectionType Type; + + [EnableIf(nameof(EnableCreateIf))] + [VerticalGroup("Split/Left")] + [PropertySpace(SpaceBefore = 4)] + [Button(ButtonSizes.Large)] + public void Create() + { + var localizationWindow = EditorWindow.focusedWindow as OdinLocalizationEditorWindow; + + if (!this.HasAnyLocaleSelected()) + { + if (localizationWindow) + { + localizationWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.ExclamationOctagonFill, + "At least 1 Locale must be selected.", + new Color(0.68f, 0.2f, 0.2f), + 5.0f); + } + + return; + } + + if (!Directory.Exists(this.FolderPath)) + { + Directory.CreateDirectory(this.FolderPath); + } + + var collectionLocales = new List(this.Locales.Count); + + foreach (LocaleItem localeItem in this.Locales) + { + if (localeItem.Enabled) + { + collectionLocales.Add(localeItem.Locale); + } + } + + switch (this.Type) + { + case TableCollectionType.StringTableCollection: + LocalizationEditorSettings.CreateStringTableCollection(this.Name, this.FolderPath, collectionLocales); + break; + + case TableCollectionType.AssetTableCollection: + LocalizationEditorSettings.CreateAssetTableCollection(this.Name, this.FolderPath, collectionLocales); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + if (localizationWindow) + { + string typeNiceName; + + switch (this.Type) + { + case TableCollectionType.StringTableCollection: + typeNiceName = "String Table Collection"; + break; + + case TableCollectionType.AssetTableCollection: + typeNiceName = "Asset Table Collection"; + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + localizationWindow.ShowToast(ToastPosition.BottomLeft, + SdfIconType.Check2, + $"{typeNiceName} '{this.Name}' created at: {this.FolderPath}.", + new Color(0.29f, 0.57f, 0.42f), + 16.0f); + } + } + + [HorizontalGroup("Split")] + [VerticalGroup("Split/Right")] + [InlineProperty] + [ListDrawerSettings(ListElementLabelName = "@this.Locale.LocaleName", + HideAddButton = true, + HideRemoveButton = true, + DefaultExpandedState = true, + ShowFoldout = false, + ShowItemCount = false, + DraggableItems = false)] + public List Locales = new List(); + + [HorizontalGroup("Split/Right/Split")] + [Button] + public void LocaleGenerator() + { + try + { + TwoWaySerializationBinder.Default.BindToType("UnityEditor.Localization.UI.LocaleGeneratorWindow, Unity.Localization.Editor") + .GetMethod("ShowWindow", BindingFlags.Static | BindingFlags.Public) + .Invoke(null, null); + } + catch (NullReferenceException nullReferenceException) + { + Debug.LogError($"[Odin]: Failed to find LocaleGeneratorWindow.ShowWindow.\n{nullReferenceException.Message}"); + } + } + + [HorizontalGroup("Split/Right/Split")] + [Button] + public void SelectNone() + { + for (var i = 0; i < this.Locales.Count; i++) + { + this.Locales[i].Enabled = false; + } + } + + [HorizontalGroup("Split/Right/Split")] + [Button] + public void SelectAll() + { + for (var i = 0; i < this.Locales.Count; i++) + { + this.Locales[i].Enabled = true; + } + } + + [HideInInspector] + internal bool EnableFolder = true; + + private string nameErrorMessage = string.Empty; + + private bool ValidateName(string name) + { + if (string.IsNullOrEmpty(name)) + { + this.nameErrorMessage = $"{nameof(this.Name)} can't be empty."; + return false; + } + + Type collectionType; + + switch (this.Type) + { + case TableCollectionType.StringTableCollection: + collectionType = typeof(StringTableCollection); + break; + + case TableCollectionType.AssetTableCollection: + collectionType = typeof(AssetTableCollection); + break; + + default: + throw new ArgumentOutOfRangeException(); + } + + bool isTableNameValid = OdinLocalizationEditorSettings.IsTableNameValid(collectionType, name, out string localizationErrorMsg); + + if (isTableNameValid) + { + return true; + } + + this.nameErrorMessage = localizationErrorMsg; + + return false; + } + + private bool ShowFolderInfoBox() + { + if (string.IsNullOrEmpty(this.Folder)) + { + return false; + } + + return !Directory.Exists(this.FolderPath); + } + + private bool EnableCreateIf() => this.Locales.Count > 0 && this.ValidateName(this.Name); + + private bool HasAnyLocaleSelected() + { + for (var i = 0; i < this.Locales.Count; i++) + { + if (this.Locales[i].Enabled) + { + return true; + } + } + + return false; + } + } + + public class OdinLocalizationEditorWindow : OdinMenuEditorWindow, IDisposable + { + public enum RightMenuTopTabs + { + [LabelText(SdfIconType.Braces)] + Metadata, + + [LabelText(SdfIconType.GearFill)] + Settings + } + + public enum RightMenuBottomTabs + { + [LabelText(SdfIconType.FlagFill)] + Locale, + +#if false + [LabelText(SdfIconType.BorderWidth)] + Template, +#endif + + [LabelText(SdfIconType.GearFill)] + Settings + } + + public class WindowState : IDisposable + { + public static string EditorPrefsKey = "OdinLocalizationEditorWindow_EditorPrefs"; + + public RightMenuTopTabs CurrentTopTab; + public RightMenuBottomTabs CurrentBottomTab; + public PropertyTree MetadataTree = null; + public bool ShowSharedMetadata = true; + + public float LeftMenuWidth; + public float RightMenuWidth; + public float RightMenuTopPanelHeight; + public float LastOpenRightMenuWidth; + + public void Save() + { + EditorPrefs.SetFloat($"{EditorPrefsKey}_LeftMenuWidth", this.LeftMenuWidth); + EditorPrefs.SetFloat($"{EditorPrefsKey}_RightMenuWidth", this.RightMenuWidth); + EditorPrefs.SetFloat($"{EditorPrefsKey}_RightMenuTopHeight", this.RightMenuTopPanelHeight); + EditorPrefs.SetFloat($"{EditorPrefsKey}_LastOpenRightMenuWidth", this.LastOpenRightMenuWidth); + } + + public void Load() + { + this.LeftMenuWidth = EditorPrefs.GetFloat($"{EditorPrefsKey}_LeftMenuWidth", 300); + this.RightMenuWidth = EditorPrefs.GetFloat($"{EditorPrefsKey}_RightMenuWidth", 300); + this.RightMenuTopPanelHeight = EditorPrefs.GetFloat($"{EditorPrefsKey}_RightMenuTopHeight"); + this.LastOpenRightMenuWidth = EditorPrefs.GetFloat($"{EditorPrefsKey}_LastOpenRightMenuWidth"); + } + + public void Dispose() + { + this.MetadataTree?.Dispose(); + this.MetadataTree = null; + } + } + + [MenuItem("Tools/Odin/Localization Editor", priority = 10_100)] + public static void OpenFromMenu() + { + var wnd = GetWindow(); + wnd.MenuWidth = 300.0f; + } + + public WindowState State; + + private object lastSelection; + + protected override void Initialize() + { + this.State = new WindowState(); + this.State.Load(); + } + + protected override void OnDestroy() + { + base.OnDestroy(); + + this.DisposeActiveCollection(); + this.State.Dispose(); + } + + protected override void OnDisable() + { + base.OnDisable(); + this.State.Save(); + + this.DisposeActiveCollection(); + this.State.Dispose(); + } + + protected override void OnImGUI() + { + if (LocalizationEditorSettings.ActiveLocalizationSettings == null) + { + Rect popupPosition = this.position.SetPosition(Vector2.zero).AlignCenter(360, 160); + + if (EditorGUIUtility.isProSkin) + { + //OdinLocalizationGUI.DrawRoundGlowRect(popupPosition.Expand(54), FancyColor.CreateHex(0x323232)); + OdinLocalizationGUI.DrawRoundBlur6(popupPosition, new Color(0, 0, 0, 0.025f)); + SirenixEditorGUI.DrawRoundRect(popupPosition, FancyColor.CreateHex(0x383838), 5.0f); + } + else + { + OdinLocalizationGUI.DrawRoundBlur6(popupPosition, new Color(0, 0, 0, 0.02f)); + SirenixEditorGUI.DrawRoundRect(popupPosition, new FancyColor(0.84f), 5.0f); //, new Color(0, 0, 0, 0.2f), 1); + + SirenixEditorGUI.DrawRoundRect(popupPosition.AlignBottom(32 + 12 + 8 + 6), new Color(1, 1, 1, 0.2f), 0.0f, 0.0f, 5.0f, 5.0f); + } + + popupPosition = popupPosition.Padding(12); + + Rect buttonsArea = popupPosition.TakeFromBottom(32); + + popupPosition.height -= 16; + + GUIStyle labelStyle = EditorGUIUtility.isProSkin ? SirenixGUIStyles.WhiteLabelCentered : SirenixGUIStyles.BlackLabelCentered; + + if (EditorGUIUtility.isProSkin) + { + GUI.Label(popupPosition, "No Localization Settings found in project.", labelStyle); + } + else + { + GUIHelper.PushColor(new Color(1, 1, 1, 0.75f)); + GUI.Label(popupPosition, "No Localization Settings found in project.", SirenixGUIStyles.BlackLabelCentered); + } + + if (OdinLocalizationGUI.OverlaidButton(buttonsArea.AlignCenter(120), "Create", labelStyle: labelStyle, invert: true)) + { + if (OdinLocalizationEditorSettings.CreateDefaultLocalizationSettingsAsset()) + { + this.ShowToast(ToastPosition.BottomLeft, + SdfIconType.GearWide, + "Default Localization Settings created.", + new Color(0.13f, 0.26f, 0.39f), + 8.0f); + } + } + + if (!EditorGUIUtility.isProSkin) + { + GUIHelper.PopColor(); + } + + this.Repaint(); + return; + } + + base.OnImGUI(); + } + + protected override OdinMenuTree BuildMenuTree() + { + var tree = new OdinMenuTree + { + Config = + { + AutoHandleKeyboardNavigation = false, + DrawSearchToolbar = true + }, + DefaultMenuStyle = + { + Height = 28, + AlignTriangleLeft = true, + TrianglePadding = 0.0f + } + }; + + this.MenuBackgroundColor = OdinLocalizationGUI.MenuBackground; + + if (LocalizationEditorSettings.ActiveLocalizationSettings == null) + { + return tree; + } + + var createMenu = new OdinLocalizationCreateTableMenu(); + + tree.Add("Create Table", createMenu, SdfIconType.Plus); + tree.Add("User Config", OdinLocalizationConfig.Instance, SdfIconType.GearFill); + +#if true + tree.Selection.SelectionChanged += type => + { + switch (type) + { + case SelectionChangedType.ItemAdded: + if (this.lastSelection != null) + { + switch (this.lastSelection) + { + case OdinAssetTableCollectionEditor assetCollection: + { + assetCollection.DetachEvents(); + break; + } + + case OdinStringTableCollectionEditor stringCollection: + { + stringCollection.DetachEvents(); + break; + } + } + + this.State.MetadataTree?.Dispose(); + this.State.MetadataTree = null; + } + + switch (tree.Selection.SelectedValue) + { + case OdinAssetTableCollectionEditor assetCollection: + { + assetCollection.OnSelectInWindow(); + + if (assetCollection.SelectionType == OdinTableSelectionType.TableEntry && this.State.CurrentTopTab == RightMenuTopTabs.Metadata) + { + assetCollection.UpdateMetadataViewForEntry(assetCollection.CurrentSelectedEntry); + } + + break; + } + + case OdinStringTableCollectionEditor stringCollection: + { + stringCollection.OnSelectInWindow(); + + if (stringCollection.SelectionType == OdinTableSelectionType.TableEntry && this.State.CurrentTopTab == RightMenuTopTabs.Metadata) + { + stringCollection.UpdateMetadataViewForEntry(stringCollection.CurrentSelectedEntry); + } + + break; + } + + case OdinLocalizationCreateTableMenu createTableMenu: + createTableMenu.Locales.Clear(); + + foreach (Locale locale in LocalizationEditorSettings.GetLocales()) + { + createTableMenu.Locales.Add(new OdinLocalizationCreateTableMenu.LocaleItem {Locale = locale, Enabled = true}); + } + + break; + } + + this.lastSelection = this.MenuTree.Selection.SelectedValue; + + break; + } + }; +#endif + + string[] collectionGUIDs = AssetDatabase.FindAssets($"t:{nameof(LocalizationTableCollection)}"); + + for (var i = 0; i < collectionGUIDs.Length; i++) + { + string assetPath = AssetDatabase.GUIDToAssetPath(collectionGUIDs[i]); + + var collection = AssetDatabase.LoadAssetAtPath(assetPath); + + AssetTableCollection assetTableCollection = LocalizationEditorSettings.GetAssetTableCollection(collection.TableCollectionNameReference); + + if (assetTableCollection != null) + { + var guiCollection = new OdinAssetTableCollectionEditor(assetTableCollection, this, this.State); + + assetPath = assetPath.Replace(".asset", string.Empty); + + if (assetPath.StartsWith("Assets/")) + { + assetPath = assetPath.Remove(0, "Assets/".Length); + } + + tree.Add(assetPath, guiCollection, SdfIconType.Table); + + continue; + } + + StringTableCollection stringTableCollection = LocalizationEditorSettings.GetStringTableCollection(collection.TableCollectionNameReference); + + if (stringTableCollection != null) + { + var guiCollection = new OdinStringTableCollectionEditor(stringTableCollection, this, this.State); + + assetPath = assetPath.Replace(".asset", string.Empty); + + if (assetPath.StartsWith("Assets/")) + { + assetPath = assetPath.Remove(0, "Assets/".Length); + } + + tree.Add(assetPath, guiCollection, SdfIconType.LayoutTextWindow); + + continue; + } + } + + foreach (OdinMenuItem treeMenuItem in tree.EnumerateTree()) + { + if (treeMenuItem.Value != null) + { + if (treeMenuItem.Value is OdinAssetTableCollectionEditor assetEditor) + { + treeMenuItem.Name = assetEditor.Collection.SharedData.TableCollectionName; + + assetEditor.MenuItem = treeMenuItem; + + treeMenuItem.OnDrawItem += item => + { + if (Event.current.OnMouseDown(item.Rect, 0, false)) + { + if (Event.current.clickCount > 1) + { + EditorGUIUtility.PingObject(assetEditor.Collection); + } + } + }; + + continue; + } + + if (treeMenuItem.Value is OdinStringTableCollectionEditor stringEditor) + { + treeMenuItem.Name = stringEditor.Collection.SharedData.TableCollectionName; + + stringEditor.MenuItem = treeMenuItem; + + treeMenuItem.OnDrawItem += item => + { + if (Event.current.OnMouseDown(item.Rect, 0, false)) + { + if (Event.current.clickCount > 1) + { + EditorGUIUtility.PingObject(stringEditor.Collection); + } + } + }; + + continue; + } + + continue; + } + + treeMenuItem.Value = createMenu; + + treeMenuItem.SdfIcon = SdfIconType.FolderFill; + + treeMenuItem.OnDrawItem += item => + { + Rect addTableRect = item.Rect.AlignRight(20).SubX(14); + + bool isMouseOver = Event.current.IsMouseOver(addTableRect); + + if (EditorGUIUtility.isProSkin) + { + SdfIcons.DrawIcon(addTableRect.AlignCenter(16, 16), + SdfIconType.Plus, + isMouseOver ? new Color(1, 1, 1, 0.8f) : new Color(1, 1, 1, 0.4f)); + } + else + { + SdfIcons.DrawIcon(addTableRect.AlignCenter(16, 16), + SdfIconType.Plus, + isMouseOver ? new Color(0, 0, 0, 0.8f) : new Color(0, 0, 0, 0.4f)); + } + + if (Event.current.OnMouseDown(item.Rect, 0, false)) + { + createMenu.Folder = treeMenuItem.GetFullPath(); + } + }; + } + + return tree; + } + + public void Dispose() + { + this.DisposeActiveCollection(); + this.State.Dispose(); + } + + private void DisposeActiveCollection() + { + if (this.MenuTree == null) + { + return; + } + + switch (this.MenuTree.Selection.SelectedValue) + { + case OdinAssetTableCollectionEditor assetCollection: + assetCollection.DetachEvents(); + break; + + case OdinStringTableCollectionEditor stringCollection: + stringCollection.DetachEvents(); + break; + } + } + } +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs.meta new file mode 100644 index 000000000..7b3b5d7f1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Editor/Windows/OdinLocalizationEditorWindow.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a7cd6c96ce4b4c2c98fae9f89eedc690 +timeCreated: 1704796865 \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime.meta new file mode 100644 index 000000000..817d6c13f --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b2477452e56429547b05666cbaaf3502 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs new file mode 100644 index 000000000..ce758dfe1 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------- +// +// Copyright (c) Sirenix ApS. All rights reserved. +// +//----------------------------------------------------------------------- + +using Sirenix.Serialization; +using System.Reflection; +using UnityEngine.Localization; +using System; + +#if !ODIN_INSPECTOR_EDITOR_ONLY +[assembly: RegisterFormatter(typeof(Sirenix.OdinInspector.Modules.Localization.LocalizedStringFormatter))] +#endif + +namespace Sirenix.OdinInspector.Modules.Localization +{ + #if !ODIN_INSPECTOR_EDITOR_ONLY + public class LocalizedStringFormatter : ReflectionOrEmittedBaseFormatter + { + private static readonly FieldInfo m_LocalVariables_Field; + + static LocalizedStringFormatter() + { + m_LocalVariables_Field = typeof(LocalizedString).GetField("m_LocalVariables", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); + + if (m_LocalVariables_Field == null) + { + DefaultLoggers.DefaultLogger.LogError("Could not find field 'UnityEngine.LocalizedString.m_LocalVariables'" + + " - the internals of the Localization package have changed, and deserialization of Odin-serialized" + + " LocalizedString instances may be broken in some cases."); + } + } + + protected override LocalizedString GetUninitializedObject() + { + return new LocalizedString(); + } + + protected override void DeserializeImplementation(ref LocalizedString value, IDataReader reader) + { + base.DeserializeImplementation(ref value, reader); + + if (m_LocalVariables_Field != null && value != null) + { + var localVariablesList = m_LocalVariables_Field.GetValue(value); + + // This list is not allowed to be null! + if (localVariablesList == null) + { + localVariablesList = Activator.CreateInstance(m_LocalVariables_Field.FieldType); + m_LocalVariables_Field.SetValue(value, localVariablesList); + } + } + } + } + #endif +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs.meta new file mode 100644 index 000000000..ed19e43c4 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/LocalizedStringFormatter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93ff93294e9339b40b68190c779d0009 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef new file mode 100644 index 000000000..95d7475f6 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef @@ -0,0 +1,11 @@ +{ + "name": "Sirenix.OdinInspector.Modules.UnityLocalization", + "references": [ "Unity.Localization", "Sirenix.Serialization", "Sirenix.Serialization.Config" ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": true, + "autoReferenced": true, + "overrideReferences": false, + "precompiledReferences": [ "Sirenix.Serialization.dll", "Sirenix.Serialization.Config.dll" ], + "defineConstraints": [ "!ODIN_INSPECTOR_EDITOR_ONLY" ] +} \ No newline at end of file diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef.meta new file mode 100644 index 000000000..6317b65b7 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 09320d9ddd505f84d9a6e5203cf75192 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt new file mode 100644 index 000000000..4c63d536d --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt @@ -0,0 +1,62 @@ +ManifestVersion: 1 +ModuleID: Unity.Localization +ModuleVersion: 2.0.0.5 +ModuleFiles: + Editor.meta + Runtime.meta + Editor/Configs.meta + Editor/GUI.meta + Editor/Internal.meta + Editor/LocalizationSupport.cs + Editor/LocalizationSupport.cs.meta + Editor/OdinLocalizationConstants.cs + Editor/OdinLocalizationConstants.cs.meta + Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef + Editor/Sirenix.OdinInspector.Modules.UnityLocalization.Editor.asmdef.meta + Editor/Windows.meta + Editor/Configs/OdinLocalizationConfig.asset + Editor/Configs/OdinLocalizationConfig.asset.meta + Editor/Configs/OdinLocalizationConfig.cs + Editor/Configs/OdinLocalizationConfig.cs.meta + Editor/GUI/LocalizationMetadata.cs + Editor/GUI/LocalizationMetadata.cs.meta + Editor/GUI/OdinAssetTableCollectionEditor.cs + Editor/GUI/OdinAssetTableCollectionEditor.cs.meta + Editor/GUI/OdinGUITable.cs + Editor/GUI/OdinGUITable.cs.meta + Editor/GUI/OdinGUITableCollection.cs + Editor/GUI/OdinGUITableCollection.cs.meta + Editor/GUI/OdinSharedEntryCollection.cs + Editor/GUI/OdinSharedEntryCollection.cs.meta + Editor/GUI/OdinStringTableCollectionEditor.cs + Editor/GUI/OdinStringTableCollectionEditor.cs.meta + Editor/GUI/OdinTableCollectionEditor.cs + Editor/GUI/OdinTableCollectionEditor.cs.meta + Editor/GUI/OdinTemplateMetadata.cs + Editor/GUI/OdinTemplateMetadata.cs.meta + Editor/GUI/Toggle.cs + Editor/GUI/Toggle.cs.meta + Editor/Internal/OdinLocalizationAssetCache.cs + Editor/Internal/OdinLocalizationAssetCache.cs.meta + Editor/Internal/OdinLocalizationEditorSettings.cs + Editor/Internal/OdinLocalizationEditorSettings.cs.meta + Editor/Internal/OdinLocalizationEvents.cs + Editor/Internal/OdinLocalizationEvents.cs.meta + Editor/Internal/OdinLocalizationGUI.cs + Editor/Internal/OdinLocalizationGUI.cs.meta + Editor/Internal/OdinLocalizationGUITextures.cs + Editor/Internal/OdinLocalizationGUITextures.cs.meta + Editor/Internal/OdinLocalizationMetadataRegistry.cs + Editor/Internal/OdinLocalizationMetadataRegistry.cs.meta + Editor/Internal/OdinLocalizationReflectionValidator.cs + Editor/Internal/OdinLocalizationReflectionValidator.cs.meta + Editor/Internal/OdinLocalizationReflectionValues.cs + Editor/Internal/OdinLocalizationReflectionValues.cs.meta + Editor/Internal/OdinLocalizationSyntaxHighlighter.cs + Editor/Internal/OdinLocalizationSyntaxHighlighter.cs.meta + Editor/Windows/OdinLocalizationEditorWindow.cs + Editor/Windows/OdinLocalizationEditorWindow.cs.meta + Runtime/LocalizedStringFormatter.cs + Runtime/LocalizedStringFormatter.cs.meta + Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef + Runtime/Sirenix.OdinInspector.Modules.UnityLocalization.asmdef.meta diff --git a/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt.meta b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt.meta new file mode 100644 index 000000000..28a327774 --- /dev/null +++ b/Assets/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization/manifest.txt.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6dd57bba224954bb890cd5ccb1aa3747 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/PlayerWithUI.prefab b/Assets/Prefabs/PlayerWithUI.prefab index dc2231b72..addf3a450 100644 --- a/Assets/Prefabs/PlayerWithUI.prefab +++ b/Assets/Prefabs/PlayerWithUI.prefab @@ -18612,6 +18612,11 @@ PrefabInstance: propertyPath: m_LocalScale.z value: 0.20251133 objectReference: {fileID: 0} + - target: {fileID: 9202663234309573794, guid: 60b79e23a507e0c48a94b7e3d5138383, + type: 3} + propertyPath: barkUISettings.barkUI + value: + objectReference: {fileID: 4980068177928702523} - target: {fileID: 9202663234928613424, guid: 60b79e23a507e0c48a94b7e3d5138383, type: 3} propertyPath: m_LocalScale.x @@ -27087,6 +27092,18 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 7688096691329566824} m_PrefabAsset: {fileID: 0} +--- !u!114 &4980068177928702523 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 3435501778339414611, guid: 38ca8b4bc26702b40a70a342950990ee, + type: 3} + m_PrefabInstance: {fileID: 7688096691329566824} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3806889719029695535} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: be243386c8ab69d48815d16e0371c557, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &4980068177985324554 stripped GameObject: m_CorrespondingSourceObject: {fileID: 3435501778278600290, guid: 38ca8b4bc26702b40a70a342950990ee, diff --git a/Assets/Scenes/Marcin/DebugScene.unity b/Assets/Scenes/Marcin/DebugScene.unity index fe96eea2c..566bd49cc 100644 --- a/Assets/Scenes/Marcin/DebugScene.unity +++ b/Assets/Scenes/Marcin/DebugScene.unity @@ -13,7 +13,7 @@ OcclusionCullingSettings: --- !u!104 &2 RenderSettings: m_ObjectHideFlags: 0 - serializedVersion: 9 + serializedVersion: 10 m_Fog: 0 m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} m_FogMode: 3 @@ -38,13 +38,12 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.18018606, g: 0.22559257, b: 0.30678663, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 + serializedVersion: 13 + m_BakeOnSceneLoad: 0 m_GISettings: serializedVersion: 2 m_BounceScale: 1 @@ -67,9 +66,6 @@ LightmapSettings: m_LightmapParameters: {fileID: 0} m_LightmapsBakeMode: 1 m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 m_ReflectionCompression: 2 m_MixedBakeMode: 2 m_BakeBackend: 1 @@ -97,14 +93,14 @@ LightmapSettings: m_ExportTrainingData: 0 m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} + m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0} m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: serializedVersion: 2 m_ObjectHideFlags: 0 m_BuildSettings: - serializedVersion: 2 + serializedVersion: 3 agentTypeID: 0 agentRadius: 0.5 agentHeight: 2 @@ -117,7 +113,7 @@ NavMeshSettings: cellSize: 0.16666667 manualTileSize: 0 tileSize: 256 - accuratePlacement: 0 + buildHeightMesh: 0 maxJobWorkers: 0 preserveTilesOutsideBounds: 0 debug: @@ -152,9 +148,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1611628} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!1001 &4567366 @@ -162,6 +166,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1572616911} m_Modifications: - target: {fileID: 4745570059773410385, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -240,6 +245,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} --- !u!4 &4567367 stripped Transform: @@ -252,6 +260,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 2631004785151738405, guid: bdcc0504e0c523b4492037e978d716f4, @@ -320,12 +329,16 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bdcc0504e0c523b4492037e978d716f4, type: 3} --- !u!1001 &37659565 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1806682156} m_Modifications: - target: {fileID: 7503257067932423708, guid: bb6aaff8bcadd764096de77181a0bf0a, @@ -404,6 +417,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: bb6aaff8bcadd764096de77181a0bf0a, type: 3} --- !u!1 &42401865 GameObject: @@ -438,9 +454,17 @@ SphereCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42401865} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Radius: 1.37 m_Center: {x: 0, y: 0, z: 0} --- !u!23 &42401867 @@ -460,6 +484,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -500,6 +527,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 42401865} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -42.497593, y: -1.437, z: 11.437} m_LocalScale: {x: 1, y: 1, z: 1} @@ -507,7 +535,6 @@ Transform: m_Children: - {fileID: 635985467} m_Father: {fileID: 0} - m_RootOrder: 41 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &42401870 MonoBehaviour: @@ -892,6 +919,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 817245925} m_Modifications: - target: {fileID: 112029112647718276, guid: 02c738b3f01370d48a9801422fac8cb0, @@ -1736,7 +1764,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2683908841727702283, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 43c7f9fafb796ba418bbe694f4d75956, type: 2} - target: {fileID: 2743518175459216160, guid: 02c738b3f01370d48a9801422fac8cb0, @@ -1926,7 +1954,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 3299103507789845988, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: 43c7f9fafb796ba418bbe694f4d75956, type: 2} - target: {fileID: 3399169247464631094, guid: 02c738b3f01370d48a9801422fac8cb0, @@ -3141,12 +3169,12 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7380878196847150868, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: e08534b46af36bf4ea7f19caef04cd46, type: 2} - target: {fileID: 7380878196847150868, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} - propertyPath: m_Materials.Array.data[1] + propertyPath: 'm_Materials.Array.data[1]' value: objectReference: {fileID: 2100000, guid: e08534b46af36bf4ea7f19caef04cd46, type: 2} - target: {fileID: 7438130357663485183, guid: 02c738b3f01370d48a9801422fac8cb0, @@ -3446,7 +3474,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8142334023838632886, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: e6c4a90baf1c6504e85398c032e6a102, type: 2} - target: {fileID: 8199839730423724283, guid: 02c738b3f01370d48a9801422fac8cb0, @@ -3745,6 +3773,13 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 398431309007363175, guid: 02c738b3f01370d48a9801422fac8cb0, + type: 3} + insertIndex: -1 + addedObject: {fileID: 312408982} + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 02c738b3f01370d48a9801422fac8cb0, type: 3} --- !u!1 &49351257 stripped GameObject: @@ -3766,9 +3801,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 49351257} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 25.97, y: 21.75907, z: 20.1} m_Center: {x: 0, y: 10.541881, z: -0.000002861023} --- !u!114 &49351261 @@ -4208,6 +4251,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 691007445474469626, guid: 9ac95f22970d95c45a231271b24ffc73, @@ -4277,177 +4321,10 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9ac95f22970d95c45a231271b24ffc73, type: 3} ---- !u!43 &123753205 -Mesh: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: Quad Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance - serializedVersion: 10 - m_SubMeshes: - - serializedVersion: 2 - firstByte: 0 - indexCount: 6 - topology: 0 - baseVertex: 0 - firstVertex: 0 - vertexCount: 4 - localAABB: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} - m_Shapes: - vertices: [] - shapes: [] - channels: [] - fullWeights: [] - m_BindPose: [] - m_BoneNameHashes: - m_RootBoneNameHash: 0 - m_BonesAABB: [] - m_VariableBoneCountWeights: - m_Data: - m_MeshCompression: 0 - m_IsReadable: 1 - m_KeepVertices: 1 - m_KeepIndices: 1 - m_IndexFormat: 0 - m_IndexBuffer: 000003000100030000000200 - m_VertexData: - serializedVersion: 3 - m_VertexCount: 4 - m_Channels: - - stream: 0 - offset: 0 - format: 0 - dimension: 3 - - stream: 0 - offset: 12 - format: 0 - dimension: 3 - - stream: 0 - offset: 24 - format: 0 - dimension: 4 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 40 - format: 0 - dimension: 2 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - m_DataSize: 192 - _typelessdata: 000000bf000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf00000000000000000000003f000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf0000803f00000000000000bf0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf000000000000803f0000003f0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f - m_CompressedMesh: - m_Vertices: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_UV: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Normals: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Tangents: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Weights: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_NormalSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_TangentSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_FloatColors: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_BoneIndices: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_Triangles: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_UVInfo: 0 - m_LocalAABB: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} - m_MeshUsageFlags: 0 - m_BakedConvexCollisionMesh: - m_BakedTriangleCollisionMesh: - m_MeshMetrics[0]: 1 - m_MeshMetrics[1]: 1 - m_MeshOptimizationFlags: 0 - m_StreamData: - serializedVersion: 2 - offset: 0 - size: 0 - path: --- !u!1 &156773212 GameObject: m_ObjectHideFlags: 0 @@ -4474,9 +4351,8 @@ Light: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 156773212} m_Enabled: 1 - serializedVersion: 10 + serializedVersion: 11 m_Type: 1 - m_Shape: 0 m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} m_Intensity: 1 m_Range: 10 @@ -4526,8 +4402,12 @@ Light: m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} m_UseBoundingSphereOverride: 0 m_UseViewFrustumForShadowCasterCull: 1 + m_ForceVisible: 0 m_ShadowRadius: 0 m_ShadowAngle: 0 + m_LightUnit: 1 + m_LuxAtDistance: 1 + m_EnableSpotReflector: 1 --- !u!4 &156773214 Transform: m_ObjectHideFlags: 0 @@ -4535,13 +4415,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 156773212} + serializedVersion: 2 m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} m_LocalPosition: {x: 0, y: 3, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 24 m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} --- !u!114 &156773215 MonoBehaviour: @@ -4555,19 +4435,23 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} m_Name: m_EditorClassIdentifier: - m_Version: 1 + m_Version: 3 m_UsePipelineSettings: 1 m_AdditionalLightsShadowResolutionTier: 2 m_LightLayerMask: 1 + m_RenderingLayers: 1 m_CustomShadowLayers: 0 m_ShadowLayerMask: 1 + m_ShadowRenderingLayers: 1 m_LightCookieSize: {x: 1, y: 1} m_LightCookieOffset: {x: 0, y: 0} + m_SoftShadowQuality: 1 --- !u!1001 &164591705 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 1372156515534408625, guid: 4c0287977ce906244bdc19e4e9fdba37, @@ -4631,12 +4515,16 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 4c0287977ce906244bdc19e4e9fdba37, type: 3} --- !u!1001 &209249256 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 7268478284668698993, guid: 01a728c57efab194d9fc0f56fcad1ee0, @@ -4700,6 +4588,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 01a728c57efab194d9fc0f56fcad1ee0, type: 3} --- !u!4 &230024690 stripped Transform: @@ -4719,176 +4610,131 @@ Animator: type: 3} m_PrefabInstance: {fileID: 44831531} m_PrefabAsset: {fileID: 0} ---- !u!43 &243525216 -Mesh: +--- !u!21 &238644637 +Material: + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_Name: Quad Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance Instance Instance Instance Instance Instance - Instance Instance Instance Instance - serializedVersion: 10 - m_SubMeshes: - - serializedVersion: 2 - firstByte: 0 - indexCount: 6 - topology: 0 - baseVertex: 0 - firstVertex: 0 - vertexCount: 4 - localAABB: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} - m_Shapes: - vertices: [] - shapes: [] - channels: [] - fullWeights: [] - m_BindPose: [] - m_BoneNameHashes: - m_RootBoneNameHash: 0 - m_BonesAABB: [] - m_VariableBoneCountWeights: - m_Data: - m_MeshCompression: 0 - m_IsReadable: 1 - m_KeepVertices: 1 - m_KeepIndices: 1 - m_IndexFormat: 0 - m_IndexBuffer: 000003000100030000000200 - m_VertexData: + m_Name: PortalMat (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) + m_Shader: {fileID: -6465566751694194690, guid: f90138ae641de784cb4b453bdc734b14, + type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: serializedVersion: 3 - m_VertexCount: 4 - m_Channels: - - stream: 0 - offset: 0 - format: 0 - dimension: 3 - - stream: 0 - offset: 12 - format: 0 - dimension: 3 - - stream: 0 - offset: 24 - format: 0 - dimension: 4 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 40 - format: 0 - dimension: 2 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - - stream: 0 - offset: 0 - format: 0 - dimension: 0 - m_DataSize: 192 - _typelessdata: 000000bf000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf00000000000000000000003f000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf0000803f00000000000000bf0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf000000000000803f0000003f0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f - m_CompressedMesh: - m_Vertices: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_UV: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Normals: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Tangents: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_Weights: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_NormalSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_TangentSigns: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_FloatColors: - m_NumItems: 0 - m_Range: 0 - m_Start: 0 - m_Data: - m_BitSize: 0 - m_BoneIndices: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_Triangles: - m_NumItems: 0 - m_Data: - m_BitSize: 0 - m_UVInfo: 0 - m_LocalAABB: - m_Center: {x: 0, y: 0, z: 0} - m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} - m_MeshUsageFlags: 0 - m_BakedConvexCollisionMesh: - m_BakedTriangleCollisionMesh: - m_MeshMetrics[0]: 1 - m_MeshMetrics[1]: 1 - m_MeshOptimizationFlags: 0 - m_StreamData: - serializedVersion: 2 - offset: 0 - size: 0 - path: + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 1796853559} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 2800000, guid: 84487d73ca4b791498332d8f6858417f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 2800000, guid: 9d67afb2ebc87cc43b5be99e1b689960, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2DAsset_EAC75755_Out_0: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _NormalSpeed: 0.36 + - _NormalStrength: 0.49 + - _NormalTiling: 0.41 + - _OcclusionStrength: 1 + - _OffsetStrength: 0.1 + - _PortalBrightness: 2 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _Speed: 0.5 + - _SrcBlend: 1 + - _Surface: 0 + - _TwirlPower: 8 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EffectColor: {r: 0, g: 0.7548079, b: 1, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1 &267127504 GameObject: m_ObjectHideFlags: 0 @@ -4924,7 +4770,6 @@ RectTransform: - {fileID: 1493038972} - {fileID: 1828179117} m_Father: {fileID: 1571562798} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -5048,6 +4893,8 @@ Material: m_Name: Boar (Instance) m_Shader: {fileID: -6465566751694194690, guid: 00a0b3897399f8b42a61a0333dd40ced, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_EMISSIVE - USEDISSOLVE_DONT_USE @@ -5062,6 +4909,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -5202,6 +5050,7 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1 &307138749 GameObject: m_ObjectHideFlags: 0 @@ -5231,9 +5080,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 307138749} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &307138751 @@ -5253,6 +5110,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5293,13 +5153,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 307138749} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -46.3, y: -0.572, z: 19.65} m_LocalScale: {x: 1.9546, y: 1.9546, z: 1.9546} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 34 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &307138754 MonoBehaviour: @@ -5313,6 +5173,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2211dea05d3293b4a8d37f95d35822af, type: 3} m_Name: m_EditorClassIdentifier: + m_key: + m_appendSaverTypeToKey: 0 + m_saveAcrossSceneChanges: 1 + m_restoreStateOnStart: 0 m_videoCutsceneController: {fileID: 1690122486} m_cutsceneVideoClip: {fileID: 32900000, guid: fa40913fe0e8409498196f43eb51cd51, type: 3} @@ -5324,6 +5188,7 @@ MonoBehaviour: Enabled: 0 LevelName: SpawnPointName: + m_playOnStart: 0 m_teleportAfterCutScene: useTeleport: 1 playerObject: {fileID: 73876617} @@ -5334,6 +5199,8 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 1 m_skipFadeIn: 0 + m_skipFadeOut: 0 + m_dontEnableUI: 0 --- !u!114 &307138755 MonoBehaviour: m_ObjectHideFlags: 0 @@ -5372,13 +5239,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 312408981} + serializedVersion: 2 m_LocalRotation: {x: -0.49237698, y: -0.5271741, z: 0.44316494, w: -0.5322192} m_LocalPosition: {x: -0.03476967, y: 0.18824342, z: -0.0031773448} m_LocalScale: {x: 0.88000053, y: 0.8800001, z: 0.8800009} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 230024690} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: -52.185, y: -197.909, z: 21.224} --- !u!23 &312408983 MeshRenderer: @@ -5397,6 +5264,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -5447,6 +5317,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 156826203, guid: 0a07eaf716785d343b793ad05c9e9b12, type: 3} @@ -5889,6 +5760,13 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 156826203, guid: 0a07eaf716785d343b793ad05c9e9b12, type: 3} + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 1554689832998945682, guid: 0a07eaf716785d343b793ad05c9e9b12, + type: 3} + insertIndex: -1 + addedObject: {fileID: 986702597} + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0a07eaf716785d343b793ad05c9e9b12, type: 3} --- !u!4 &389323222 stripped Transform: @@ -5945,6 +5823,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2ca440d7a7106ec48948d6ced68759ee, type: 3} m_Name: m_EditorClassIdentifier: + m_key: + m_appendSaverTypeToKey: 0 + m_saveAcrossSceneChanges: 1 + m_restoreStateOnStart: 0 m_condition: luaConditions: [] questConditions: [] @@ -6081,6 +5963,7 @@ MonoBehaviour: playOnStart: 1 playMultipleTimes: 0 skipFadeOutIn: 0 + skipFadeIn: 0 m_speed: 1 m_cutsceneLevelLoader: Enabled: 0 @@ -6106,7 +5989,7 @@ MonoBehaviour: cutSceneDialogueBreakpoints: [] --- !u!95 &421160338 Animator: - serializedVersion: 4 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -6120,10 +6003,12 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!320 &421160339 PlayableDirector: m_ObjectHideFlags: 0 @@ -6154,6 +6039,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 421160336} + 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} @@ -6163,7 +6049,6 @@ Transform: - {fileID: 1445433409} - {fileID: 817245925} m_Father: {fileID: 0} - m_RootOrder: 32 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &454988603 GameObject: @@ -6418,9 +6303,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 454988603} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &454988606 @@ -6440,6 +6333,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6480,19 +6376,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 454988603} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -47.63, y: -1.03, z: 14.189} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 43 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &502518011 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 703549658747082793, guid: 59165210a2e6bd04ca12087794c54b5e, @@ -6572,6 +6469,9 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 7724471950702629147, guid: 59165210a2e6bd04ca12087794c54b5e, type: 3} + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 59165210a2e6bd04ca12087794c54b5e, type: 3} --- !u!1 &540906067 GameObject: @@ -6598,13 +6498,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 540906067} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -46.99, y: -1.06, z: 24.4} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 25 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &540906069 MonoBehaviour: @@ -6618,6 +6518,10 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 2211dea05d3293b4a8d37f95d35822af, type: 3} m_Name: m_EditorClassIdentifier: + m_key: + m_appendSaverTypeToKey: 0 + m_saveAcrossSceneChanges: 1 + m_restoreStateOnStart: 0 m_videoCutsceneController: {fileID: 0} m_cutsceneVideoClip: {fileID: 32900000, guid: 0596f1f9553b0428d89a91bb17577e63, type: 3} @@ -6629,6 +6533,7 @@ MonoBehaviour: Enabled: 0 LevelName: SpawnPointName: + m_playOnStart: 0 m_teleportAfterCutScene: useTeleport: 1 playerObject: {fileID: 0} @@ -6639,6 +6544,8 @@ MonoBehaviour: serializedVersion: 2 m_Bits: 1 m_skipFadeIn: 0 + m_skipFadeOut: 0 + m_dontEnableUI: 0 --- !u!65 &540906070 BoxCollider: m_ObjectHideFlags: 0 @@ -6647,9 +6554,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 540906067} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!1 &560566971 stripped @@ -6683,6 +6598,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -6713,6 +6631,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 729888315447541756, guid: 8d2175a927c971743a0b8406545c605b, @@ -6727,32 +6646,32 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5121568179016767913, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 1192932572} - target: {fileID: 5121568179016767913, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[1] + propertyPath: 'm_Materials.Array.data[1]' value: objectReference: {fileID: 1850694529} - target: {fileID: 5121568179016767915, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 300479148} - target: {fileID: 5121568179016767915, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[1] + propertyPath: 'm_Materials.Array.data[1]' value: objectReference: {fileID: 1978211000} - target: {fileID: 5121568179016767917, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 1804095114} - target: {fileID: 5121568179016767919, guid: 8d2175a927c971743a0b8406545c605b, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 1149729779} - target: {fileID: 6234934835376397396, guid: 8d2175a927c971743a0b8406545c605b, @@ -6836,44 +6755,10 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 8d2175a927c971743a0b8406545c605b, type: 3} ---- !u!84 &594289979 -RenderTexture: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_ImageContentsHash: - serializedVersion: 2 - Hash: 00000000000000000000000000000000 - m_ForcedFallbackFormat: 4 - m_DownscaleFallback: 0 - m_IsAlphaChannelOptional: 0 - serializedVersion: 5 - m_Width: 512 - m_Height: 512 - m_AntiAliasing: 1 - m_MipCount: -1 - m_DepthStencilFormat: 90 - m_ColorFormat: 4 - m_MipMap: 0 - m_GenerateMips: 1 - m_SRGB: 1 - m_UseDynamicScale: 0 - m_BindMS: 0 - m_EnableCompatibleFormat: 1 - m_TextureSettings: - serializedVersion: 2 - m_FilterMode: 1 - m_Aniso: 1 - m_MipBias: 0 - m_WrapU: 1 - m_WrapV: 1 - m_WrapW: 1 - m_Dimension: 2 - m_VolumeDepth: 1 - m_ShadowSamplingMode: 2 --- !u!4 &635985467 stripped Transform: m_CorrespondingSourceObject: {fileID: 4438953459364064, guid: ff64d8a96dc97764b98e7420139d018a, @@ -6900,11 +6785,184 @@ MonoBehaviour: m_EditorClassIdentifier: timeScale: 1 startFixedDeltaTime: 0 +--- !u!43 &737966874 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Quad Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance + serializedVersion: 11 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 6 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 4 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: 000003000100030000000200 + m_VertexData: + serializedVersion: 3 + m_VertexCount: 4 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 24 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 40 + format: 0 + dimension: 2 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 192 + _typelessdata: 000000bf000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf00000000000000000000003f000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf0000803f00000000000000bf0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf000000000000803f0000003f0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 0 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: --- !u!1001 &775315289 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 6774786951013548710, guid: 7d70b6524026a254188585f8560fc467, @@ -6968,6 +7026,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7d70b6524026a254188585f8560fc467, type: 3} --- !u!1 &776414545 GameObject: @@ -6992,19 +7053,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 776414545} + serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -40.59, y: 0.1, z: 40.69} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 39 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &792196232 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1572616911} m_Modifications: - target: {fileID: 4745570059773410385, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -7083,6 +7145,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} --- !u!4 &792196233 stripped Transform: @@ -7118,9 +7183,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 799801477} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &799801479 @@ -7140,6 +7213,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -7180,13 +7256,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 799801477} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -47.63, y: -1.03, z: 9.73} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 40 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &799801482 MonoBehaviour: @@ -7436,6 +7512,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 817245924} + serializedVersion: 2 m_LocalRotation: {x: -0.010527855, y: -0.9811172, z: -0.06831801, w: -0.18064034} m_LocalPosition: {x: -144.85, y: 36.267, z: 390.12} m_LocalScale: {x: 1.0667021, y: 1.0667021, z: 1.0667021} @@ -7443,13 +7520,13 @@ Transform: m_Children: - {fileID: 236024686} m_Father: {fileID: 421160340} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: -7.484, y: 158.964, z: 2.621} --- !u!1001 &829254892 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 215525948982490942, guid: 79fa65a7e138311468db4997a5358dc6, @@ -7518,6 +7595,9 @@ PrefabInstance: value: Anger fruit Variant objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 79fa65a7e138311468db4997a5358dc6, type: 3} --- !u!1 &885468786 GameObject: @@ -7547,9 +7627,17 @@ MeshCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885468786} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 4 + serializedVersion: 5 m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} @@ -7570,10 +7658,13 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 1872922175} + - {fileID: 1331962375} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -7602,7 +7693,7 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885468786} - m_Mesh: {fileID: 123753205} + m_Mesh: {fileID: 1400681635} --- !u!4 &885468790 Transform: m_ObjectHideFlags: 0 @@ -7610,6 +7701,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 885468786} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 2.0478497, y: -0.7989375, z: 3.2170925} m_LocalScale: {x: 1, y: 1, z: 1} @@ -7617,7 +7709,6 @@ Transform: m_Children: - {fileID: 1651311973} m_Father: {fileID: 939335672} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &885468791 MonoBehaviour: @@ -7635,11 +7726,113 @@ MonoBehaviour: camera: {fileID: 1651311972} portalType: 0 useMainCamera: 1 +--- !u!1001 &890901947 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 1134572321, guid: e115436bfe06bd447a266ca75621bbdd, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1134572321, guid: e115436bfe06bd447a266ca75621bbdd, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 145182807891766407, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_Name + value: Spider_Base_Model_AI Variant RootMotion + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.x + value: -19.867569 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.y + value: -1.6500001 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.z + value: 20.234108 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalRotation.w + value: -0.08108721 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.004766757 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.9964612 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.021617588 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -2.514 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 189.297 + objectReference: {fileID: 0} + - target: {fileID: 668813484176291389, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0.344 + objectReference: {fileID: 0} + - target: {fileID: 1131267071284757768, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1131267071284757768, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5732159520190161506, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.065 + objectReference: {fileID: 0} + - target: {fileID: 5732159520190161506, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.447 + objectReference: {fileID: 0} + - target: {fileID: 5732159520190161506, guid: e115436bfe06bd447a266ca75621bbdd, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.032 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: e115436bfe06bd447a266ca75621bbdd, type: 3} --- !u!1001 &891528246 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 166912, guid: 9afc30df8be080346afab957fc49a27b, type: 3} @@ -7691,6 +7884,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 9afc30df8be080346afab957fc49a27b, type: 3} --- !u!1 &910399847 GameObject: @@ -7723,7 +7919,6 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 267127505} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} @@ -7795,51 +7990,14 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 910685942} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0.23, y: 0, z: 2.15} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1913218046} - m_RootOrder: 17 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!84 &926908949 -RenderTexture: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: - m_ImageContentsHash: - serializedVersion: 2 - Hash: 00000000000000000000000000000000 - m_ForcedFallbackFormat: 4 - m_DownscaleFallback: 0 - m_IsAlphaChannelOptional: 0 - serializedVersion: 5 - m_Width: 512 - m_Height: 512 - m_AntiAliasing: 1 - m_MipCount: -1 - m_DepthStencilFormat: 90 - m_ColorFormat: 4 - m_MipMap: 0 - m_GenerateMips: 1 - m_SRGB: 1 - m_UseDynamicScale: 0 - m_BindMS: 0 - m_EnableCompatibleFormat: 1 - m_TextureSettings: - serializedVersion: 2 - m_FilterMode: 1 - m_Aniso: 1 - m_MipBias: 0 - m_WrapU: 1 - m_WrapV: 1 - m_WrapW: 1 - m_Dimension: 2 - m_VolumeDepth: 1 - m_ShadowSamplingMode: 2 --- !u!1 &939335671 GameObject: m_ObjectHideFlags: 0 @@ -7863,6 +8021,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 939335671} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -31.70785, y: 0.3019375, z: 21.242907} m_LocalScale: {x: 1, y: 1, z: 1} @@ -7871,13 +8030,13 @@ Transform: - {fileID: 885468790} - {fileID: 1272116025} m_Father: {fileID: 0} - m_RootOrder: 49 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &942497537 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: -8679921383154817045, guid: 7ce2eefa82dba4510a1a6086c08adcfd, @@ -7972,22 +8131,22 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} - propertyPath: m_Materials.Array.data[0] + propertyPath: 'm_Materials.Array.data[0]' value: objectReference: {fileID: 2100000, guid: efbeca858023c4194a1cc7a7302701ed, type: 2} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} - propertyPath: m_Materials.Array.data[1] + propertyPath: 'm_Materials.Array.data[1]' value: objectReference: {fileID: 2100000, guid: efbeca858023c4194a1cc7a7302701ed, type: 2} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} - propertyPath: m_Materials.Array.data[2] + propertyPath: 'm_Materials.Array.data[2]' value: objectReference: {fileID: 2100000, guid: efbeca858023c4194a1cc7a7302701ed, type: 2} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} - propertyPath: m_Materials.Array.data[3] + propertyPath: 'm_Materials.Array.data[3]' value: objectReference: {fileID: 2100000, guid: efbeca858023c4194a1cc7a7302701ed, type: 2} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, @@ -7997,7 +8156,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: -3887185075125053422, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} - propertyPath: m_BlendShapeWeights.Array.data[0] + propertyPath: 'm_BlendShapeWeights.Array.data[0]' value: 100 objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, @@ -8011,12 +8170,44 @@ PrefabInstance: value: 11 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351260} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351261} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351262} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351263} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351264} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351265} + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 7ce2eefa82dba4510a1a6086c08adcfd, + type: 3} + insertIndex: -1 + addedObject: {fileID: 49351266} m_SourcePrefab: {fileID: 100100000, guid: 7ce2eefa82dba4510a1a6086c08adcfd, type: 3} --- !u!1001 &986702592 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 389323222} m_Modifications: - target: {fileID: 185500303373171379, guid: 90fc87c63a31e1849bafc54f9fdc32fe, @@ -8100,6 +8291,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 90fc87c63a31e1849bafc54f9fdc32fe, type: 3} --- !u!1 &986702593 stripped GameObject: @@ -8107,11 +8301,18 @@ GameObject: type: 3} m_PrefabInstance: {fileID: 986702592} m_PrefabAsset: {fileID: 0} +--- !u!4 &986702597 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 185500303373171379, guid: 90fc87c63a31e1849bafc54f9fdc32fe, + type: 3} + m_PrefabInstance: {fileID: 986702592} + m_PrefabAsset: {fileID: 0} --- !u!1001 &996612905 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 109040, guid: f907b1416ebdbf645a73183ab47aa2b8, type: 3} @@ -8167,7 +8368,7 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} - target: {fileID: 11405054, guid: f907b1416ebdbf645a73183ab47aa2b8, type: 3} - propertyPath: m_questDatabases.Array.data[0] + propertyPath: 'm_questDatabases.Array.data[0]' value: objectReference: {fileID: 11400000, guid: 0f05027574e0707429056bb869e7b859, type: 2} @@ -10617,6 +10818,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: f907b1416ebdbf645a73183ab47aa2b8, type: 3} --- !u!4 &1059460069 stripped Transform: @@ -10629,6 +10833,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1572616911} m_Modifications: - target: {fileID: 4745570059773410385, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -10732,6 +10937,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} --- !u!4 &1079933734 stripped Transform: @@ -10744,6 +10952,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 42401869} m_Modifications: - target: {fileID: 1432975624153514, guid: ff64d8a96dc97764b98e7420139d018a, type: 3} @@ -10840,6 +11049,9 @@ PrefabInstance: value: -0.06101665 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: ff64d8a96dc97764b98e7420139d018a, type: 3} --- !u!21 &1149729779 Material: @@ -10851,6 +11063,8 @@ Material: m_Name: Boar (Instance) m_Shader: {fileID: -6465566751694194690, guid: 00a0b3897399f8b42a61a0333dd40ced, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_EMISSIVE - USEDISSOLVE_DONT_USE @@ -10865,6 +11079,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -11005,11 +11220,13 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1001 &1159244355 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 8505533576810708906, guid: dfe451d451ca24340b6d0ff311e4f3f0, @@ -11073,6 +11290,9 @@ PrefabInstance: value: -3.007 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: dfe451d451ca24340b6d0ff311e4f3f0, type: 3} --- !u!21 &1192932572 Material: @@ -11084,6 +11304,8 @@ Material: m_Name: Boar (Instance) m_Shader: {fileID: -6465566751694194690, guid: 00a0b3897399f8b42a61a0333dd40ced, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_METALNESS - USEDISSOLVE_DONT_USE @@ -11098,6 +11320,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -11238,6 +11461,7 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!20 &1237190503 stripped Camera: m_CorrespondingSourceObject: {fileID: 1979772587896703589, guid: 851e8e61247888340bdec90fc8aa37f5, @@ -11271,6 +11495,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1272116024} + serializedVersion: 2 m_LocalRotation: {x: -0, y: 0.999666, z: -0, w: 0.025845865} m_LocalPosition: {x: -2.58, y: -0.7989375, z: -7.48} m_LocalScale: {x: 1, y: 1, z: 1} @@ -11278,7 +11503,6 @@ Transform: m_Children: - {fileID: 2071722878} m_Father: {fileID: 939335672} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 177.038, z: 0} --- !u!114 &1272116026 MonoBehaviour: @@ -11304,9 +11528,17 @@ MeshCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1272116024} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 4 + serializedVersion: 5 m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} @@ -11327,10 +11559,13 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: - - {fileID: 1275348774} + - {fileID: 238644637} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 @@ -11359,131 +11594,13 @@ MeshFilter: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1272116024} - m_Mesh: {fileID: 243525216} ---- !u!21 &1275348774 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: PortalMat (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) - m_Shader: {fileID: -6465566751694194690, guid: f90138ae641de784cb4b453bdc734b14, - type: 3} - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 594289979} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MaskMap: - m_Texture: {fileID: 2800000, guid: 84487d73ca4b791498332d8f6858417f, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 2800000, guid: 9d67afb2ebc87cc43b5be99e1b689960, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Texture2DAsset_EAC75755_Out_0: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _Blend: 0 - - _BumpScale: 1 - - _Cull: 2 - - _Cutoff: 0.5 - - _DstBlend: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _NormalSpeed: 0.36 - - _NormalStrength: 0.49 - - _NormalTiling: 0.41 - - _OcclusionStrength: 1 - - _OffsetStrength: 0.1 - - _PortalBrightness: 2 - - _QueueControl: 0 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _Speed: 0.5 - - _SrcBlend: 1 - - _Surface: 0 - - _TwirlPower: 8 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EffectColor: {r: 0, g: 0.7548079, b: 1, a: 0} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] + m_Mesh: {fileID: 737966874} --- !u!1001 &1307530043 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 130933382880168375, guid: 851e8e61247888340bdec90fc8aa37f5, @@ -12003,22 +12120,47 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 2910774446303748823, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} - propertyPath: m_questList.Array.data[0] + propertyPath: 'm_questList.Array.data[0]' value: objectReference: {fileID: 11400000, guid: 1cc24e30de54b6c409ea8b0286b2d0b5, type: 2} - target: {fileID: 2910774446303748823, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} - propertyPath: m_questList.Array.data[1] + propertyPath: 'm_questList.Array.data[1]' value: objectReference: {fileID: 11400000, guid: 305a672a2c9d0104691f7a7e45203f36, type: 2} - target: {fileID: 2910774446303748823, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} - propertyPath: m_questList.Array.data[2] + propertyPath: 'm_questList.Array.data[2]' value: objectReference: {fileID: 11400000, guid: 73bbcb65300a2b84f95577f5ddabc584, type: 2} + - target: {fileID: 2976790053899220974, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2976790053899220974, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2976790053899220974, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2976790053899220974, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 2976790053899220974, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3172141488829884535, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} propertyPath: m_AnchorMax.y @@ -12039,6 +12181,31 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 3668833103346101761, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3668833103346101761, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3668833103346101761, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3668833103346101761, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3668833103346101761, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3693988339379737151, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} propertyPath: m_AnchorMax.y @@ -12551,7 +12718,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5582921900280934274, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} - propertyPath: itemsFilter.Array.data[0] + propertyPath: 'itemsFilter.Array.data[0]' value: 8 objectReference: {fileID: 0} - target: {fileID: 5582921900280934274, guid: 851e8e61247888340bdec90fc8aa37f5, @@ -12629,6 +12796,31 @@ PrefabInstance: propertyPath: m_effects.Array.data[6].effectObject value: objectReference: {fileID: 0} + - target: {fileID: 6312033404458817837, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6312033404458817837, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6312033404458817837, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6312033404458817837, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 6312033404458817837, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 6425420852750441961, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} propertyPath: m_LocalPosition.x @@ -12804,6 +12996,31 @@ PrefabInstance: propertyPath: m_AnchoredPosition.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 8200779664572204948, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8200779664572204948, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8200779664572204948, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8200779664572204948, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8200779664572204948, guid: 851e8e61247888340bdec90fc8aa37f5, + type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8560171947208204314, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} propertyPath: m_IsActive @@ -12821,12 +13038,140 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: - {fileID: 5647296446236797917, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 851e8e61247888340bdec90fc8aa37f5, type: 3} +--- !u!21 &1331962375 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PortalMat (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) + m_Shader: {fileID: -6465566751694194690, guid: f90138ae641de784cb4b453bdc734b14, + type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 1572866826} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MaskMap: + m_Texture: {fileID: 2800000, guid: 84487d73ca4b791498332d8f6858417f, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _NormalMap: + m_Texture: {fileID: 2800000, guid: 9d67afb2ebc87cc43b5be99e1b689960, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _Texture2DAsset_EAC75755_Out_0: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _Blend: 0 + - _BumpScale: 1 + - _Cull: 2 + - _Cutoff: 0.5 + - _DstBlend: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _NormalSpeed: 0.36 + - _NormalStrength: 0.49 + - _NormalTiling: 0.41 + - _OcclusionStrength: 1 + - _OffsetStrength: 0.1 + - _PortalBrightness: 2 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _Speed: 0.5 + - _SrcBlend: 1 + - _Surface: 0 + - _TwirlPower: 8 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EffectColor: {r: 0, g: 0.7548079, b: 1, a: 0} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1001 &1363773142 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1572616911} m_Modifications: - target: {fileID: 4745570059773410385, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -12931,7 +13276,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 5066865891276352198, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} - propertyPath: condition.luaConditions.Array.data[0] + propertyPath: 'condition.luaConditions.Array.data[0]' value: objectReference: {fileID: 0} - target: {fileID: 5066865891276352198, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -12955,6 +13300,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} --- !u!4 &1363773143 stripped Transform: @@ -12962,11 +13310,183 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1363773142} m_PrefabAsset: {fileID: 0} +--- !u!43 &1400681635 +Mesh: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Quad Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + Instance Instance Instance Instance Instance Instance Instance Instance Instance + serializedVersion: 11 + m_SubMeshes: + - serializedVersion: 2 + firstByte: 0 + indexCount: 6 + topology: 0 + baseVertex: 0 + firstVertex: 0 + vertexCount: 4 + localAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} + m_Shapes: + vertices: [] + shapes: [] + channels: [] + fullWeights: [] + m_BindPose: [] + m_BoneNameHashes: + m_RootBoneNameHash: 0 + m_BonesAABB: [] + m_VariableBoneCountWeights: + m_Data: + m_MeshCompression: 0 + m_IsReadable: 1 + m_KeepVertices: 1 + m_KeepIndices: 1 + m_IndexFormat: 0 + m_IndexBuffer: 000003000100030000000200 + m_VertexData: + serializedVersion: 3 + m_VertexCount: 4 + m_Channels: + - stream: 0 + offset: 0 + format: 0 + dimension: 3 + - stream: 0 + offset: 12 + format: 0 + dimension: 3 + - stream: 0 + offset: 24 + format: 0 + dimension: 4 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 40 + format: 0 + dimension: 2 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + - stream: 0 + offset: 0 + format: 0 + dimension: 0 + m_DataSize: 192 + _typelessdata: 000000bf000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf00000000000000000000003f000000bf31310da40000000000000000000080bf0000803f0000000000000000000080bf0000803f00000000000000bf0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf000000000000803f0000003f0000003f31310d240000000000000000000080bf0000803f0000000000000000000080bf0000803f0000803f + m_CompressedMesh: + m_Vertices: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_UV: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Normals: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Tangents: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_Weights: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_NormalSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_TangentSigns: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_FloatColors: + m_NumItems: 0 + m_Range: 0 + m_Start: 0 + m_Data: + m_BitSize: 0 + m_BoneIndices: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_Triangles: + m_NumItems: 0 + m_Data: + m_BitSize: 0 + m_UVInfo: 0 + m_LocalAABB: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0.5, y: 0.5, z: 3.0616168e-17} + m_MeshUsageFlags: 0 + m_CookingOptions: 30 + m_BakedConvexCollisionMesh: + m_BakedTriangleCollisionMesh: + 'm_MeshMetrics[0]': 1 + 'm_MeshMetrics[1]': 1 + m_MeshOptimizationFlags: 0 + m_StreamData: + serializedVersion: 2 + offset: 0 + size: 0 + path: --- !u!1001 &1415194265 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 6692236139593661703, guid: 17ff9563aca45b14e9a346222591778e, @@ -13030,6 +13550,13 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 6692236139593661703, guid: 17ff9563aca45b14e9a346222591778e, + type: 3} + insertIndex: -1 + addedObject: {fileID: 712682295} m_SourcePrefab: {fileID: 100100000, guid: 17ff9563aca45b14e9a346222591778e, type: 3} --- !u!1 &1427986063 GameObject: @@ -13058,9 +13585,17 @@ MeshCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1427986063} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 4 + serializedVersion: 5 m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} @@ -13081,6 +13616,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13121,13 +13659,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1427986063} + serializedVersion: 2 m_LocalRotation: {x: 0, y: -0.46437845, z: 0, w: 0.8856369} m_LocalPosition: {x: -27.778, y: -1.312, z: 21.118} m_LocalScale: {x: 2, y: 2, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 45 m_LocalEulerAnglesHint: {x: 0, y: -55.34, z: 0} --- !u!1 &1445433408 GameObject: @@ -13155,13 +13693,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1445433408} + serializedVersion: 2 m_LocalRotation: {x: -0.13379216, y: 0.40280747, z: -0.06035763, w: -0.90343946} m_LocalPosition: {x: -130.8863, y: 42.918552, z: 371.69525} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 421160340} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1445433410 MonoBehaviour: @@ -13193,9 +13731,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!81 &1445433411 AudioListener: m_ObjectHideFlags: 0 @@ -13218,9 +13767,17 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -13252,6 +13809,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 4768888533977712514, guid: 8dc5b1925359cda44aa02e2ae0dbf608, @@ -13320,6 +13878,17 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 8391656370465289617, guid: 8dc5b1925359cda44aa02e2ae0dbf608, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1611632} + - targetCorrespondingSourceObject: {fileID: 8391656370465289617, guid: 8dc5b1925359cda44aa02e2ae0dbf608, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1611631} m_SourcePrefab: {fileID: 100100000, guid: 8dc5b1925359cda44aa02e2ae0dbf608, type: 3} --- !u!1 &1493038971 GameObject: @@ -13352,7 +13921,6 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 267127505} - m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} @@ -13402,6 +13970,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 818062784429819336, guid: de050f8239afc414ca3482ec06e9aaaa, @@ -13471,6 +14040,17 @@ PrefabInstance: value: VideoCutsceneTrigger objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 5234678942078104764, guid: de050f8239afc414ca3482ec06e9aaaa, + type: 3} + insertIndex: -1 + addedObject: {fileID: 560566972} + - targetCorrespondingSourceObject: {fileID: 5234678942078104764, guid: de050f8239afc414ca3482ec06e9aaaa, + type: 3} + insertIndex: -1 + addedObject: {fileID: 560566973} m_SourcePrefab: {fileID: 100100000, guid: de050f8239afc414ca3482ec06e9aaaa, type: 3} --- !u!1 &1560100595 GameObject: @@ -13499,9 +14079,17 @@ SphereCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1560100595} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Radius: 0.5 m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1560100597 @@ -13521,6 +14109,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -13561,19 +14152,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1560100595} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -38.27, y: -1.1, z: 19.161} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 46 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1561256643 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 1267280949231532385, guid: dc99ca8ee3c2b0143a009d17e13de983, @@ -13637,6 +14229,9 @@ PrefabInstance: value: Dialogue Manager objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: dc99ca8ee3c2b0143a009d17e13de983, type: 3} --- !u!1 &1565274053 GameObject: @@ -13664,13 +14259,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1565274053} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -144.76407, y: 38.37765, z: 390.10657} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 421160340} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1565274055 MonoBehaviour: @@ -13702,9 +14297,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!81 &1565274056 AudioListener: m_ObjectHideFlags: 0 @@ -13727,9 +14333,17 @@ Camera: m_projectionMatrixMode: 1 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -13791,7 +14405,6 @@ RectTransform: m_Children: - {fileID: 267127505} m_Father: {fileID: 1913218046} - m_RootOrder: 16 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -13891,7 +14504,9 @@ Canvas: m_OverrideSorting: 0 m_OverridePixelPerfect: 0 m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 m_SortingLayerID: 0 m_SortingOrder: 0 m_TargetDisplay: 0 @@ -13918,6 +14533,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1572616910} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 23.70091, y: -19.514656, z: 44.518982} m_LocalScale: {x: 1, y: 1, z: 1} @@ -13929,8 +14545,44 @@ Transform: - {fileID: 4567367} - {fileID: 1363773143} m_Father: {fileID: 0} - m_RootOrder: 26 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!84 &1572866826 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 512 + m_Height: 512 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 90 + m_ColorFormat: 4 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 1 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 --- !u!21 &1597338093 Material: serializedVersion: 8 @@ -13941,6 +14593,8 @@ Material: m_Name: RestoreTestMat (Instance) m_Shader: {fileID: -6465566751694194690, guid: c3a68bf503c42b54d8456b563172476c, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_EMISSIVE m_InvalidKeywords: [] @@ -13949,7 +14603,9 @@ Material: m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} - disabledShaderPasses: [] + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -14068,11 +14724,13 @@ Material: - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1001 &1632339000 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 1469101499, guid: 0a07eaf716785d343b793ad05c9e9b12, type: 3} @@ -14140,6 +14798,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 0a07eaf716785d343b793ad05c9e9b12, type: 3} --- !u!1 &1643408858 GameObject: @@ -14186,13 +14847,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1643408858} + 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_RootOrder: 27 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1651311969 GameObject: @@ -14243,9 +14904,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!20 &1651311972 Camera: m_ObjectHideFlags: 0 @@ -14260,9 +14932,17 @@ Camera: m_projectionMatrixMode: 0 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -14279,7 +14959,7 @@ Camera: serializedVersion: 2 m_Bits: 1410332535 m_RenderingPath: -1 - m_TargetTexture: {fileID: 594289979} + m_TargetTexture: {fileID: 1796853559} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 @@ -14296,13 +14976,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1651311969} + serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -1.0239248, y: 0.39946875, z: -2.74} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 885468790} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1651311974 MonoBehaviour: @@ -14325,6 +15005,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 356981905, guid: fbfa4fe7080216843b09436e3f6bacfa, type: 3} @@ -14409,7 +15090,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4373936794591310677, guid: fbfa4fe7080216843b09436e3f6bacfa, type: 3} - propertyPath: m_Cameras.Array.data[0] + propertyPath: 'm_Cameras.Array.data[0]' value: objectReference: {fileID: 1237190503} - target: {fileID: 4373936794591310679, guid: fbfa4fe7080216843b09436e3f6bacfa, @@ -14423,6 +15104,9 @@ PrefabInstance: value: vThirdPersonCamera objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fbfa4fe7080216843b09436e3f6bacfa, type: 3} --- !u!1 &1671650931 GameObject: @@ -14451,9 +15135,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1671650931} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1671650933 @@ -14473,6 +15165,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14513,13 +15208,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1671650931} + serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: -11.38, y: -2.15, z: 32.747955} m_LocalScale: {x: 100, y: 1, z: 100} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1806682156} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1690122486 stripped MonoBehaviour: @@ -14538,6 +15233,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 4821156325998443017, guid: ae4b0695317d14919ac647ff1705692a, @@ -14601,6 +15297,9 @@ PrefabInstance: value: SaveSystem objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: ae4b0695317d14919ac647ff1705692a, type: 3} --- !u!1 &1713623232 GameObject: @@ -14855,9 +15554,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1713623232} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1713623235 @@ -14877,6 +15584,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -14917,19 +15627,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1713623232} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -47.63, y: -1.03, z: 12.22} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 42 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &1714629799 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 370822079094396682, guid: 43c06bb4a2fc7934ab89119e4d2da3e9, @@ -14998,6 +15709,9 @@ PrefabInstance: value: 6 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 43c06bb4a2fc7934ab89119e4d2da3e9, type: 3} --- !u!114 &1760836677 stripped MonoBehaviour: @@ -15019,12 +15733,58 @@ CapsuleCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1913218048} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 + serializedVersion: 2 m_Radius: 0.17 m_Height: 3.93 m_Direction: 0 m_Center: {x: 0, y: 0, z: 0} +--- !u!84 &1796853559 +RenderTexture: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: + m_ImageContentsHash: + serializedVersion: 2 + Hash: 00000000000000000000000000000000 + m_IsAlphaChannelOptional: 0 + serializedVersion: 6 + m_Width: 512 + m_Height: 512 + m_AntiAliasing: 1 + m_MipCount: -1 + m_DepthStencilFormat: 90 + m_ColorFormat: 4 + m_MipMap: 0 + m_GenerateMips: 1 + m_SRGB: 1 + m_UseDynamicScale: 0 + m_UseDynamicScaleExplicit: 0 + m_BindMS: 0 + m_EnableCompatibleFormat: 1 + m_EnableRandomWrite: 0 + m_TextureSettings: + serializedVersion: 2 + m_FilterMode: 1 + m_Aniso: 1 + m_MipBias: 0 + m_WrapU: 1 + m_WrapV: 1 + m_WrapW: 1 + m_Dimension: 2 + m_VolumeDepth: 1 + m_ShadowSamplingMode: 2 --- !u!21 &1804095114 Material: serializedVersion: 8 @@ -15035,6 +15795,8 @@ Material: m_Name: Boar (Instance) m_Shader: {fileID: -6465566751694194690, guid: 00a0b3897399f8b42a61a0333dd40ced, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_EMISSIVE - USEDISSOLVE_DONT_USE @@ -15049,6 +15811,7 @@ Material: RenderType: Transparent disabledShaderPasses: - DepthOnly + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -15189,6 +15952,7 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1 &1806682155 GameObject: m_ObjectHideFlags: 0 @@ -15212,6 +15976,7 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1806682155} + 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} @@ -15220,7 +15985,6 @@ Transform: - {fileID: 1671650935} - {fileID: 1059460069} m_Father: {fileID: 0} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1812159858 GameObject: @@ -15246,13 +16010,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1812159858} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -23.781025, y: 0.42973936, z: 10.22396} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 48 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &1812159860 MonoBehaviour: @@ -15299,7 +16063,6 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 267127505} - m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0.5} m_AnchorMax: {x: 0, y: 0.5} @@ -15349,6 +16112,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 334806193088322419, guid: 5b032ea3d671549499706ad50cd78cef, @@ -15467,6 +16231,9 @@ PrefabInstance: value: SkipCanvas objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 5b032ea3d671549499706ad50cd78cef, type: 3} --- !u!223 &1839688092 stripped Canvas: @@ -15479,6 +16246,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 4964792249494323536, guid: 7090f2a86c4f54fc8b4363cfb6e55c2b, @@ -15607,6 +16375,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 7090f2a86c4f54fc8b4363cfb6e55c2b, type: 3} --- !u!21 &1850694529 Material: @@ -15618,6 +16389,8 @@ Material: m_Name: Boar-fur (Instance) m_Shader: {fileID: -6465566751694194690, guid: 0903383556d5d480ea9be1741a8e6c21, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_METALNESS - USEDISSOLVE_DONT_USE @@ -15629,6 +16402,7 @@ Material: m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -15770,11 +16544,13 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1001 &1859296687 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: -8679921383154817045, guid: 40e14eebf106752499b89d8662838a60, @@ -15838,6 +16614,9 @@ PrefabInstance: value: Tree_Growing_New objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 40e14eebf106752499b89d8662838a60, type: 3} --- !u!1 &1870409346 GameObject: @@ -15866,9 +16645,17 @@ BoxCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1870409346} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Size: {x: 1, y: 1, z: 1} m_Center: {x: 0, y: 0, z: 0} --- !u!23 &1870409348 @@ -15888,6 +16675,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -15928,138 +16718,20 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1870409346} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -51.315933, y: 13.524885, z: 18.522875} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 47 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!21 &1872922175 -Material: - serializedVersion: 8 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: PortalMat (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) (Instance) - (Instance) - m_Shader: {fileID: -6465566751694194690, guid: f90138ae641de784cb4b453bdc734b14, - type: 3} - m_ValidKeywords: [] - m_InvalidKeywords: [] - m_LightmapFlags: 4 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BaseMap: - m_Texture: {fileID: 926908949} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _BumpMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _EmissionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MainTex: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MaskMap: - m_Texture: {fileID: 2800000, guid: 84487d73ca4b791498332d8f6858417f, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _NormalMap: - m_Texture: {fileID: 2800000, guid: 9d67afb2ebc87cc43b5be99e1b689960, type: 3} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _SpecGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _Texture2DAsset_EAC75755_Out_0: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_Lightmaps: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_LightmapsInd: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - unity_ShadowMasks: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Ints: [] - m_Floats: - - _AlphaClip: 0 - - _Blend: 0 - - _BumpScale: 1 - - _Cull: 2 - - _Cutoff: 0.5 - - _DstBlend: 0 - - _EnvironmentReflections: 1 - - _GlossMapScale: 0 - - _Glossiness: 0 - - _GlossyReflections: 0 - - _Metallic: 0 - - _NormalSpeed: 0.36 - - _NormalStrength: 0.49 - - _NormalTiling: 0.41 - - _OcclusionStrength: 1 - - _OffsetStrength: 0.1 - - _PortalBrightness: 2 - - _QueueControl: 0 - - _QueueOffset: 0 - - _ReceiveShadows: 1 - - _Smoothness: 0.5 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _Speed: 0.5 - - _SrcBlend: 1 - - _Surface: 0 - - _TwirlPower: 8 - - _WorkflowMode: 1 - - _ZWrite: 1 - m_Colors: - - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EffectColor: {r: 0, g: 0.7548079, b: 1, a: 0} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} - m_BuildTextureStacks: [] --- !u!1001 &1873962921 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 313343602518199248, guid: 1b0e088ca7a974f43a79e833fd087295, @@ -16123,12 +16795,16 @@ PrefabInstance: value: -185.007 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 1b0e088ca7a974f43a79e833fd087295, type: 3} --- !u!1001 &1913218044 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 2433366087252413612, guid: eaedb30bf7ca8b3488cbd33b6ae89686, @@ -16197,6 +16873,45 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: 2433366087252413612, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1571562798} + - targetCorrespondingSourceObject: {fileID: 2433366087252413612, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 910685943} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 3066631649503073814, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218054} + - targetCorrespondingSourceObject: {fileID: 3066631649503073814, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218049} + - targetCorrespondingSourceObject: {fileID: 3066631649503073814, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218050} + - targetCorrespondingSourceObject: {fileID: 3066631649503073814, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218051} + - targetCorrespondingSourceObject: {fileID: 3066631649503073814, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218053} + - targetCorrespondingSourceObject: {fileID: 191063161219884462, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1792886732} + - targetCorrespondingSourceObject: {fileID: 4899821710696506200, guid: eaedb30bf7ca8b3488cbd33b6ae89686, + type: 3} + insertIndex: -1 + addedObject: {fileID: 1913218052} m_SourcePrefab: {fileID: 100100000, guid: eaedb30bf7ca8b3488cbd33b6ae89686, type: 3} --- !u!1 &1913218045 stripped GameObject: @@ -16224,7 +16939,7 @@ GameObject: m_PrefabAsset: {fileID: 0} --- !u!95 &1913218049 Animator: - serializedVersion: 4 + serializedVersion: 7 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} @@ -16238,10 +16953,12 @@ Animator: m_ApplyRootMotion: 0 m_LinearVelocityBlending: 0 m_StabilizeFeet: 0 + m_AnimatePhysics: 0 m_WarningMessage: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 + m_KeepAnimatorStateOnDisable: 0 + m_WriteDefaultValuesOnDisable: 0 --- !u!114 &1913218050 MonoBehaviour: m_ObjectHideFlags: 0 @@ -16978,8 +17695,17 @@ CapsuleCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1913218045} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 1 + m_ProvidesContacts: 0 m_Enabled: 1 + serializedVersion: 2 m_Radius: 1.77 m_Height: 2.13 m_Direction: 2 @@ -16989,6 +17715,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 3563506235280960987, guid: 91d75d0e4c2d46340b875dddc29767f5, @@ -17052,6 +17779,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 91d75d0e4c2d46340b875dddc29767f5, type: 3} --- !u!21 &1978211000 Material: @@ -17063,6 +17793,8 @@ Material: m_Name: Boar-fur (Instance) m_Shader: {fileID: -6465566751694194690, guid: 0903383556d5d480ea9be1741a8e6c21, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 m_ValidKeywords: - BASETEXTYPE_ALBEDO_METALNESS - USEDISSOLVE_DONT_USE @@ -17074,6 +17806,7 @@ Material: m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -17215,11 +17948,13 @@ Material: - _ScanWaveColor: {r: 0, g: 0.5949242, b: 1, a: 0} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!1001 &1989563903 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 1116967529, guid: 111f99aa5bba3d048b7db7e69c8d886d, type: 3} @@ -17332,6 +18067,9 @@ PrefabInstance: value: 1 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 111f99aa5bba3d048b7db7e69c8d886d, type: 3} --- !u!1 &2071722877 GameObject: @@ -17359,13 +18097,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2071722877} + serializedVersion: 2 m_LocalRotation: {x: -0, y: 0.0000000037252899, z: -0, w: 1} m_LocalPosition: {x: -1.0239248, y: 0.39946875, z: -3.2170925} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1272116025} - m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &2071722879 MonoBehaviour: @@ -17413,9 +18151,20 @@ MonoBehaviour: m_Dithering: 0 m_ClearDepth: 1 m_AllowXRRendering: 1 + m_AllowHDROutput: 1 + m_UseScreenCoordOverride: 0 + m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0} + m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0} m_RequiresDepthTexture: 0 m_RequiresColorTexture: 0 m_Version: 2 + m_TaaSettings: + m_Quality: 3 + m_FrameInfluence: 0.1 + m_JitterScale: 1 + m_MipBias: 0 + m_VarianceClampScale: 0.9 + m_ContrastAdaptiveSharpening: 0 --- !u!20 &2071722882 Camera: m_ObjectHideFlags: 0 @@ -17430,9 +18179,17 @@ Camera: m_projectionMatrixMode: 0 m_GateFitMode: 2 m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 m_SensorSize: {x: 36, y: 24} m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 m_NormalizedViewPortRect: serializedVersion: 2 x: 0 @@ -17449,7 +18206,7 @@ Camera: serializedVersion: 2 m_Bits: 1410332535 m_RenderingPath: -1 - m_TargetTexture: {fileID: 926908949} + m_TargetTexture: {fileID: 1572866826} m_TargetDisplay: 0 m_TargetEye: 3 m_HDR: 1 @@ -17464,6 +18221,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 6692236139593661703, guid: 17ff9563aca45b14e9a346222591778e, @@ -17527,6 +18285,9 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 17ff9563aca45b14e9a346222591778e, type: 3} --- !u!1 &2088853932 GameObject: @@ -17555,9 +18316,17 @@ SphereCollider: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2088853932} m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 m_IsTrigger: 0 + m_ProvidesContacts: 0 m_Enabled: 1 - serializedVersion: 2 + serializedVersion: 3 m_Radius: 0.5 m_Center: {x: 0, y: 0, z: 0} --- !u!23 &2088853934 @@ -17577,6 +18346,9 @@ MeshRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 2 m_RayTraceProcedural: 0 + m_RayTracingAccelStructBuildFlagsOverride: 0 + m_RayTracingAccelStructBuildFlags: 1 + m_SmallMeshCulling: 1 m_RenderingLayerMask: 1 m_RendererPriority: 0 m_Materials: @@ -17617,13 +18389,13 @@ Transform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 2088853932} + serializedVersion: 2 m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: -47.717, y: -1.1, z: 18.28} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 0} - m_RootOrder: 44 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!4 &543450652227933697 stripped Transform: @@ -17636,6 +18408,7 @@ PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 1712789601196705698, guid: 94a97b8f2e4ad46bea6772b98b87fed9, @@ -17699,12 +18472,16 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 94a97b8f2e4ad46bea6772b98b87fed9, type: 3} --- !u!1001 &4218401739883287753 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 0} m_Modifications: - target: {fileID: 3912414050132569390, guid: b2b5974df0875904a9cb6d3284e2ffe1, @@ -17720,7 +18497,7 @@ PrefabInstance: type: 3} - target: {fileID: 4218401739883287759, guid: b2b5974df0875904a9cb6d3284e2ffe1, type: 3} - propertyPath: m_Animations.Array.data[0] + propertyPath: 'm_Animations.Array.data[0]' value: objectReference: {fileID: 1827226128182048838, guid: 6d79008c3e86b1841a79717f32950620, type: 3} @@ -17780,12 +18557,16 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: b2b5974df0875904a9cb6d3284e2ffe1, type: 3} --- !u!1001 &5066865890679974480 PrefabInstance: m_ObjectHideFlags: 0 serializedVersion: 2 m_Modification: + serializedVersion: 3 m_TransformParent: {fileID: 1572616911} m_Modifications: - target: {fileID: 4745570059773410385, guid: 522b5cc88fa2e734b87247785b85c8fb, @@ -17854,4 +18635,62 @@ PrefabInstance: value: 0 objectReference: {fileID: 0} m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: 522b5cc88fa2e734b87247785b85c8fb, type: 3} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 1714629799} + - {fileID: 829254892} + - {fileID: 1806682156} + - {fileID: 83562449} + - {fileID: 891528246} + - {fileID: 8384995} + - {fileID: 209249256} + - {fileID: 1510080793} + - {fileID: 502518011} + - {fileID: 1873962921} + - {fileID: 1415194265} + - {fileID: 1859296687} + - {fileID: 2087878429} + - {fileID: 942497537} + - {fileID: 1948251097} + - {fileID: 4218401739883287753} + - {fileID: 1632339000} + - {fileID: 1695683099488400904} + - {fileID: 1989563903} + - {fileID: 1448060498} + - {fileID: 1159244355} + - {fileID: 164591705} + - {fileID: 587047411} + - {fileID: 775315289} + - {fileID: 156773214} + - {fileID: 540906068} + - {fileID: 1572616911} + - {fileID: 1643408860} + - {fileID: 1913218044} + - {fileID: 1561256643} + - {fileID: 996612905} + - {fileID: 1665061853} + - {fileID: 421160340} + - {fileID: 1830863377} + - {fileID: 307138753} + - {fileID: 1848535792} + - {fileID: 1704207391} + - {fileID: 1307530043} + - {fileID: 389323221} + - {fileID: 776414548} + - {fileID: 799801481} + - {fileID: 42401869} + - {fileID: 1713623237} + - {fileID: 454988608} + - {fileID: 2088853936} + - {fileID: 1427986067} + - {fileID: 1560100599} + - {fileID: 1870409350} + - {fileID: 1812159859} + - {fileID: 939335672} + - {fileID: 890901947} diff --git a/Assets/ThirdParty/PARTICLES/EffectExamples/Fire & Explosion Effects/Materials/SmokeDark.mat b/Assets/ThirdParty/PARTICLES/EffectExamples/Fire & Explosion Effects/Materials/SmokeDark.mat index 5f15fea0a..cc617c456 100644 --- a/Assets/ThirdParty/PARTICLES/EffectExamples/Fire & Explosion Effects/Materials/SmokeDark.mat +++ b/Assets/ThirdParty/PARTICLES/EffectExamples/Fire & Explosion Effects/Materials/SmokeDark.mat @@ -130,7 +130,7 @@ Material: - _BaseColor: {r: 1, g: 0.524691, b: 0.07075471, a: 0.48235294} - _BaseColorAddSubDiff: {r: 0, g: 0, b: 0, a: 0} - _CameraFadeParams: {r: 0, g: Infinity, b: 0, a: 0} - - _Color: {r: 1, g: 0.524691, b: 0.070754685, a: 0.48235294} + - _Color: {r: 1, g: 0.5246909, b: 0.070754685, a: 0.48235294} - _EmisColor: {r: 0, g: 0, b: 0, a: 0} - _EmissionColor: {r: 0.030037379, g: 0.045851335, b: 0.14150941, a: 1} - _SoftParticleFadeParams: {r: 0, g: 1, b: 0, a: 0} diff --git a/Assets/ThirdParty/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset b/Assets/ThirdParty/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset old mode 100755 new mode 100644 index 70c5d6168..69b95ee61 --- a/Assets/ThirdParty/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset +++ b/Assets/ThirdParty/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset @@ -2,20 +2,24 @@ %TAG !u! tag:unity3d.com,2011: --- !u!21 &2180264 Material: - serializedVersion: 6 + serializedVersion: 8 m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: LiberationSans SDF Material m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} - m_ShaderKeywords: + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] m_LightmapFlags: 1 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} disabledShaderPasses: [] + m_LockedProperties: m_SavedProperties: serializedVersion: 3 m_TexEnvs: @@ -67,6 +71,7 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + m_Ints: [] m_Floats: - _Ambient: 0.5 - _Bevel: 0.5 @@ -107,9 +112,9 @@ Material: - _Parallax: 0.02 - _PerspectiveFilter: 0.875 - _Reflectivity: 10 - - _ScaleRatioA: 0.90909094 + - _ScaleRatioA: 0.9 - _ScaleRatioB: 0.73125 - - _ScaleRatioC: 0.7386364 + - _ScaleRatioC: 0.73125 - _ScaleX: 1 - _ScaleY: 1 - _ShaderFlags: 0 @@ -148,6 +153,8 @@ Material: - _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} - _SpecularColor: {r: 1, g: 1, b: 1, a: 1} - _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} + m_BuildTextureStacks: [] + m_AllowLocking: 1 --- !u!114 &11400000 MonoBehaviour: m_ObjectHideFlags: 0 @@ -161,17 +168,13 @@ MonoBehaviour: m_Name: LiberationSans SDF - Fallback m_EditorClassIdentifier: m_Version: 1.1.0 - m_Material: {fileID: 2180264} - m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75 - m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3} - m_AtlasPopulationMode: 1 - InternalDynamicOS: 0 m_FaceInfo: m_FaceIndex: 0 m_FamilyName: Liberation Sans m_StyleName: Regular m_PointSize: 86 m_Scale: 1 + m_UnitsPerEM: 2048 m_LineHeight: 98.8916 m_AscentLine: 77.853516 m_CapLine: 59 @@ -187,57 +190,8 @@ MonoBehaviour: m_StrikethroughOffset: 18 m_StrikethroughThickness: 6.298828 m_TabWidth: 24 - m_GlyphTable: [] - m_CharacterTable: [] - m_AtlasTextures: - - {fileID: 28268798066460806} - m_AtlasTextureIndex: 0 - m_IsMultiAtlasTexturesEnabled: 1 - m_ClearDynamicDataOnBuild: 1 - m_UsedGlyphRects: [] - m_FreeGlyphRects: - - m_X: 0 - m_Y: 0 - m_Width: 511 - m_Height: 511 - m_fontInfo: - Name: Liberation Sans - PointSize: 86 - Scale: 1 - CharacterCount: 250 - LineHeight: 98.90625 - Baseline: 0 - Ascender: 77.84375 - CapHeight: 59.1875 - Descender: -18.21875 - CenterLine: 0 - SuperscriptOffset: 77.84375 - SubscriptOffset: -12.261719 - SubSize: 0.5 - Underline: -12.261719 - UnderlineThickness: 6.298828 - strikethrough: 23.675 - strikethroughThickness: 0 - TabWidth: 239.0625 - Padding: 9 - AtlasWidth: 1024 - AtlasHeight: 1024 - atlas: {fileID: 0} - m_AtlasWidth: 512 - m_AtlasHeight: 512 - m_AtlasPadding: 9 - m_AtlasRenderMode: 4169 - m_glyphInfoList: [] - m_KerningTable: - kerningPairs: [] - m_FontFeatureTable: - m_MultipleSubstitutionRecords: [] - m_LigatureSubstitutionRecords: [] - m_GlyphPairAdjustmentRecords: [] - m_MarkToBaseAdjustmentRecords: [] - m_MarkToMarkAdjustmentRecords: [] - fallbackFontAssets: [] - m_FallbackFontAssetTable: [] + m_Material: {fileID: 2180264} + m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75 m_CreationSettings: sourceFontFileName: sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75 @@ -257,6 +211,36 @@ MonoBehaviour: fontStyleModifier: 0 renderMode: 4169 includeFontFeatures: 1 + m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3} + m_SourceFontFilePath: + m_AtlasPopulationMode: 1 + InternalDynamicOS: 0 + m_GlyphTable: [] + m_CharacterTable: [] + m_AtlasTextures: + - {fileID: 28268798066460806} + m_AtlasTextureIndex: 0 + m_IsMultiAtlasTexturesEnabled: 1 + m_GetFontFeatures: 1 + m_ClearDynamicDataOnBuild: 1 + m_AtlasWidth: 512 + m_AtlasHeight: 512 + m_AtlasPadding: 9 + m_AtlasRenderMode: 4169 + m_UsedGlyphRects: [] + m_FreeGlyphRects: + - m_X: 0 + m_Y: 0 + m_Width: 511 + m_Height: 511 + m_FontFeatureTable: + m_MultipleSubstitutionRecords: [] + m_LigatureSubstitutionRecords: [] + m_GlyphPairAdjustmentRecords: [] + m_MarkToBaseAdjustmentRecords: [] + m_MarkToMarkAdjustmentRecords: [] + m_ShouldReimportFontFeatures: 0 + m_FallbackFontAssetTable: [] m_FontWeightTable: - regularTypeface: {fileID: 0} italicTypeface: {fileID: 0} @@ -305,6 +289,33 @@ MonoBehaviour: boldSpacing: 7 italicStyle: 35 tabSize: 10 + m_fontInfo: + Name: Liberation Sans + PointSize: 86 + Scale: 1 + CharacterCount: 250 + LineHeight: 98.90625 + Baseline: 0 + Ascender: 77.84375 + CapHeight: 59.1875 + Descender: -18.21875 + CenterLine: 0 + SuperscriptOffset: 77.84375 + SubscriptOffset: -12.261719 + SubSize: 0.5 + Underline: -12.261719 + UnderlineThickness: 6.298828 + strikethrough: 23.675 + strikethroughThickness: 0 + TabWidth: 239.0625 + Padding: 9 + AtlasWidth: 1024 + AtlasHeight: 1024 + m_glyphInfoList: [] + m_KerningTable: + kerningPairs: [] + fallbackFontAssets: [] + atlas: {fileID: 0} --- !u!28 &28268798066460806 Texture2D: m_ObjectHideFlags: 0 @@ -315,17 +326,21 @@ Texture2D: m_ImageContentsHash: serializedVersion: 2 Hash: 00000000000000000000000000000000 - m_ForcedFallbackFormat: 4 - m_DownscaleFallback: 0 - serializedVersion: 2 - m_Width: 0 - m_Height: 0 - m_CompleteImageSize: 0 + m_IsAlphaChannelOptional: 0 + serializedVersion: 3 + m_Width: 1 + m_Height: 1 + m_CompleteImageSize: 1 + m_MipsStripped: 0 m_TextureFormat: 1 m_MipCount: 1 m_IsReadable: 1 + m_IsPreProcessed: 0 + m_IgnoreMipmapLimit: 0 + m_MipmapLimitGroupName: m_StreamingMipmaps: 0 m_StreamingMipmapsPriority: 0 + m_VTOnly: 0 m_AlphaIsTransparency: 0 m_ImageCount: 1 m_TextureDimension: 2 @@ -339,9 +354,11 @@ Texture2D: m_WrapW: 0 m_LightmapFormat: 0 m_ColorSpace: 0 - image data: 0 - _typelessdata: + m_PlatformBlob: + image data: 1 + _typelessdata: 00 m_StreamData: + serializedVersion: 2 offset: 0 size: 0 path: diff --git a/Dialogues/Dialogue_en.csv b/Dialogues/Dialogue_en.csv new file mode 100644 index 000000000..975b52d88 --- /dev/null +++ b/Dialogues/Dialogue_en.csv @@ -0,0 +1,105 @@ +en +Conversation ID,Entry ID,Actor,Original Text,Translated Text [en],Original Menu,Translated Menu [en],Description +1,0,Bascileus,,,,, +1,1,Shamar,It was foretold that a mighty warrior would be the one to find the banished Lord and restore him to his throne. It was also said that only this “foretold-one” would find access to the King’s special Garden.... And here you are.,,,, +1,2,Bascileus,Yes,,,, +1,3,Bascileus,,,No,, +2,0,Bascileus,,,,, +2,1,Nahal,"Bascileus, we need to go to gardener. He will tell us what to do.",,,, +2,2,Bascileus,Let's do it.,,,, +3,0,Bascileus,,,,, +3,1,Shamar,Hi Bascileus!,,,, +3,2,Bascileus,How do you know my name?,,,, +3,3,Shamar,"Well, you very much look like Bascileus. I need you to do me a favour. Can you bring me 3 little boxes?",,,, +3,7,Shamar,Thank you Bascileus! I will make a stack!,,,, +3,8,Bascileus,I am on it,,,, +3,9,Bascileus,I have found [var=BoxesCollected].,,,, +3,10,Bascileus,"Wow, that sound fun! ",,,, +3,11,Shamar,Have you found all the boxes?,,,, +3,12,Bascileus,"Fine, I have nothing better to do anyways...",,,, +3,13,Shamar,I need all 3.,,,, +3,14,Shamar,Great job! Thank you! I can't wait to play with them!,,,, +4,0,Bascileus,,,,, +4,1,Not Assigned,Water.... I have to try.,,,, +5,0,Bascileus,,,,, +5,1,Gigant,Who goes there?,,,, +5,2,Bascileus,,,None of your business.,, +5,3,Bascileus,,,Nobody.,, +6,0,Bascileus,,,,, +6,1,Shamar,"Bascileus, the Temple is now surrounded by the devastated and very dangerous Dark Wood. It would not be wise for you to venture there looking for the Temple. It’s much too dangerous.",,,, +6,2,Bascileus,I don’t take kindly to orders.” (arrogance) ,,I don’t take kindly to orders.” (arrogance) ,, +6,3,Bascileus,"Believe me, I have no interest in a Temple” (lie) ",,"Believe me, I have no interest in a Temple” (lie) ",, +7,0,Bascileus,,,,, +7,1,Shamar,"Hej, tak wygladaja ustawienia kamy z wykozystaniem defaultowych kadrow stworzonych przez DialogueSystem oraz wykozystanie animacji. Aktualnie zblizenie.",,,, +7,2,Bascileus,Tak wyglada kamera z prawej strony z nad ramienia.,,Z nad ramienia,, +7,3,Shamar,Tak wyglada kadr o nazwie Medium right,,,, +7,4,Bascileus,TEraz zaprezentuje kadr pełny i popatrze sie w prawo,,Pokaz kadr pełny,, +7,5,Shamar,"Ładny, ja zaprezentuje ci kadr z góry ",,,, +7,6,Bascileus,"Yooooo a ten kadr szeroki, swietny",,Pokaz kadr szeroki,, +7,7,Shamar,"Dobra juz nie przesadzajmy, ten kadr teraz to pelny z prawej strony",,,, +7,8,Bascileus,,,Dobra konczmy juz ta zabawe,, +8,0,Not Assigned,,,,, +8,1,Bascileus,"I don’t need some “warring angel” taking care of me - I’m not afraid of any id. He marked me? Let’s see how fast his bony soldiers run once I mark them with my sword!… I can handle myself, but first-things-first – a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",,"⦁(angry, proud) I don’t need some “warring angel” ",, +8,2,Bascileus,"I don’t like this place,… and it certainly doesn’t like me…. Giants I understand. This place… well, it’s just plain weird. I’m going back where I’m more suited. Have some fun. Find a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",,"⦁(offended, accusive) I don’t like this place… ",, +8,3,FakeBascileus,,,Hmm...,, +9,0,Beggar,,,,, +9,1,Beggar,Sir! Can you spare some coins for a poor beggar?”,,,, +9,2,Bascileus,Do I look like I’ve got money? I’m as destitute as\r you. ,,(arrogantly) Do I look like I’ve got money?,, +9,3,Bascileus,Here. But this is all\r I can spare.,,(Give money) Here. But this is all\r I can spare.,, +9,5,Beggar,"Thank you kind, sir.",,,, +9,6,Bascileus,What happened to this place?,,What happened to this place?,, +9,7,Beggar,The war with Shadow Dragon…. Then came the Giants proclaiming lordship and demanding servitude. Our young warriors refused… grabbed their swords…. It was a massacre. The youth not killed were taken captive - the elderly who managed to hide forced to live off the mercy of strangers.,,,, +9,8,Bascileus,Were all the villages destroyed?\r,,Were all the villages destroyed?\r,, +9,9,Beggar,"Not if they surrendered. But those villagers slave under hard labor, riddled with disease, still hoping for the return of Vasileian, the great Tritellurian banished from these lands by Shadow Dragon.",,,, +9,10,Bascileus,"Yes. I’ve heard of the great Vasileian. Didn’t work out too well for you though, did it? Take care, old man.",,(chuckles sarcastically) Yes. I’ve heard of the great Vasileian. ,, +10,0,Shamar,,,,, +10,1,Bascileus,How do you know I took a sword from the Temple? Is there anything you don’t know?,,How do you know I took a sword from the Temple?,, +10,2,Shamar,...,,,, +10,3,Bascileus,I found it. I need to keep it to protect myself.,,I found it. I need to keep it to protect myself.,, +10,4,Bascileus,"I’m sorry. I took it without asking. But why, after all this time, \rare you taking it back now?",,I’m sorry. I took it without asking.,, +10,5,Shamar,"Bascileus, you must surrender the sword to receive\r\r\njustice in the court.",,,, +10,6,Shamar,I knew you would need it to protect yourself against the servants\r\r\nof id. But trusting King Kreos in court will put you under his\r\r\nprotection and you will no longer need it.,,,, +10,7,Bascileus,"In that case, please take it back",,"In that case, please take it back",, +10,8,Shamar,"You ‘ve made the right decision Bascileus, now take some time,\r\nget some rest, you can always find me in the garden, then we arrange for\r\nthe journey to the court of justice.",,,, +10,9,Shamar,"But before you go to court, you need to give me the sword you took from the Temple.",,,, +11,0,Bascileus,,,,, +11,1,Bascileus,"I don’t like the looks of this place. I’m actually glad you’re here, Darshuvial.",,I don’t like the looks of this place.,, +11,2,Darshuvial,"I’m sorry, Bascileus. This you must do\r alone.",,,, +12,0,Bascileus,,,,, +12,1,Shamar,I have to confess my sins. Please take me to the Court.,,I have to confess my sins.,, +12,2,Bascileus,Glad to here that.,,,, +13,0,Bascileus,,,,, +14,0,Bascileus,,,,, +14,1,Shamar,"Because you are officially Lord Protectorate of the Lands, it’s time \ryou’re trained and prepared to take back the Temple. King Kreos has sent a gift in honor of your new title – the sword you took from the Temple, but now remastered by his royal craftsmen and \rinfused with the quantum power of light… Let’s see if you can handle it",,,, +14,2,Bascileus," (overwhelmed) I’ve heard the stories of the Tritellurians’  \rswords… handcrafted in the secret forge of Zion…  capable of drawing power directly from light! But I never thought I would be the owner of something so magnificent, so powerful…. I know the \rtraining for this will be challenging, but heady all the same!",,(overwhelmed) I’ve heard the stories of the Tritellurians’ swords…,, +14,3,Shamar,"Excellent spirit, Bascileus. Now that you’re able to use the power \rof light in the power scrolls, it’s time to practice. Meet me in the\r Grove of Remembrance.",,,, +15,0,Bascileus,,,,, +15,1,Shamar,"You’ve learned much, Bascileus, but now, before you take back the Temple, you must learn the function of its artefacts and the proper way to approach the Inner Sanctum. ",,,, +15,2,Bascileus,Whatever I must learn. Vasileian’s Temple must be taken back. ,,Whatever I must learn.,, +15,3,Shamar,"Excellent. You will find the needed information in the scroll entitled Protocols of Temple Engagement in the Chamber of Ancient Scrolls. But before you go, there’s one more thing I\r must show you…",,,, +16,0,Bascileus,,,,, +16,1,Shamar,,,,, +16,2,Bascileus,What did you just do?! Where did this house come from?!,,What did you just do?!,, +16,3,Shamar,There’re ways to hide things in plain sight… which you’ll learn\r one day….,,,, +16,4,Bascileus,Makes me wonder what else is hidden here.,,Makes me wonder what else is hidden here.,, +16,5,Shamar,Vasiliean did manage to hide treasure somewhere near here\r before he was banished. \rTose Power Scrolls are my gift. They will give you a one-time ability\r to see into a realm now invisible to you… so use them carefully. ,,,, +16,6,Bascileus,,,,, +17,0,Bascileus,,,,, +17,1,Darshuvial,"Good work, Bascileus. Now you can purchase various \rtypes of Power Scrolls in the Chamber of Ancient Scrolls. \rThe battle with id will require power beyond what is\r currently yours.",,,, +17,2,Bascileus,,,(Teleport to Scrolls Chamber),, +18,0,Bascileus,,,,, +18,1,Bascileus,You saw what happened to me last time. This time I need you\r inside the Temple when id gets riled up.,,You saw what happened to me last time.,, +18,2,Darshuvial,"My apologies, Bascileus. You must face id alone. But be\r of good faith. Though id has deduced that you would return and,\r therefore, getting inside will not be as easy, this time you are\r prepared. And to add to your readiness, Shamar has sent you\r Vasiliean’s prized armor – he said Vasiliean would want you to\r have it…. Now, it’s time, my friend…. And keep in mind, some\r of the protocols for entering the Inner Sanctum will not apply until\r after you’ve taken back the Temple.",,,, +19,0,Bascileus,,,,, +19,1,Hannah,Yes?,,,, +20,0,Bascileus,,,,, +20,1,Portal,Hmm where should i go now....,,,, +20,2,Bascileus,Garden Oasis,,,, +20,3,Bascileus,Wasteland,,,, +20,4,Bascileus,River Valley,,,, +20,5,Bascileus,Court Of Justice,,,, +20,6,Bascileus,Chamber Of Ancient Scrolls,,,, +20,7,Bascileus,Temple,,,, +20,8,Bascileus,Never mind,,,, +21,0,Bascileus,,,,, +21,1,Bascileus,What land is this with spiders as big as dogs?,,,, diff --git a/Dialogues/Dialogue_pl.csv b/Dialogues/Dialogue_pl.csv new file mode 100644 index 000000000..66a6c3f05 --- /dev/null +++ b/Dialogues/Dialogue_pl.csv @@ -0,0 +1,105 @@ +pl +Conversation ID,Entry ID,Actor,Original Text,Translated Text [pl],Original Menu,Translated Menu [pl],Description +1,0,Bascileus,,,,, +1,1,Shamar,It was foretold that a mighty warrior would be the one to find the banished Lord and restore him to his throne. It was also said that only this “foretold-one” would find access to the King’s special Garden.... And here you are.,,,, +1,2,Bascileus,Yes,,,, +1,3,Bascileus,,,No,, +2,0,Bascileus,,,,, +2,1,Nahal,"Bascileus, we need to go to gardener. He will tell us what to do.",,,, +2,2,Bascileus,Let's do it.,,,, +3,0,Bascileus,,,,, +3,1,Shamar,Hi Bascileus!,,,, +3,2,Bascileus,How do you know my name?,,,, +3,3,Shamar,"Well, you very much look like Bascileus. I need you to do me a favour. Can you bring me 3 little boxes?",,,, +3,7,Shamar,Thank you Bascileus! I will make a stack!,,,, +3,8,Bascileus,I am on it,,,, +3,9,Bascileus,I have found [var=BoxesCollected].,,,, +3,10,Bascileus,"Wow, that sound fun! ",,,, +3,11,Shamar,Have you found all the boxes?,,,, +3,12,Bascileus,"Fine, I have nothing better to do anyways...",,,, +3,13,Shamar,I need all 3.,,,, +3,14,Shamar,Great job! Thank you! I can't wait to play with them!,,,, +4,0,Bascileus,,,,, +4,1,Not Assigned,Water.... I have to try.,,,, +5,0,Bascileus,,,,, +5,1,Gigant,Who goes there?,,,, +5,2,Bascileus,,,None of your business.,, +5,3,Bascileus,,,Nobody.,, +6,0,Bascileus,,,,, +6,1,Shamar,"Bascileus, the Temple is now surrounded by the devastated and very dangerous Dark Wood. It would not be wise for you to venture there looking for the Temple. It’s much too dangerous.",,,, +6,2,Bascileus,I don’t take kindly to orders.” (arrogance) ,,I don’t take kindly to orders.” (arrogance) ,, +6,3,Bascileus,"Believe me, I have no interest in a Temple” (lie) ",,"Believe me, I have no interest in a Temple” (lie) ",, +7,0,Bascileus,,,,, +7,1,Shamar,"Hej, tak wygladaja ustawienia kamy z wykozystaniem defaultowych kadrow stworzonych przez DialogueSystem oraz wykozystanie animacji. Aktualnie zblizenie.",,,, +7,2,Bascileus,Tak wyglada kamera z prawej strony z nad ramienia.,,Z nad ramienia,, +7,3,Shamar,Tak wyglada kadr o nazwie Medium right,,,, +7,4,Bascileus,TEraz zaprezentuje kadr pełny i popatrze sie w prawo,,Pokaz kadr pełny,, +7,5,Shamar,"Ładny, ja zaprezentuje ci kadr z góry ",,,, +7,6,Bascileus,"Yooooo a ten kadr szeroki, swietny",,Pokaz kadr szeroki,, +7,7,Shamar,"Dobra juz nie przesadzajmy, ten kadr teraz to pelny z prawej strony",,,, +7,8,Bascileus,,,Dobra konczmy juz ta zabawe,, +8,0,Not Assigned,,,,, +8,1,Bascileus,"I don’t need some “warring angel” taking care of me - I’m not afraid of any id. He marked me? Let’s see how fast his bony soldiers run once I mark them with my sword!… I can handle myself, but first-things-first – a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",,"⦁(angry, proud) I don’t need some “warring angel” ",, +8,2,Bascileus,"I don’t like this place,… and it certainly doesn’t like me…. Giants I understand. This place… well, it’s just plain weird. I’m going back where I’m more suited. Have some fun. Find a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",,"⦁(offended, accusive) I don’t like this place… ",, +8,3,FakeBascileus,,,Hmm...,, +9,0,Beggar,,,,, +9,1,Beggar,Sir! Can you spare some coins for a poor beggar?”,,,, +9,2,Bascileus,Do I look like I’ve got money? I’m as destitute as\r you. ,,(arrogantly) Do I look like I’ve got money?,, +9,3,Bascileus,Here. But this is all\r I can spare.,,(Give money) Here. But this is all\r I can spare.,, +9,5,Beggar,"Thank you kind, sir.",,,, +9,6,Bascileus,What happened to this place?,,What happened to this place?,, +9,7,Beggar,The war with Shadow Dragon…. Then came the Giants proclaiming lordship and demanding servitude. Our young warriors refused… grabbed their swords…. It was a massacre. The youth not killed were taken captive - the elderly who managed to hide forced to live off the mercy of strangers.,,,, +9,8,Bascileus,Were all the villages destroyed?\r,,Were all the villages destroyed?\r,, +9,9,Beggar,"Not if they surrendered. But those villagers slave under hard labor, riddled with disease, still hoping for the return of Vasileian, the great Tritellurian banished from these lands by Shadow Dragon.",,,, +9,10,Bascileus,"Yes. I’ve heard of the great Vasileian. Didn’t work out too well for you though, did it? Take care, old man.",,(chuckles sarcastically) Yes. I’ve heard of the great Vasileian. ,, +10,0,Shamar,,,,, +10,1,Bascileus,How do you know I took a sword from the Temple? Is there anything you don’t know?,,How do you know I took a sword from the Temple?,, +10,2,Shamar,...,,,, +10,3,Bascileus,I found it. I need to keep it to protect myself.,,I found it. I need to keep it to protect myself.,, +10,4,Bascileus,"I’m sorry. I took it without asking. But why, after all this time, \rare you taking it back now?",,I’m sorry. I took it without asking.,, +10,5,Shamar,"Bascileus, you must surrender the sword to receive\r\r\njustice in the court.",,,, +10,6,Shamar,I knew you would need it to protect yourself against the servants\r\r\nof id. But trusting King Kreos in court will put you under his\r\r\nprotection and you will no longer need it.,,,, +10,7,Bascileus,"In that case, please take it back",,"In that case, please take it back",, +10,8,Shamar,"You ‘ve made the right decision Bascileus, now take some time,\r\nget some rest, you can always find me in the garden, then we arrange for\r\nthe journey to the court of justice.",,,, +10,9,Shamar,"But before you go to court, you need to give me the sword you took from the Temple.",,,, +11,0,Bascileus,,,,, +11,1,Bascileus,"I don’t like the looks of this place. I’m actually glad you’re here, Darshuvial.",,I don’t like the looks of this place.,, +11,2,Darshuvial,"I’m sorry, Bascileus. This you must do\r alone.",,,, +12,0,Bascileus,,,,, +12,1,Shamar,I have to confess my sins. Please take me to the Court.,,I have to confess my sins.,, +12,2,Bascileus,Glad to here that.,,,, +13,0,Bascileus,,,,, +14,0,Bascileus,,,,, +14,1,Shamar,"Because you are officially Lord Protectorate of the Lands, it’s time \ryou’re trained and prepared to take back the Temple. King Kreos has sent a gift in honor of your new title – the sword you took from the Temple, but now remastered by his royal craftsmen and \rinfused with the quantum power of light… Let’s see if you can handle it",,,, +14,2,Bascileus," (overwhelmed) I’ve heard the stories of the Tritellurians’  \rswords… handcrafted in the secret forge of Zion…  capable of drawing power directly from light! But I never thought I would be the owner of something so magnificent, so powerful…. I know the \rtraining for this will be challenging, but heady all the same!",,(overwhelmed) I’ve heard the stories of the Tritellurians’ swords…,, +14,3,Shamar,"Excellent spirit, Bascileus. Now that you’re able to use the power \rof light in the power scrolls, it’s time to practice. Meet me in the\r Grove of Remembrance.",,,, +15,0,Bascileus,,,,, +15,1,Shamar,"You’ve learned much, Bascileus, but now, before you take back the Temple, you must learn the function of its artefacts and the proper way to approach the Inner Sanctum. ",,,, +15,2,Bascileus,Whatever I must learn. Vasileian’s Temple must be taken back. ,,Whatever I must learn.,, +15,3,Shamar,"Excellent. You will find the needed information in the scroll entitled Protocols of Temple Engagement in the Chamber of Ancient Scrolls. But before you go, there’s one more thing I\r must show you…",,,, +16,0,Bascileus,,,,, +16,1,Shamar,,,,, +16,2,Bascileus,What did you just do?! Where did this house come from?!,,What did you just do?!,, +16,3,Shamar,There’re ways to hide things in plain sight… which you’ll learn\r one day….,,,, +16,4,Bascileus,Makes me wonder what else is hidden here.,,Makes me wonder what else is hidden here.,, +16,5,Shamar,Vasiliean did manage to hide treasure somewhere near here\r before he was banished. \rTose Power Scrolls are my gift. They will give you a one-time ability\r to see into a realm now invisible to you… so use them carefully. ,,,, +16,6,Bascileus,,,,, +17,0,Bascileus,,,,, +17,1,Darshuvial,"Good work, Bascileus. Now you can purchase various \rtypes of Power Scrolls in the Chamber of Ancient Scrolls. \rThe battle with id will require power beyond what is\r currently yours.",,,, +17,2,Bascileus,,,(Teleport to Scrolls Chamber),, +18,0,Bascileus,,,,, +18,1,Bascileus,You saw what happened to me last time. This time I need you\r inside the Temple when id gets riled up.,,You saw what happened to me last time.,, +18,2,Darshuvial,"My apologies, Bascileus. You must face id alone. But be\r of good faith. Though id has deduced that you would return and,\r therefore, getting inside will not be as easy, this time you are\r prepared. And to add to your readiness, Shamar has sent you\r Vasiliean’s prized armor – he said Vasiliean would want you to\r have it…. Now, it’s time, my friend…. And keep in mind, some\r of the protocols for entering the Inner Sanctum will not apply until\r after you’ve taken back the Temple.",,,, +19,0,Bascileus,,,,, +19,1,Hannah,Yes?,,,, +20,0,Bascileus,,,,, +20,1,Portal,Hmm where should i go now....,,,, +20,2,Bascileus,Garden Oasis,,,, +20,3,Bascileus,Wasteland,,,, +20,4,Bascileus,River Valley,,,, +20,5,Bascileus,Court Of Justice,,,, +20,6,Bascileus,Chamber Of Ancient Scrolls,,,, +20,7,Bascileus,Temple,,,, +20,8,Bascileus,Never mind,,,, +21,0,Bascileus,,,,, +21,1,Bascileus,What land is this with spiders as big as dogs?,Co to za kraina z pająkami o rozmiarze psa?,,, diff --git a/Dialogues/Quests_en.csv b/Dialogues/Quests_en.csv new file mode 100644 index 000000000..c91eae441 --- /dev/null +++ b/Dialogues/Quests_en.csv @@ -0,0 +1,14 @@ +en +Name,Display Name,Translated Display Name [en],Group,Translated Group [en],Description,Translated Description [en],Success Description,Translated Success Description [en],Failure Description,Translated Failure Description [en] +Quest-53002,,,,,I'mStarving quest - nesxt quests id will be set better,,,,, +rebellion,,,,,Chapter 2 - quest Rebellion,,,,, +followTheFlame,,,,,first quest on garden.,,,,, +timeToEscape,,,,,Quest 3: Time To Escape,,,,, +backToTheGarden,,,,,Quest 4: Get Back to the Garden,,,,, +chamberOfAncientScrolls,,,,,Quest 5: Chamber Of Ancient Scrolls,,,,, +goBeforeTheJudge,,,,,Quest 6: Go Before Judge,,,,, +lessonInTheGroveOfRemembrance,,,,,Quest 7: Lesson in the grove of rememberance,,,,, +arrogance,,,,,Guilt,,,,, +greed,,,,,Guilt,,,,, +lie,,,,,Guilt,,,,, +takeBackTheTemple,,,,,Quest 8: Take Back The Temple,,,,, diff --git a/Dialogues/Quests_pl.csv b/Dialogues/Quests_pl.csv new file mode 100644 index 000000000..912df7094 --- /dev/null +++ b/Dialogues/Quests_pl.csv @@ -0,0 +1,14 @@ +pl +Name,Display Name,Translated Display Name [pl],Group,Translated Group [pl],Description,Translated Description [pl],Success Description,Translated Success Description [pl],Failure Description,Translated Failure Description [pl] +Quest-53002,,,,,I'mStarving quest - nesxt quests id will be set better,,,,, +rebellion,,,,,Chapter 2 - quest Rebellion,,,,, +followTheFlame,,,,,first quest on garden.,,,,, +timeToEscape,,,,,Quest 3: Time To Escape,,,,, +backToTheGarden,,,,,Quest 4: Get Back to the Garden,,,,, +chamberOfAncientScrolls,,,,,Quest 5: Chamber Of Ancient Scrolls,,,,, +goBeforeTheJudge,,,,,Quest 6: Go Before Judge,,,,, +lessonInTheGroveOfRemembrance,,,,,Quest 7: Lesson in the grove of rememberance,,,,, +arrogance,,,,,Guilt,,,,, +greed,,,,,Guilt,,,,, +lie,,,,,Guilt,,,,, +takeBackTheTemple,,,,,Quest 8: Take Back The Temple,,,,, diff --git a/Dialogues/dataBaseExp.csv b/Dialogues/dataBaseExp.csv new file mode 100644 index 000000000..c05d12896 --- /dev/null +++ b/Dialogues/dataBaseExp.csv @@ -0,0 +1,221 @@ +Database +Name,Version,Author,Description,Emphasis1,Emphasis2,Emphasis3,Emphasis4 +TestDialogueBase,,,,#ffffffff ---,#ff0000ff ---,#00ff00ff ---,#0000ffff --- +Global User Script + +Conversations +ID,Title,Pictures,Description,Actor,Conversant +Number,Text,Files,Text,Actor,Actor +1,TestDialogue,[],,1,2 +2,TestQuest/NahalStart,[],,1,2 +3,TestQuest/ShamarDialogue,[],,1,2 +4,Wastelands/NeedWater,[],,1,-1 +5,Wastelands/WhoGoesThere,[],,1,-1 +6,ImStarvingQuestDialogue,[],,1,2 +7,ConversationWithAnimation,[],,1,2 +8,Quest2EndSelfTalk,[],,-1,1 +9,Quest3BeggarDialogue,[],,1,6 +10,Quest4Dialogue,[],,1,2 +11,Quest6Darshuvial,[],,1,7 +12,ShamarVisitTheCourtDialogue,[],,1,2 +13,New Conversation 13,[],,1,2 +14,ShamarAfterCourtDialogue,[],,1,2 +15,Quest8/ShamarOutsideGoR,[],,1,2 +16,Quest8/After3dCutsceneInOasis,[],,1,2 +17,Quest8/Darshuvial,[],,1,7 +18,Quest8/Darshuvial_Temple,[],,1,7 +19,Hannah ,[],,1,8 +20,PortalConversation,[],,1,9 +21,Wastelands/Bark_BigSpiders,[],,1,1 +DialogueEntries +entrytag,ConvID,ID,Actor,Conversant,Title,MenuText,DialogueText,IsGroup,FalseConditionAction,ConditionPriority,Conditions,Script,Sequence,Pictures,Description,Parenthetical,Audio Files,Video File,EventGuid,Response Menu Sequence,pl,canvasRect +Text,Number,Number,Number,Number,Text,Text,Text,Boolean,Special,Special,Text,Text,Text,Files,Text,Text,Files,Text,Text,Text,Localization,Text +Bascileus_1_0,1,0,1,2,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},120;20 +Shamar_1_1,1,1,2,1,,,It was foretold that a mighty warrior would be the one to find the banished Lord and restore him to his throne. It was also said that only this “foretold-one” would find access to the King’s special Garden.... And here you are.,False,Block,Normal,,,"Timeline(play, GARDEN)",[],,,[],,{{omit}},{{omit}},{{omit}},122.9709;70 +Bascileus_1_2,1,2,1,2,,,Yes,False,Block,Normal,,,,[],,,[],,c6cf5c55-4994-4571-b3dc-c64afd8b0fe4,{{omit}},{{omit}},30;120 +Bascileus_1_3,1,3,1,2,,No,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},210;120 +Bascileus_2_0,2,0,1,2,START,,,False,Block,Normal,"CurrentQuestState(""TestQuest"") == ""unassigned""",,None(),[],,,[],,{{omit}},{{omit}},{{omit}},20;24 +Nahal_2_1,2,1,3,1,,,"Bascileus, we need to go to gardener. He will tell us what to do.",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},20;74 +Bascileus_2_2,2,2,1,3,,,Let's do it.,False,Block,Normal,,"SetQuestState(""FindTheGardener"", ""active"")",,[],,,[],,f64749f4-787a-4cd3-8024-9a6505ea391c,{{omit}},{{omit}},20;124 +Bascileus_3_0,3,0,1,2,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},300;20 +Shamar_3_1,3,1,2,1,,,Hi Bascileus!,False,Block,Normal,"CurrentQuestState(""TestQuest"") == ""unassigned""",,,[],,,[],,{{omit}},{{omit}},{{omit}},30;70 +Bascileus_3_2,3,2,1,2,,,How do you know my name?,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},28.3464;137.3228 +Shamar_3_3,3,3,2,1,,,"Well, you very much look like Bascileus. I need you to do me a favour. Can you bring me 3 little boxes?",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},28.34639;195.1969 +Shamar_3_7,3,7,2,1,,,Thank you Bascileus! I will make a stack!,False,Block,Normal,"CurrentQuestState(""TestQuest"") == ""success""",,,[],,,[],,{{omit}},{{omit}},{{omit}},570;70 +Bascileus_3_8,3,8,1,2,,,I am on it,False,Block,Normal,"Variable[""BoxesCollected""] == 0",,,[],,,[],,{{omit}},{{omit}},{{omit}},228.1102;204.252 +Bascileus_3_9,3,9,1,2,,,I have found [var=BoxesCollected].,False,Block,Normal,"Variable[""BoxesCollected""] > 0",,,[],,,[],,{{omit}},{{omit}},{{omit}},423.0708;208.189 +Bascileus_3_10,3,10,1,2,,,"Wow, that sound fun! ",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},570;120 +Shamar_3_11,3,11,2,1,,,Have you found all the boxes?,False,Block,Normal,"CurrentQuestState(""TestQuest"") == ""active""",,,[],,,[],,{{omit}},{{omit}},{{omit}},302.3622;106.2205 +Bascileus_3_12,3,12,1,2,,,"Fine, I have nothing better to do anyways...",False,Block,Normal,,"SetQuestState(""TestQuest"", ""active"")",,[],,,[],,{{omit}},{{omit}},{{omit}},28.34639;257.0079 +Shamar_3_13,3,13,2,1,,,I need all 3.,False,Block,Normal,"Variable[""BoxesCollected""] < 3",,,[],,,[],,{{omit}},{{omit}},{{omit}},344.3307;315.6693 +Shamar_3_14,3,14,2,1,,,Great job! Thank you! I can't wait to play with them!,False,Block,Normal,"Variable[""BoxesCollected""] == 3","SetQuestState(""TestQuest"", ""success"")",,[],,,[],,{{omit}},{{omit}},{{omit}},559.2913;313.3071 +Bascileus_4_0,4,0,1,-1,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},20;30 +invalid_entrytag,4,1,-1,-1,,,Water.... I have to try.,False,Block,Normal,,"SetQuestState(""WastelandWaterQuest"", ""active"")",,[],,,[],,{{omit}},{{omit}},{{omit}},21;80 +Bascileus_5_0,5,0,1,4,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},339;19 +Gigant_5_1,5,1,4,1,,,Who goes there?,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},339;69 +Bascileus_5_2,5,2,1,4,,None of your business.,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},190;124 +Bascileus_5_3,5,3,1,4,,Nobody.,,False,Block,Normal,,,,[],,,[],,{{omit}},,{{omit}},497;130 +Bascileus_6_0,6,0,1,2,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},131.3402;20.62887 +Shamar_6_1,6,1,2,1,,,"Bascileus, the Temple is now surrounded by the devastated and very dangerous Dark Wood. It would not be wise for you to venture there looking for the Temple. It’s much too dangerous.",False,Block,Normal,,,"Fade(in,2.0);\nCamera(Closeup);\nDelay(1.0);\nAnimatorPlay(Bows);\nAudioWait(Dialogues/I'mStarving Shamar Dialogue/3D-CS_-end-Q-1_-S_1)->Message(ready);",[],,,[],,{{omit}},{{omit}},{{omit}},130.9381;127.9381 +Bascileus_6_2,6,2,1,2,,I don’t take kindly to orders.” (arrogance) ,I don’t take kindly to orders.” (arrogance) ,False,Block,Normal,,"SetQuestNodeState(""Quest-53002"", ""talkToShamar"", ""success"");\nGiveQuest(""Shamar"", ""arrogance"");",SetContinueMode(false);\nDelay(3);\nCamera(Full Right);\nAnimatorPlay(Dialogue_ShakesHead_1);\nAudioWait(Dialogues/I'mStarving Shamar Dialogue/3D-CS_end-Q1_B-choice-2_1);,[],,,[],,{{omit}},,{{omit}},250.0928;242.8763 +Bascileus_6_3,6,3,1,2,,"Believe me, I have no interest in a Temple” (lie) ","Believe me, I have no interest in a Temple” (lie) ",False,Block,Normal,,"SetQuestNodeState(""Quest-53002"", ""talkToShamar"", ""success"");\nGiveQuest(""Shamar"", ""lie"");",SetContinueMode(false);\nDelay(3);\nCamera(Full Right);\nAnimatorPlay(Dialogue_ShakesHead_1);\nAudioWait(Dialogues/I'mStarving Shamar Dialogue/3D-CS_end-Q1_B-choice-1_1);,[],,,[],,,,{{omit}},16.93815;241.8763 +Bascileus_7_0,7,0,1,2,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},20;33 +Shamar_7_1,7,1,2,1,,,"Hej, tak wygladaja ustawienia kamy z wykozystaniem defaultowych kadrow stworzonych przez DialogueSystem oraz wykozystanie animacji. Aktualnie zblizenie.",False,Block,Normal,,,Camera(Closeup);\nAnimatorPlay(Test);\nAudioWait();,[],,,[],,{{omit}},{{omit}},{{omit}},33;99 +Bascileus_7_2,7,2,1,2,,Z nad ramienia,Tak wyglada kamera z prawej strony z nad ramienia.,False,Block,Normal,,,Camera(OTS Right);\nAnimatorPlay(Dialogue_Bows);\nDelay(3);,[],,,[],,{{omit}},{{omit}},{{omit}},32;169 +Shamar_7_3,7,3,2,1,,,Tak wyglada kadr o nazwie Medium right,False,Block,Normal,,,Camera(Medium Right);\nAnimatorPlay(Test);\nDelay(3);,[],,,[],,{{omit}},{{omit}},{{omit}},34;222 +Bascileus_7_4,7,4,1,2,,Pokaz kadr pełny,TEraz zaprezentuje kadr pełny i popatrze sie w prawo,False,Block,Normal,,,Camera(Full);\nAnimatorPlay(Dialogue_LooksRight);\nDelay(3);,[],,,[],,{{omit}},{{omit}},{{omit}},33;291 +Shamar_7_5,7,5,2,1,,,"Ładny, ja zaprezentuje ci kadr z góry ",False,Block,Normal,,,Camera(Down);\nAnimatorPlay(Dialogue_LooksRight);\nDelay(3);,[],,,[],,{{omit}},{{omit}},{{omit}},35;367 +Bascileus_7_6,7,6,1,2,,Pokaz kadr szeroki,"Yooooo a ten kadr szeroki, swietny",False,Block,Normal,,,Delay(3);\nCamera(Wide);\nAnimatorPlay(Dialogue_Agreement);,[],,,[],,{{omit}},{{omit}},{{omit}},35;436 +Shamar_7_7,7,7,2,1,,,"Dobra juz nie przesadzajmy, ten kadr teraz to pelny z prawej strony",False,Block,Normal,,,Delay(3);\nCamera(Full Right);\nAnimatorPlay(Test);,[],,,[],,{{omit}},{{omit}},{{omit}},35;485 +Bascileus_7_8,7,8,1,2,,Dobra konczmy juz ta zabawe,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},30;568 +invalid_entrytag,8,0,-1,-1,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},356;53 +Bascileus_8_1,8,1,1,1,,"⦁(angry, proud) I don’t need some “warring angel” ","I don’t need some “warring angel” taking care of me - I’m not afraid of any id. He marked me? Let’s see how fast his bony soldiers run once I mark them with my sword!… I can handle myself, but first-things-first – a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",False,Block,Normal,,"GiveQuest(""FakeBascileus"", ""timeToEscape"");\nSendMessageSystem(""Explored"", ""OtherSide"");",,[],,,[],,{{omit}},{{omit}},{{omit}},191;261 +Bascileus_8_2,8,2,1,1,,"⦁(offended, accusive) I don’t like this place… ","I don’t like this place,… and it certainly doesn’t like me…. Giants I understand. This place… well, it’s just plain weird. I’m going back where I’m more suited. Have some fun. Find a tavern and some pretty ladies…. Which way is the blasted portal that sucked me into this mess?",False,Block,Normal,,"GiveQuest(""FakeBascileus"", ""timeToEscape"");\nSendMessageSystem(""Explored"", ""OtherSide"");",,[],,,[],,{{omit}},{{omit}},{{omit}},474;260 +FakeBascileus_8_3,8,3,5,5,,Hmm...,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},348;147 +Beggar_9_0,9,0,6,6,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},450;54 +Beggar_9_1,9,1,6,1,,,Sir! Can you spare some coins for a poor beggar?”,False,Block,Normal,,,Camera(Full Left);\nAnimatorPlay(Beggar_Begging2_Start);\nAudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_Beggar_1);\n,[],,,[],,{{omit}},{{omit}},{{omit}},441.2426;147.2195 +Bascileus_9_2,9,2,1,6,,(arrogantly) Do I look like I’ve got money?,Do I look like I’ve got money? I’m as destitute as\r you. ,False,Block,Normal,,"Variable[""BeggarSpoke""] = true;\nGiveQuest(""Beggar"", ""arrogance"");",SetContinueMode(false);\nAudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_B_Response_2),[],,,[],,{{omit}},{{omit}},{{omit}},196.7342;282.1117 +Bascileus_9_3,9,3,1,6,,(Give money) Here. But this is all\r I can spare.,Here. But this is all\r I can spare.,False,Block,Normal,,"SetBrightness(GetBrightness( ) + 5);\nvRemoveItemByID(10, 40);",AudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_B_Response_1),[],,,[],,{{omit}},{{omit}},{{omit}},441;298 +Beggar_9_5,9,5,6,6,,,"Thank you kind, sir.",False,Block,Normal,,,AnimatorPlay(Beggar_Bows);,[],,,[],,{{omit}},{{omit}},{{omit}},441.0989;372 +Bascileus_9_6,9,6,1,6,,What happened to this place?,What happened to this place?,False,Block,Normal,,,AudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_B_Response_1_2),[],,,[],,{{omit}},{{omit}},{{omit}},437;443 +Beggar_9_7,9,7,6,6,,,The war with Shadow Dragon…. Then came the Giants proclaiming lordship and demanding servitude. Our young warriors refused… grabbed their swords…. It was a massacre. The youth not killed were taken captive - the elderly who managed to hide forced to live off the mercy of strangers.,False,Block,Normal,,,AudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_Beggar_3);\nAnimatorPlay(Beggar_Stretches_Hand);,[],,,[],,{{omit}},{{omit}},{{omit}},435;512 +Bascileus_9_8,9,8,1,6,,Were all the villages destroyed?\r,Were all the villages destroyed?\r,False,Block,Normal,,,AudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_B_Response_1_3),[],,,[],,{{omit}},{{omit}},{{omit}},438;580 +Beggar_9_9,9,9,6,6,,,"Not if they surrendered. But those villagers slave under hard labor, riddled with disease, still hoping for the return of Vasileian, the great Tritellurian banished from these lands by Shadow Dragon.",False,Block,Normal,,,AudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_Beggar_4);\nAnimatorPlay(Beggar_Stretches_Hand);,[],,,[],,{{omit}},{{omit}},{{omit}},434.7342;645 +Bascileus_9_10,9,10,1,6,,(chuckles sarcastically) Yes. I’ve heard of the great Vasileian. ,"Yes. I’ve heard of the great Vasileian. Didn’t work out too well for you though, did it? Take care, old man.",False,Block,Normal,,"Variable[""BeggarSpoke""] = true",SetContinueMode(false);\nAudioWait(Dialogues/TimeToEscape Beggar Dialogue/Q3_B_Response_1_4),[],,,[],,{{omit}},{{omit}},{{omit}},436;725.0989 +Shamar_10_0,10,0,2,1,START,,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},361.8636;65 +Bascileus_10_1,10,1,1,2,,How do you know I took a sword from the Temple?,How do you know I took a sword from the Temple? Is there anything you don’t know?,False,Block,Normal,,,AudioWait(Dialogues/GetBackToGarden Dialogue/B_Quest4_1),[],,,[],,{{omit}},{{omit}},{{omit}},354.8106;237.3412 +Shamar_10_2,10,2,2,1,,,...,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},354.4424;303.0417 +Bascileus_10_3,10,3,1,2,,I found it. I need to keep it to protect myself.,I found it. I need to keep it to protect myself.,False,Block,Normal,,"Variable[""SwordDialogBPGain""] = 3;",AudioWait(Dialogues/GetBackToGarden Dialogue/B_Quest4_2_2),[],,,[],,{{omit}},{{omit}},{{omit}},189.8636;366 +Bascileus_10_4,10,4,1,2,,I’m sorry. I took it without asking.,"I’m sorry. I took it without asking. But why, after all this time, \rare you taking it back now?",False,Block,Normal,,"Variable[""SwordDialogBPGain""] = 5;",AudioWait(Dialogues/GetBackToGarden Dialogue/B_Quest4_2_1),[],,,[],,{{omit}},{{omit}},{{omit}},520.8636;370 +Shamar_10_5,10,5,2,1,,,"Bascileus, you must surrender the sword to receive\r\r\njustice in the court.",False,Block,Normal,,,AudioWait(Dialogues/GetBackToGarden Dialogue/S_Quest4_2_2),[],,,[],,{{omit}},{{omit}},{{omit}},185.8777;452.8777 +Shamar_10_6,10,6,2,1,,,I knew you would need it to protect yourself against the servants\r\r\nof id. But trusting King Kreos in court will put you under his\r\r\nprotection and you will no longer need it.,False,Block,Normal,,,AudioWait(Dialogues/GetBackToGarden Dialogue/S_Quest4_2_1),[],,,[],,{{omit}},{{omit}},{{omit}},514;454.7515 +Bascileus_10_7,10,7,1,2,,"In that case, please take it back","In that case, please take it back",False,Block,Normal,,"SendMessageSystem(""Shamar"", ""Found"");\nSetBrightness(GetBrightness( ) + Variable[""SwordDialogBPGain""]);",AudioWait(Dialogues/GetBackToGarden Dialogue/B_Quest4_3),[],,,[],,{{omit}},{{omit}},{{omit}},339;582.7515 +Shamar_10_8,10,8,2,1,,,"You ‘ve made the right decision Bascileus, now take some time,\r\nget some rest, you can always find me in the garden, then we arrange for\r\nthe journey to the court of justice.",False,Block,Normal,,,SetContinueMode(false);\nAudioWait(Dialogues/GetBackToGarden Dialogue/S_Quest4_3);\nAnimatorPlay(Shamar_meditation_all);,[],,,[],,{{omit}},{{omit}},{{omit}},341.1277;691.4468 +Shamar_10_9,10,9,2,1,,,"But before you go to court, you need to give me the sword you took from the Temple.",False,Block,Normal,,,AudioWait(Dialogues/GetBackToGarden Dialogue/S_Quest4_1);\nAnimatorPlay(Shamar_Idle_3)\n,[],,,[],,{{omit}},{{omit}},{{omit}},355.7009;141.7811 +Bascileus_11_0,11,0,1,7,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},512;144 +Bascileus_11_1,11,1,1,7,,I don’t like the looks of this place.,"I don’t like the looks of this place. I’m actually glad you’re here, Darshuvial.",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},512;227 +Darshuvial_11_2,11,2,7,7,,,"I’m sorry, Bascileus. This you must do\r alone.",False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},{{omit}},{{omit}},517;333 +Bascileus_12_0,12,0,1,2,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},409;96 +Shamar_12_1,12,1,2,1,,I have to confess my sins.,I have to confess my sins. Please take me to the Court.,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},413;198 +Bascileus_12_2,12,2,1,2,,,Glad to here that.,False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},,{{omit}},415;294 +Bascileus_13_0,13,0,1,2,START,,,False,,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},20;30 +Bascileus_14_0,14,0,1,2,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},442;116 +Shamar_14_1,14,1,2,1,,,"Because you are officially Lord Protectorate of the Lands, it’s time \ryou’re trained and prepared to take back the Temple. King Kreos has sent a gift in honor of your new title – the sword you took from the Temple, but now remastered by his royal craftsmen and \rinfused with the quantum power of light… Let’s see if you can handle it",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},445;206 +Bascileus_14_2,14,2,1,2,,(overwhelmed) I’ve heard the stories of the Tritellurians’ swords…," (overwhelmed) I’ve heard the stories of the Tritellurians’  \rswords… handcrafted in the secret forge of Zion…  capable of drawing power directly from light! But I never thought I would be the owner of something so magnificent, so powerful…. I know the \rtraining for this will be challenging, but heady all the same!",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},449;296 +Shamar_14_3,14,3,2,1,,,"Excellent spirit, Bascileus. Now that you’re able to use the power \rof light in the power scrolls, it’s time to practice. Meet me in the\r Grove of Remembrance.",False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},{{omit}},{{omit}},447;391 +Bascileus_15_0,15,0,1,2,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},454;84 +Shamar_15_1,15,1,2,1,,,"You’ve learned much, Bascileus, but now, before you take back the Temple, you must learn the function of its artefacts and the proper way to approach the Inner Sanctum. ",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},452;187 +Bascileus_15_2,15,2,1,2,,Whatever I must learn.,Whatever I must learn. Vasileian’s Temple must be taken back. ,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},451;291 +Shamar_15_3,15,3,2,1,,,"Excellent. You will find the needed information in the scroll entitled Protocols of Temple Engagement in the Chamber of Ancient Scrolls. But before you go, there’s one more thing I\r must show you…",False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},{{omit}},{{omit}},454;385 +Bascileus_16_0,16,0,1,2,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},468;135 +Shamar_16_1,16,1,2,1,New Dialogue Entry,,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},476;234 +Bascileus_16_2,16,2,1,2,,What did you just do?!,What did you just do?! Where did this house come from?!,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},475;339 +Shamar_16_3,16,3,2,1,,,There’re ways to hide things in plain sight… which you’ll learn\r one day….,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},474;437 +Bascileus_16_4,16,4,1,2,,Makes me wonder what else is hidden here.,Makes me wonder what else is hidden here.,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},478;504 +Shamar_16_5,16,5,2,1,,,Vasiliean did manage to hide treasure somewhere near here\r before he was banished. \rTose Power Scrolls are my gift. They will give you a one-time ability\r to see into a realm now invisible to you… so use them carefully. ,False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},{{omit}},{{omit}},477;589 +Bascileus_16_6,16,6,1,2,New Dialogue Entry,,,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},478;660 +Bascileus_17_0,17,0,1,7,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},388;110 +Darshuvial_17_1,17,1,7,1,,,"Good work, Bascileus. Now you can purchase various \rtypes of Power Scrolls in the Chamber of Ancient Scrolls. \rThe battle with id will require power beyond what is\r currently yours.",False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},390;196 +Bascileus_17_2,17,2,1,7,,(Teleport to Scrolls Chamber),,False,Block,Normal,,"SendMessageSystem(""Darshuviel"", ""Met"");",SetContinueMode(false);,[],,,[],,5b05cd35-b2cd-41e4-992f-2eadc481d405,{{omit}},{{omit}},386;263 +Bascileus_18_0,18,0,1,7,START,,,False,Block,Normal,,,SetContinueMode(original);,[],,,[],,{{omit}},{{omit}},{{omit}},238;79 +Bascileus_18_1,18,1,1,7,,You saw what happened to me last time.,You saw what happened to me last time. This time I need you\r inside the Temple when id gets riled up.,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},242;158 +Darshuvial_18_2,18,2,7,1,,,"My apologies, Bascileus. You must face id alone. But be\r of good faith. Though id has deduced that you would return and,\r therefore, getting inside will not be as easy, this time you are\r prepared. And to add to your readiness, Shamar has sent you\r Vasiliean’s prized armor – he said Vasiliean would want you to\r have it…. Now, it’s time, my friend…. And keep in mind, some\r of the protocols for entering the Inner Sanctum will not apply until\r after you’ve taken back the Temple.",False,Block,Normal,,,SetContinueMode(false);,[],,,[],,{{omit}},{{omit}},{{omit}},246;241 +Bascileus_19_0,19,0,1,8,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},81;30 +Hannah_19_1,19,1,8,1,,,Yes?,False,Block,Normal,,,SetContinueMode(false);\nCamera(Medium);\nAudioWait(Dialogues/TimeToEscape Hannah/Hannah_yes);,[],,,[],,{{omit}},{{omit}},{{omit}},84;166 +Bascileus_20_0,20,0,1,9,START,,,False,Block,Normal,,,None(),[],,,[],,{{omit}},{{omit}},{{omit}},187.0646;27.97145 +Portal_20_1,20,1,9,1,,,Hmm where should i go now....,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},187.0646;77.97145 +Bascileus_20_2,20,2,1,9,,,Garden Oasis,False,Block,Normal,"Variable[""GardenTravelUnlocked""] == true","LoadLevel(""Garden_Oasis"");",,[],,,[],,{{omit}},{{omit}},{{omit}},18.81223;149.003 +Bascileus_20_3,20,3,1,9,,,Wasteland,False,Block,Normal,"Variable[""WastelandTravelUnlocked""] == true","LoadLevel(""Land_of_Death_Wasteland"");",,[],,,[],,{{omit}},{{omit}},{{omit}},210.0993;150.0045 +Bascileus_20_4,20,4,1,9,,,River Valley,False,Block,Normal,"Variable[""ValleyTravelUnlocked""] == true","LoadLevel(""Land_of_Death_River1_Valley"");",,[],,,[],,{{omit}},{{omit}},{{omit}},398.3817;151.006 +Bascileus_20_5,20,5,1,9,,,Court Of Justice,False,Block,Normal,"Variable[""CourtTravelUnlocked""] == true","LoadLevel(""Court_of_Justice"");",,[],,,[],,{{omit}},{{omit}},{{omit}},597.6807;148.0015 +Bascileus_20_6,20,6,1,9,,,Chamber Of Ancient Scrolls,False,Block,Normal,"Variable[""ChamberTravelUnlocked""] == true","LoadLevel(""Chamber_of_Ancient_Scrolls"");",,[],,,[],,{{omit}},{{omit}},{{omit}},788.9673;143.9954 +Bascileus_20_7,20,7,1,9,,,Temple,False,Block,Normal,"Variable[""TempleTravelUnlocked""] == true","LoadLevel(""Temple"");",,[],,,[],,{{omit}},{{omit}},{{omit}},984.2603;150.0045 +Bascileus_20_8,20,8,1,9,,,Never mind,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},{{omit}},1183.56;149.003 +Bascileus_21_0,21,0,1,1,START,,,False,,Normal,,,None(),[],,,[],,{{omit}},{{omit}},,20;30 +Bascileus_21_1,21,1,1,1,What land is this with spiders as big as dogs?,,What land is this with spiders as big as dogs?,False,Block,Normal,,,,[],,,[],,{{omit}},{{omit}},Co to za kraina z pająkami o rozmiarze psa?,20;79.00449 +OutgoingLinks +OriginConvID,OriginID,DestConvID,DestID,ConditionPriority +Number,Number,Number,Number,Special +1,0,1,1,Normal +1,1,1,2,Normal +1,1,1,3,Normal +2,0,2,1,Normal +2,1,2,2,Normal +3,0,3,1,Normal +3,0,3,7,Normal +3,0,3,11,Normal +3,1,3,2,Normal +3,2,3,3,Normal +3,3,3,12,Normal +3,7,3,10,Normal +3,9,3,13,Normal +3,9,3,14,Normal +3,11,3,8,Normal +3,11,3,9,Normal +4,0,4,1,Normal +5,0,5,1,Normal +5,1,5,2,Normal +5,1,5,3,Normal +6,0,6,1,Normal +6,1,6,2,Normal +6,1,6,3,Normal +7,0,7,1,Normal +7,1,7,2,Normal +7,2,7,3,Normal +7,3,7,4,Normal +7,4,7,5,Normal +7,5,7,6,Normal +7,6,7,7,Normal +7,7,7,8,Normal +8,0,8,3,Normal +8,3,8,1,Normal +8,3,8,2,Normal +9,0,9,1,Normal +9,1,9,2,Normal +9,1,9,3,Normal +9,3,9,5,Normal +9,5,9,6,Normal +9,6,9,7,Normal +9,7,9,8,Normal +9,8,9,9,Normal +9,9,9,10,Normal +10,0,10,9,Normal +10,1,10,2,Normal +10,2,10,3,Normal +10,2,10,4,Normal +10,3,10,5,Normal +10,4,10,6,Normal +10,5,10,7,Normal +10,6,10,7,Normal +10,7,10,8,Normal +10,9,10,1,Normal +11,0,11,1,Normal +11,1,11,2,Normal +12,0,12,1,Normal +12,1,12,2,Normal +14,0,14,1,Normal +14,1,14,2,Normal +14,2,14,3,Normal +15,0,15,1,Normal +15,1,15,2,Normal +15,2,15,3,Normal +16,0,16,1,Normal +16,1,16,2,Normal +16,2,16,3,Normal +16,3,16,4,Normal +16,4,16,5,Normal +16,5,16,6,Normal +17,0,17,1,Normal +17,1,17,2,Normal +18,0,18,1,Normal +18,1,18,2,Normal +19,0,19,1,Normal +20,0,20,1,Normal +20,1,20,2,Normal +20,1,20,3,Normal +20,1,20,4,Normal +20,1,20,5,Normal +20,1,20,6,Normal +20,1,20,7,Normal +20,1,20,8,Normal +21,0,21,1,Normal diff --git a/Dialogues/testexport.xml b/Dialogues/testexport.xml new file mode 100644 index 000000000..6209b72b2 Binary files /dev/null and b/Dialogues/testexport.xml differ diff --git a/Packages/manifest.json b/Packages/manifest.json index 7020e2557..a07727efb 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -1,7 +1,10 @@ { "dependencies": { + "com.unity.localization": "1.5.4", "com.unity.multiplayer.center": "1.0.0", + "com.unity.postprocessing": "3.4.0", "com.unity.render-pipelines.universal": "17.0.3", + "com.unity.timeline": "1.8.8", "com.unity.modules.accessibility": "1.0.0", "com.unity.modules.ai": "1.0.0", "com.unity.modules.androidjni": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 0368a4bac..792d1bee1 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -1,5 +1,20 @@ { "dependencies": { + "com.unity.addressables": { + "version": "2.2.2", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.profiling.core": "1.0.2", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.scriptablebuildpipeline": "2.1.4", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.burst": { "version": "1.8.18", "depth": 2, @@ -29,6 +44,16 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.localization": { + "version": "1.5.4", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.addressables": "1.22.2", + "com.unity.nuget.newtonsoft-json": "3.0.2" + }, + "url": "https://packages.unity.com" + }, "com.unity.mathematics": { "version": "1.3.2", "depth": 2, @@ -51,6 +76,29 @@ "dependencies": {}, "url": "https://packages.unity.com" }, + "com.unity.nuget.newtonsoft-json": { + "version": "3.2.1", + "depth": 1, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, + "com.unity.postprocessing": { + "version": "3.4.0", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.physics": "1.0.0" + }, + "url": "https://packages.unity.com" + }, + "com.unity.profiling.core": { + "version": "1.0.2", + "depth": 2, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.render-pipelines.core": { "version": "17.0.3", "depth": 1, @@ -94,6 +142,13 @@ "com.unity.modules.terrain": "1.0.0" } }, + "com.unity.scriptablebuildpipeline": { + "version": "2.1.4", + "depth": 2, + "source": "registry", + "dependencies": {}, + "url": "https://packages.unity.com" + }, "com.unity.searcher": { "version": "4.9.2", "depth": 2, @@ -131,6 +186,18 @@ }, "url": "https://packages.unity.com" }, + "com.unity.timeline": { + "version": "1.8.8", + "depth": 0, + "source": "registry", + "dependencies": { + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.ugui": { "version": "2.0.0", "depth": 2, diff --git a/ProjectSettings/EditorBuildSettings.asset b/ProjectSettings/EditorBuildSettings.asset index 8e01d82ff..90a55edb5 100644 --- a/ProjectSettings/EditorBuildSettings.asset +++ b/ProjectSettings/EditorBuildSettings.asset @@ -47,4 +47,9 @@ EditorBuildSettings: - enabled: 1 path: Assets/Scenes/Portal/Portal.unity guid: cf1147d8227221747a9f5884efeaeab3 - m_configObjects: {} + m_configObjects: + com.unity.addressableassets: {fileID: 11400000, guid: 272caeb75b6504dcb987edb253f851b7, + type: 2} + com.unity.localization.settings: {fileID: 11400000, guid: 7039fd3a9545544ffa35741a5b2a3aaa, + type: 2} + m_UseUCBPForAssetBundles: 0 diff --git a/ProjectSettings/Packages/com.unity.services.core/Settings.json b/ProjectSettings/Packages/com.unity.services.core/Settings.json new file mode 100644 index 000000000..e69de29bb