初始化
@@ -0,0 +1,109 @@
|
||||
%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: a263e71fce79f2f4cb5b5f1fa6b7291a
|
||||
m_currentHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_OptimizeCatalogSize: 0
|
||||
m_BuildRemoteCatalog: 0
|
||||
m_BundleLocalCatalog: 0
|
||||
m_CatalogRequestsTimeout: 0
|
||||
m_DisableCatalogUpdateOnStart: 0
|
||||
m_IgnoreUnsupportedFilesInBuild: 0
|
||||
m_UniqueBundleIds: 0
|
||||
m_NonRecursiveBuilding: 1
|
||||
m_CCDEnabled: 0
|
||||
m_maxConcurrentWebRequests: 3
|
||||
m_ContiguousBundles: 1
|
||||
m_StripUnityVersionFromBundleBuild: 0
|
||||
m_DisableVisibleSubAssetRepresentations: 0
|
||||
m_ShaderBundleNaming: 0
|
||||
m_ShaderBundleCustomNaming:
|
||||
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: ec57fb26f5bb61544b2831e9485b32fe, type: 2}
|
||||
- {fileID: 11400000, guid: a0634190ffe18f540898ca188e9239a6, type: 2}
|
||||
m_BuildSettings:
|
||||
m_CompileScriptsInVirtualMode: 0
|
||||
m_CleanupStreamingAssetsAfterBuilds: 1
|
||||
m_LogResourceManagerExceptions: 1
|
||||
m_BundleBuildPath: Temp/com.unity.addressables/AssetBundles
|
||||
m_ProfileSettings:
|
||||
m_Profiles:
|
||||
- m_InheritedParent:
|
||||
m_Id: 83aae24780aa7b84b995fa950d854459
|
||||
m_ProfileName: Default
|
||||
m_Values:
|
||||
- m_Id: 2ada5ea4c995904498bf2d2905ef9b81
|
||||
m_Value: ServerData/[BuildTarget]
|
||||
- m_Id: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
- m_Id: 6e73997731c000940a437485b1ba76c4
|
||||
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
|
||||
- m_Id: c39dcac55ca57cd4bae683f499239bab
|
||||
m_Value: '[UnityEditor.EditorUserBuildSettings.activeBuildTarget]'
|
||||
m_ProfileEntryNames:
|
||||
- m_Id: 2ada5ea4c995904498bf2d2905ef9b81
|
||||
m_Name: Remote.BuildPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_Name: Local.BuildPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
m_Name: Local.LoadPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: 6e73997731c000940a437485b1ba76c4
|
||||
m_Name: Remote.LoadPath
|
||||
m_InlineUsage: 0
|
||||
- m_Id: c39dcac55ca57cd4bae683f499239bab
|
||||
m_Name: BuildTarget
|
||||
m_InlineUsage: 0
|
||||
m_ProfileVersion: 1
|
||||
m_LabelTable:
|
||||
m_LabelNames:
|
||||
- default
|
||||
m_SchemaTemplates: []
|
||||
m_GroupTemplateObjects:
|
||||
- {fileID: 11400000, guid: f8bdd136efb211442bda19725e55eefa, type: 2}
|
||||
m_InitializationObjects: []
|
||||
m_CertificateHandlerType:
|
||||
m_AssemblyName:
|
||||
m_ClassName:
|
||||
m_ActivePlayerDataBuilderIndex: 3
|
||||
m_DataBuilders:
|
||||
- {fileID: 11400000, guid: 8ff9be9fa7d6f6e4aabfb5f4fc38edb8, type: 2}
|
||||
- {fileID: 11400000, guid: b35f508742c435d4e905c8840c52e474, type: 2}
|
||||
- {fileID: 11400000, guid: 2953c3ffa23bf5c4d81fd831ed0edf28, type: 2}
|
||||
- {fileID: 11400000, guid: 3801f576e21eb6e4b84341e8c5b6b381, type: 2}
|
||||
m_ActiveProfileId: 83aae24780aa7b84b995fa950d854459
|
||||
m_HostingServicesManager:
|
||||
m_HostingServiceInfos: []
|
||||
m_Settings: {fileID: 11400000}
|
||||
m_NextInstanceId: 0
|
||||
m_RegisteredServiceTypeRefs: []
|
||||
m_PingTimeoutInMilliseconds: 5000
|
||||
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-9204814071938565758
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5834b5087d578d24c926ce20cd31e6d6, type: 3}
|
||||
m_Name: ContentUpdateGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
m_Group: {fileID: 0}
|
||||
m_StaticContent: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1a3c5d64ac83548c09dd1678b9f6f1cd, type: 3}
|
||||
m_Name: Packed Assets
|
||||
m_EditorClassIdentifier:
|
||||
m_SchemaObjects:
|
||||
- {fileID: 934448667725198538}
|
||||
- {fileID: -9204814071938565758}
|
||||
m_Description: Pack assets into asset bundles.
|
||||
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
|
||||
--- !u!114 &934448667725198538
|
||||
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_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
@@ -0,0 +1,34 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bbb281ee3bf0b054c82ac2347e9e782c, type: 3}
|
||||
m_Name: Built In Data
|
||||
m_EditorClassIdentifier:
|
||||
m_GroupName: Built In Data
|
||||
m_Data:
|
||||
m_SerializedData: []
|
||||
m_GUID: fb6b1e2c69149b74db7e2c3f02f82647
|
||||
m_SerializeEntries:
|
||||
- m_GUID: EditorSceneList
|
||||
m_Address: EditorSceneList
|
||||
m_ReadOnly: 1
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: Resources
|
||||
m_Address: Resources
|
||||
m_ReadOnly: 1
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 1
|
||||
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas:
|
||||
- {fileID: 11400000, guid: cb902af06392e554faea237e56b9734f, type: 2}
|
||||
@@ -0,0 +1,45 @@
|
||||
%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_Data:
|
||||
m_SerializedData: []
|
||||
m_GUID: a263e71fce79f2f4cb5b5f1fa6b7291a
|
||||
m_SerializeEntries:
|
||||
- m_GUID: 33618332775bcb9418a7fa185cb02373
|
||||
m_Address: Assets/MyGame/aa/UI/Login/LoginPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 47c83c32cd8a2e247a31ae49ef81858e
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/VIPPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 996a064fe66064f4bb15d7927689865d
|
||||
m_Address: Assets/MyGame/aa/UI/Home/Sub/SelectRoomPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c9d33ae16c3d94045817f048b78914cc
|
||||
m_Address: Assets/MyGame/aa/UI/Home/MainPanel.prefab
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 3d7ea06370502a34e82011fabf822b45, type: 2}
|
||||
m_SchemaSet:
|
||||
m_Schemas:
|
||||
- {fileID: 11400000, guid: a60664e6400d6644eb4dbc5d2baba8cc, type: 2}
|
||||
- {fileID: 11400000, guid: a33b90daabf2170468d164694c0f12fa, type: 2}
|
||||
@@ -0,0 +1,17 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b1487f5d688e4f94f828f879d599dbdc, type: 3}
|
||||
m_Name: Built In Data_PlayerDataGroupSchema
|
||||
m_EditorClassIdentifier:
|
||||
m_Group: {fileID: 11400000, guid: a0634190ffe18f540898ca188e9239a6, type: 2}
|
||||
m_IncludeResourcesFolders: 1
|
||||
m_IncludeBuildSettingsScenes: 1
|
||||
@@ -0,0 +1,45 @@
|
||||
%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: ec57fb26f5bb61544b2831e9485b32fe, 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: 2dc81615c3947e64493d7c6552a3f24d
|
||||
m_LoadPath:
|
||||
m_Id: 6bd5fad857b09dd439c8b71f4ae1a9d8
|
||||
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_BundleNaming: 0
|
||||
m_AssetLoadMode: 0
|
||||
@@ -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: ec57fb26f5bb61544b2831e9485b32fe, type: 2}
|
||||
m_StaticContent: 0
|
||||
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 88d21199f5d473f4db36845f2318f180, type: 3}
|
||||
m_Name: BuildScriptFastMode
|
||||
m_EditorClassIdentifier:
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3e2e0ffa088c91d41a086d0b8cb16bdc, type: 3}
|
||||
m_Name: BuildScriptPackedMode
|
||||
m_EditorClassIdentifier:
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
@@ -0,0 +1,20 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: ad8c280d42ee0ed41a27db23b43dd2bf, type: 3}
|
||||
m_Name: BuildScriptPackedPlayMode
|
||||
m_EditorClassIdentifier:
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
@@ -0,0 +1,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: bb0e4994b34add1409fd8ccaf4a82de5, type: 3}
|
||||
m_Name: BuildScriptVirtualMode
|
||||
m_EditorClassIdentifier:
|
||||
instanceProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.InstanceProvider
|
||||
sceneProviderType:
|
||||
m_AssemblyName: Unity.ResourceManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_ClassName: UnityEngine.ResourceManagement.ResourceProviders.SceneProvider
|
||||
@@ -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: 3d7ea06370502a34e82011fabf822b45
|
||||
@@ -0,0 +1,34 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7e3976da977cb49238499ea3b4c237ae, type: 3}
|
||||
m_Name: ProfileDataSourceSettings
|
||||
m_EditorClassIdentifier:
|
||||
profileGroupTypes:
|
||||
- m_GroupTypePrefix: Built-In
|
||||
m_Variables:
|
||||
- m_Suffix: BuildPath
|
||||
m_Value: '[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]'
|
||||
- m_Suffix: LoadPath
|
||||
m_Value: '{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]'
|
||||
- m_GroupTypePrefix: Editor Hosted
|
||||
m_Variables:
|
||||
- m_Suffix: BuildPath
|
||||
m_Value: ServerData/[BuildTarget]
|
||||
- m_Suffix: LoadPath
|
||||
m_Value: http://[PrivateIpAddress]:[HostingServicePort]
|
||||
environments: []
|
||||
currentEnvironment:
|
||||
id:
|
||||
projectId:
|
||||
projectGenesisId:
|
||||
name:
|
||||
isDefault: 0
|
||||
@@ -0,0 +1,212 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
/// <summary>
|
||||
/// 知识点
|
||||
/// 1.AB包相关的API
|
||||
/// 2.单例模式
|
||||
/// 3.委托——>Lambda表达式
|
||||
/// 4.协程
|
||||
/// 5.字典
|
||||
/// </summary>
|
||||
public class ABMgr : AutoMonoSingleton<ABMgr>
|
||||
{
|
||||
//AB包管理器 目的是
|
||||
//让外部更方便的进行资源加载
|
||||
|
||||
//主包
|
||||
private AssetBundle mainAB = null;
|
||||
//依赖包获取用的配置文件
|
||||
private AssetBundleManifest manifest = null;
|
||||
|
||||
//AB包不能够重复加载 重复加载会报错
|
||||
//字典 用字典来存储 加载过的AB包
|
||||
private Dictionary<string, AssetBundle> abDic = new Dictionary<string, AssetBundle>();
|
||||
|
||||
/// <summary>
|
||||
/// 这个AB包存放路径 方便修改
|
||||
/// </summary>
|
||||
private string PathUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return Application.streamingAssetsPath + "/";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主包名 方便修改
|
||||
/// </summary>
|
||||
private string MainABName
|
||||
{
|
||||
get
|
||||
{
|
||||
#if UNITY_IOS
|
||||
return "IOS";
|
||||
#elif UNITY_ANDROID
|
||||
return "Android";
|
||||
#else
|
||||
return "StandaloneWindows";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载AB包
|
||||
/// </summary>
|
||||
/// <param name="abName"></param>
|
||||
public void LoadAB( string abName )
|
||||
{
|
||||
//加载AB包
|
||||
if (mainAB == null)
|
||||
{
|
||||
mainAB = AssetBundle.LoadFromFile(PathUrl + MainABName);
|
||||
manifest = mainAB.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
|
||||
}
|
||||
//我们获取依赖包相关信息
|
||||
AssetBundle ab = null;
|
||||
string[] strs = manifest.GetAllDependencies(abName);
|
||||
for (int i = 0; i < strs.Length; i++)
|
||||
{
|
||||
//判断包是否加载过
|
||||
if (!abDic.ContainsKey(strs[i]))
|
||||
{
|
||||
ab = AssetBundle.LoadFromFile(PathUrl + strs[i]);
|
||||
abDic.Add(strs[i], ab);
|
||||
}
|
||||
}
|
||||
//加载资源来源包
|
||||
//如果没有加载过 再加载
|
||||
if (!abDic.ContainsKey(abName))
|
||||
{
|
||||
ab = AssetBundle.LoadFromFile(PathUrl + abName);
|
||||
abDic.Add(abName, ab);
|
||||
}
|
||||
}
|
||||
|
||||
//同步加载 不指定类型
|
||||
public Object LoadRes(string abName, string resName)
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
Object obj = abDic[abName].LoadAsset(resName);
|
||||
if (obj is GameObject)
|
||||
return Instantiate(obj);
|
||||
else
|
||||
return obj;
|
||||
}
|
||||
|
||||
//同步加载 根据type指定类型
|
||||
public Object LoadRes(string abName, string resName, System.Type type)
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
Object obj = abDic[abName].LoadAsset(resName, type);
|
||||
if (obj is GameObject)
|
||||
return Instantiate(obj);
|
||||
else
|
||||
return obj;
|
||||
}
|
||||
|
||||
//同步加载 根据泛型指定类型
|
||||
public T LoadRes<T>(string abName, string resName) where T:Object
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
T obj = abDic[abName].LoadAsset<T>(resName);
|
||||
if (obj is GameObject)
|
||||
return Instantiate(obj);
|
||||
else
|
||||
return obj;
|
||||
}
|
||||
|
||||
//异步加载的方法
|
||||
//这里的异步加载 AB包并没有使用异步加载
|
||||
//知识从AB包中 加载资源时 使用异步
|
||||
//根据名字异步加载资源
|
||||
public void LoadResAsync(string abName, string resName, UnityAction<Object> callBack)
|
||||
{
|
||||
StartCoroutine(ReallyLoadResAsync(abName, resName, callBack));
|
||||
}
|
||||
private IEnumerator ReallyLoadResAsync(string abName, string resName, UnityAction<Object> callBack)
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
AssetBundleRequest abr = abDic[abName].LoadAssetAsync(resName);
|
||||
yield return abr;
|
||||
//异步加载结束后 通过委托 传递给外部 外部来使用
|
||||
if (abr.asset is GameObject)
|
||||
callBack(Instantiate(abr.asset));
|
||||
else
|
||||
callBack(abr.asset);
|
||||
}
|
||||
|
||||
//根据Type异步加载资源
|
||||
public void LoadResAsync(string abName, string resName, System.Type type, UnityAction<Object> callBack)
|
||||
{
|
||||
StartCoroutine(ReallyLoadResAsync(abName, resName, type, callBack));
|
||||
}
|
||||
private IEnumerator ReallyLoadResAsync(string abName, string resName, System.Type type, UnityAction<Object> callBack)
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
AssetBundleRequest abr = abDic[abName].LoadAssetAsync(resName, type);
|
||||
yield return abr;
|
||||
//异步加载结束后 通过委托 传递给外部 外部来使用
|
||||
if (abr.asset is GameObject)
|
||||
callBack(Instantiate(abr.asset));
|
||||
else
|
||||
callBack(abr.asset);
|
||||
}
|
||||
|
||||
|
||||
//根据泛型 异步加载资源
|
||||
public void LoadResAsync<T>(string abName, string resName, UnityAction<T> callBack) where T:Object
|
||||
{
|
||||
StartCoroutine(ReallyLoadResAsync<T>(abName, resName, callBack));
|
||||
}
|
||||
private IEnumerator ReallyLoadResAsync<T>(string abName, string resName, UnityAction<T> callBack) where T : Object
|
||||
{
|
||||
//加载AB包
|
||||
LoadAB(abName);
|
||||
//为了外面方便 在加载资源时 判断一下 资源是不是GameObject
|
||||
//如果是 直接实例化了 再返回给外部
|
||||
AssetBundleRequest abr = abDic[abName].LoadAssetAsync<T>(resName);
|
||||
yield return abr;
|
||||
//异步加载结束后 通过委托 传递给外部 外部来使用
|
||||
if (abr.asset is GameObject)
|
||||
callBack(Instantiate(abr.asset) as T);
|
||||
else
|
||||
callBack(abr.asset as T);
|
||||
}
|
||||
|
||||
//单个包卸载
|
||||
public void UnLoad(string abName)
|
||||
{
|
||||
if( abDic.ContainsKey(abName) )
|
||||
{
|
||||
abDic[abName].Unload(false);
|
||||
abDic.Remove(abName);
|
||||
}
|
||||
}
|
||||
|
||||
//所有包的卸载
|
||||
public void ClearAB()
|
||||
{
|
||||
AssetBundle.UnloadAllAssetBundles(false);
|
||||
abDic.Clear();
|
||||
mainAB = null;
|
||||
manifest = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AutoMonoSingleton<T>: MonoBehaviour where T : MonoBehaviour
|
||||
{
|
||||
private static T _instance;
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if(_instance==null)
|
||||
{
|
||||
GameObject obj = new GameObject();
|
||||
obj.name = typeof(T).ToString();
|
||||
DontDestroyOnLoad(obj);
|
||||
_instance = obj.AddComponent<T>();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MonoSingleton<T> : MonoBehaviour where T : MonoBehaviour
|
||||
{
|
||||
private static T _instance;
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance==null)
|
||||
{
|
||||
_instance = FindObjectOfType<T>();
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new GameObject().AddComponent<T>();
|
||||
}
|
||||
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
protected virtual void Awake()
|
||||
{
|
||||
_instance = this as T;
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Singleton<T> where T:new()
|
||||
{
|
||||
private static T _instance;
|
||||
public static T Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
_instance = new T();
|
||||
return _instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,529 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class AnimationClipCreator2D : EditorWindow
|
||||
{
|
||||
private Vector2 scrollDirectoryPos; //文件夹滚动条
|
||||
private Vector2 scrollAnimationClipPos; //动画滚动条
|
||||
|
||||
|
||||
// 全局设置
|
||||
private string rootFolderPath = "Assets/SpriteGroups"; // 源根目录
|
||||
private string saveFolderPath = "Assets/Animations"; // 输出根目录
|
||||
private string fixedSpritePrefix = "Sprite"; // 固定序列帧前缀
|
||||
private int defaultNumCount = 5; // 序号补零位数
|
||||
private bool showItems = true;
|
||||
|
||||
//// 已发现的子文件夹
|
||||
//private List<string> subFolders = new List<string>();
|
||||
//private List<string> subFolderNames = new List<string>();
|
||||
//private List<bool> subFolderToggles = new List<bool>();
|
||||
|
||||
// 动画条目
|
||||
[System.Serializable]
|
||||
private class AnimItem
|
||||
{
|
||||
public string animName = "Idle";
|
||||
public int startFrame = 0;
|
||||
public int endFrame = 10;
|
||||
public float frameRate = 12f;
|
||||
public bool overrideNumCount = false;
|
||||
public int numCount = 5;
|
||||
}
|
||||
|
||||
private List<AnimItem> items = new List<AnimItem>()
|
||||
{
|
||||
new AnimItem(){ animName="Idle", startFrame=0, endFrame=10, frameRate=12f },
|
||||
new AnimItem(){ animName="Run", startFrame=0, endFrame=7, frameRate=12f },
|
||||
};
|
||||
|
||||
// EditorPrefs keys
|
||||
private const string PREF_ROOT = "AnimCreator_RootPath";
|
||||
private const string PREF_SAVE = "AnimCreator_SavePath";
|
||||
private const string PREF_PREFIX = "AnimCreator_FixedPrefix";
|
||||
private const string PREF_NUMCOUNT = "AnimCreator_NumCount";
|
||||
|
||||
[MenuItem("Tools/2D Animation Clip Creator (Folders)")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var window = GetWindow<AnimationClipCreator2D>("Animation Clip Creator");
|
||||
window.LoadPrefs();
|
||||
window.LoadAnimItems(); // 加载动画条目
|
||||
}
|
||||
private void OnGUI()
|
||||
{
|
||||
|
||||
|
||||
GUILayout.Label("批量创建 AnimationClip(子文件夹驱动,固定 PNG 前缀)", EditorStyles.boldLabel);
|
||||
|
||||
rootFolderPath = EditorGUILayout.TextField("序列帧根目录", rootFolderPath);
|
||||
saveFolderPath = EditorGUILayout.TextField("输出动画根目录", saveFolderPath);
|
||||
fixedSpritePrefix = EditorGUILayout.TextField("固定序列帧前缀", fixedSpritePrefix);
|
||||
defaultNumCount = EditorGUILayout.IntField("默认补零位数", defaultNumCount);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("刷新子文件夹"))
|
||||
{
|
||||
RefreshFolderData();
|
||||
}
|
||||
EditorGUILayout.LabelField($"已发现子文件夹数量: {folderHasImages.Count}");
|
||||
EditorGUILayout.EndHorizontal();
|
||||
GUILayout.Label("选择要生成的子文件夹:", EditorStyles.boldLabel);
|
||||
|
||||
// 模式切换选项
|
||||
displayMode = (DisplayMode)EditorGUILayout.EnumPopup("显示模式", displayMode);
|
||||
// 子文件夹选择列表
|
||||
scrollDirectoryPos = EditorGUILayout.BeginScrollView(scrollDirectoryPos, GUILayout.MaxHeight(400));
|
||||
|
||||
if (folderHasImages.Count > 0)
|
||||
{
|
||||
|
||||
GUILayout.Space(10);
|
||||
|
||||
if (displayMode == DisplayMode.Grid)
|
||||
{
|
||||
DrawGridMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawTreeMode();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.EndScrollView();
|
||||
// 动画条目列表
|
||||
showItems = EditorGUILayout.BeginFoldoutHeaderGroup(showItems, $"动画条目列表 ({items.Count})");
|
||||
|
||||
scrollAnimationClipPos = EditorGUILayout.BeginScrollView(scrollAnimationClipPos);
|
||||
if (showItems)
|
||||
{
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
var it = items[i];
|
||||
EditorGUILayout.BeginVertical("box");
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
it.animName = EditorGUILayout.TextField("动画名字", it.animName);
|
||||
if (GUILayout.Button("删除", GUILayout.Width(60)))
|
||||
{
|
||||
items.RemoveAt(i);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.EndVertical();
|
||||
break;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
it.startFrame = EditorGUILayout.IntField("开始帧", it.startFrame);
|
||||
it.endFrame = EditorGUILayout.IntField("结束帧(含)", it.endFrame);
|
||||
it.frameRate = EditorGUILayout.FloatField("帧率", it.frameRate);
|
||||
|
||||
it.overrideNumCount = EditorGUILayout.Toggle("覆盖补零位数", it.overrideNumCount);
|
||||
if (it.overrideNumCount)
|
||||
it.numCount = EditorGUILayout.IntField("补零位数", it.numCount);
|
||||
|
||||
// 预览:用第一个子文件夹示例
|
||||
if (folderHasImages.Count > 0)
|
||||
{
|
||||
string folderName = "";
|
||||
foreach (var item in folderHasImages.Keys)
|
||||
{
|
||||
folderName=item;
|
||||
}
|
||||
|
||||
int nc = it.overrideNumCount ? it.numCount : defaultNumCount;
|
||||
string sampleIndex = it.startFrame.ToString("D" + nc);
|
||||
string samplePng = $"{fixedSpritePrefix}{sampleIndex}.png";
|
||||
string sampleOut = $"{Path.GetFileName(folderName)}_{it.animName}.anim";
|
||||
EditorGUILayout.HelpBox(
|
||||
$"示例 PNG 路径:\n{rootFolderPath}/{folderName}/{samplePng}\n" +
|
||||
$"输出动画文件名:\n{sampleOut}\n" +
|
||||
$"输出动画完整路径:\n{saveFolderPath}/{folderName}/{sampleOut}",
|
||||
MessageType.None
|
||||
);
|
||||
}
|
||||
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
if (GUILayout.Button("添加新动画条目"))
|
||||
{
|
||||
items.Add(new AnimItem()
|
||||
{
|
||||
animName = "NewAnim",
|
||||
startFrame = 0,
|
||||
endFrame = 10,
|
||||
frameRate = 12f,
|
||||
overrideNumCount = false,
|
||||
numCount = defaultNumCount
|
||||
});
|
||||
}
|
||||
}
|
||||
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||
EditorGUILayout.EndScrollView();
|
||||
GUILayout.Space(8);
|
||||
if (GUILayout.Button("批量创建 AnimationClips", GUILayout.Height(30)))
|
||||
{
|
||||
SavePrefs();
|
||||
SaveAnimItems();
|
||||
CreateAnimationClips();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 定义模式枚举
|
||||
private enum DisplayMode { Grid, Tree }
|
||||
private DisplayMode displayMode = DisplayMode.Grid;
|
||||
|
||||
// 状态字典(按完整路径存)
|
||||
|
||||
private Dictionary<string, bool> folderToggles = new Dictionary<string, bool>(); //目录的toggle值
|
||||
private Dictionary<string, bool> folderHasImages = new Dictionary<string, bool>(); //目录是否带图片
|
||||
private Dictionary<string, string> folderAsSubName = new Dictionary<string, string>(); //末端目录名称
|
||||
#region 树形
|
||||
private Dictionary<string, bool> folderFoldouts = new Dictionary<string, bool>(); //文件夹展开状态
|
||||
// 递归刷新:构建状态字典(包含根)
|
||||
private void RefreshFolderData()
|
||||
{
|
||||
folderFoldouts.Clear();
|
||||
folderAsSubName.Clear();
|
||||
folderToggles.Clear();
|
||||
folderHasImages.Clear();
|
||||
|
||||
if (!Directory.Exists(rootFolderPath))
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误", "根目录不存在!", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
// 加入根目录本身
|
||||
EnsureNode(rootFolderPath);
|
||||
|
||||
// 递归加入所有子目录
|
||||
CollectNodesRecursive(rootFolderPath);
|
||||
Repaint();
|
||||
}
|
||||
#endregion
|
||||
// 平铺模式(横向自动换行)
|
||||
private void DrawGridMode()
|
||||
{
|
||||
|
||||
|
||||
if (folderHasImages.Count > 0)
|
||||
{
|
||||
float viewWidth = EditorGUIUtility.currentViewWidth - 20;
|
||||
float itemWidth = 140f;
|
||||
float spacing = 10f;
|
||||
float currentRowWidth = 0f;
|
||||
|
||||
EditorGUILayout.BeginVertical();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
foreach (var folder in folderHasImages.Keys) //随便找一个列表的键来便利所有的目录
|
||||
{
|
||||
|
||||
if (currentRowWidth + (itemWidth + spacing) > viewWidth)
|
||||
{
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
currentRowWidth = 0f;
|
||||
}
|
||||
string folderPath = folder;
|
||||
//folderToggles[folderPath] = EditorGUILayout.ToggleLeft(subFolderNames[i], folderToggles[folderPath]);
|
||||
|
||||
|
||||
EditorGUILayout.BeginVertical("box", GUILayout.Width(itemWidth));
|
||||
folderToggles[folderPath] = EditorGUILayout.ToggleLeft(Path.GetFileName(folderPath), folderToggles[folderPath]);
|
||||
//subFolderToggles[i] = EditorGUILayout.ToggleLeft(subFolderNames[i], subFolderToggles[i]);
|
||||
string status = folderHasImages[folderPath] ? " 有图片" : " 无图片";
|
||||
EditorGUILayout.LabelField(status, EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.EndVertical();
|
||||
|
||||
currentRowWidth += itemWidth + spacing;
|
||||
}
|
||||
|
||||
EditorGUILayout.EndHorizontal();
|
||||
EditorGUILayout.EndVertical();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 将一个目录加入字典(若已存在则保留原值)
|
||||
private void EnsureNode(string path)
|
||||
{
|
||||
string norm = path.Replace('\\', '/');
|
||||
|
||||
if (!folderFoldouts.ContainsKey(norm))
|
||||
folderFoldouts[norm] = true; // 默认展开
|
||||
|
||||
if (!folderHasImages.ContainsKey(norm))
|
||||
{
|
||||
// 当前目录是否有 .png
|
||||
bool hasPng = Directory.GetFiles(norm, "*.png").Length > 0;
|
||||
folderHasImages[norm] = hasPng;
|
||||
}
|
||||
string fileName = Path.GetFileName(norm);
|
||||
if (!folderAsSubName.ContainsKey(fileName))
|
||||
folderAsSubName[norm] = fileName; // 有图默认勾选,无图默认不勾选
|
||||
if (!folderToggles.ContainsKey(norm))
|
||||
folderToggles[norm] = folderHasImages[norm]; // 有图默认勾选,无图默认不勾选
|
||||
}
|
||||
|
||||
private void CollectNodesRecursive(string current)
|
||||
{
|
||||
var dirs = Directory.GetDirectories(current);
|
||||
foreach (var d in dirs)
|
||||
{
|
||||
string norm = d.Replace('\\', '/');
|
||||
EnsureNode(norm);
|
||||
CollectNodesRecursive(norm);
|
||||
}
|
||||
}
|
||||
|
||||
// 树形绘制(从根开始)
|
||||
private void DrawTreeMode()
|
||||
{
|
||||
if (!Directory.Exists(rootFolderPath))
|
||||
{
|
||||
EditorGUILayout.HelpBox("根目录不存在", MessageType.Error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
GUILayout.Label("选择要生成的子文件夹:", EditorStyles.boldLabel);
|
||||
DrawFolderTreeNode(rootFolderPath, 0);
|
||||
}
|
||||
|
||||
// 单节点绘制(折叠箭头 + 名字 + Toggle + 状态),递归子节点
|
||||
private void DrawFolderTreeNode(string path, int depth)
|
||||
{
|
||||
|
||||
string norm = path.Replace('\\', '/');
|
||||
string name = Path.GetFileName(norm);
|
||||
if (string.IsNullOrEmpty(name)) name = norm; // 根可能没有文件名
|
||||
|
||||
// 保证节点存在
|
||||
EnsureNode(norm);
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
GUILayout.Space(depth * 18f); // 缩进
|
||||
|
||||
// 折叠箭头 + 名字(true 参数启用丰富样式)
|
||||
folderFoldouts[norm] = EditorGUILayout.Foldout(folderFoldouts[norm], name, true);
|
||||
|
||||
// Toggle(同一行显示,宽度固定避免布局抖动)
|
||||
folderToggles[norm] = EditorGUILayout.Toggle(folderToggles[norm], GUILayout.Width(20));
|
||||
|
||||
// 状态文本(自动换行)
|
||||
string status = folderHasImages[norm] ? " 有图片" : " 无图片";
|
||||
EditorGUILayout.LabelField(status, EditorStyles.wordWrappedLabel);
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
// 展开时绘制子目录
|
||||
if (folderFoldouts[norm])
|
||||
{
|
||||
var dirs = Directory.GetDirectories(norm);
|
||||
foreach (var d in dirs)
|
||||
{
|
||||
DrawFolderTreeNode(d, depth + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
SavePrefs();
|
||||
SaveAnimItems();
|
||||
}
|
||||
private const string PREF_ITEMS = "AnimCreator_AnimItems";
|
||||
|
||||
|
||||
|
||||
// 保存动画条目列表
|
||||
private void SaveAnimItems()
|
||||
{
|
||||
string json = JsonUtility.ToJson(new AnimItemListWrapper { items = this.items });
|
||||
EditorPrefs.SetString(PREF_ITEMS, json);
|
||||
}
|
||||
|
||||
// 加载动画条目列表
|
||||
private void LoadAnimItems()
|
||||
{
|
||||
if (EditorPrefs.HasKey(PREF_ITEMS))
|
||||
{
|
||||
string json = EditorPrefs.GetString(PREF_ITEMS);
|
||||
var wrapper = JsonUtility.FromJson<AnimItemListWrapper>(json);
|
||||
if (wrapper != null && wrapper.items != null)
|
||||
this.items = wrapper.items;
|
||||
}
|
||||
}
|
||||
|
||||
// 包装类用于序列化 List<AnimItem>
|
||||
[System.Serializable]
|
||||
private class AnimItemListWrapper
|
||||
{
|
||||
public List<AnimItem> items;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private void CreateAnimationClips()
|
||||
{
|
||||
if (folderHasImages.Count == 0)
|
||||
{
|
||||
EditorUtility.DisplayDialog("错误", "没有发现子文件夹!", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. 先筛选出所有选中的目录(避免循环中重复判断)
|
||||
var selectedFolders = folderToggles.Where(kv => kv.Value).Select(kv => kv.Key).ToList();
|
||||
if (selectedFolders.Count == 0)
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "请先选中要处理的文件夹!", "确定");
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. 计算总任务量(选中目录数 × 每个目录的动画数),让进度更平滑
|
||||
int totalTasks = selectedFolders.Count * items.Count;
|
||||
int completedTasks = 0;
|
||||
int created = 0;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var folderPath in selectedFolders)
|
||||
{
|
||||
string relativePath = folderPath.Substring(rootFolderPath.Length + 1);
|
||||
string outFolder = Path.Combine(saveFolderPath, relativePath).Replace('\\', '/');
|
||||
|
||||
// 创建输出目录(优化:统一刷新,避免多次调用 AssetDatabase.Refresh())
|
||||
if (!Directory.Exists(outFolder))
|
||||
{
|
||||
Directory.CreateDirectory(outFolder);
|
||||
}
|
||||
|
||||
foreach (var it in items)
|
||||
{
|
||||
// 3. 支持取消操作(用户点击进度条的“取消”按钮)
|
||||
if (EditorUtility.DisplayCancelableProgressBar(
|
||||
"批量创建动画",
|
||||
$"正在处理:{folderPath}\n动画:{it.animName}\n进度:{completedTasks + 1}/{totalTasks}",
|
||||
(float)completedTasks / totalTasks))
|
||||
{
|
||||
EditorUtility.DisplayDialog("提示", "操作已取消!", "确定");
|
||||
return; // 退出方法,不再继续处理
|
||||
}
|
||||
|
||||
// 跳过无效帧范围的动画
|
||||
if (it.endFrame < it.startFrame)
|
||||
{
|
||||
Debug.LogError($"动画 {it.animName} 的结束帧必须 >= 开始帧,跳过。");
|
||||
completedTasks++; // 即使跳过,也计入已完成任务量(避免进度卡住)
|
||||
continue;
|
||||
}
|
||||
|
||||
int numCount = it.overrideNumCount ? it.numCount : defaultNumCount;
|
||||
|
||||
var clip = new AnimationClip { frameRate = Mathf.Max(1f, it.frameRate) };
|
||||
var binding = new EditorCurveBinding
|
||||
{
|
||||
type = typeof(SpriteRenderer),
|
||||
path = "",
|
||||
propertyName = "m_Sprite"
|
||||
};
|
||||
|
||||
int len = it.endFrame - it.startFrame + 1;
|
||||
var keyframes = new ObjectReferenceKeyframe[len];
|
||||
int validCount = 0;
|
||||
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
int frameIndex = it.startFrame + i;
|
||||
string indexStr = frameIndex.ToString("D" + numCount);
|
||||
string pngName = $"{fixedSpritePrefix}{indexStr}.png";
|
||||
string spritePath = $"{folderPath}/{pngName}";
|
||||
|
||||
Sprite sprite = AssetDatabase.LoadAssetAtPath<Sprite>(spritePath);
|
||||
if (sprite == null)
|
||||
{
|
||||
Debug.LogWarning($"未找到图片: {spritePath}");
|
||||
continue;
|
||||
}
|
||||
|
||||
keyframes[i] = new ObjectReferenceKeyframe
|
||||
{
|
||||
time = i / clip.frameRate,
|
||||
value = sprite
|
||||
};
|
||||
validCount++;
|
||||
}
|
||||
|
||||
if (validCount == 0)
|
||||
{
|
||||
Debug.LogError($"动画 {it.animName} 在文件夹 {folderPath} 未找到任何有效序列帧,跳过。");
|
||||
completedTasks++;
|
||||
continue;
|
||||
}
|
||||
|
||||
AnimationUtility.SetObjectReferenceCurve(clip, binding, keyframes);
|
||||
|
||||
// 优化输出文件名(避免路径过长,用相对路径简化)
|
||||
string folderName = Path.GetFileName(folderPath);
|
||||
string outName = $"{folderName}_{it.animName}.anim";
|
||||
string outPath = Path.Combine(outFolder, outName).Replace('\\', '/');
|
||||
|
||||
// 确保路径以 Assets/ 开头(Unity 资源路径规范)
|
||||
if (!outPath.StartsWith("Assets/"))
|
||||
{
|
||||
outPath = outPath.Replace(Application.dataPath, "Assets");
|
||||
}
|
||||
|
||||
AssetDatabase.CreateAsset(clip, outPath);
|
||||
created++;
|
||||
completedTasks++; // 完成一个动画,更新任务计数
|
||||
Debug.Log($"已创建动画片段:{outPath}");
|
||||
}
|
||||
}
|
||||
|
||||
// 统一刷新资源数据库(优化性能,避免多次刷新)
|
||||
AssetDatabase.Refresh();
|
||||
AssetDatabase.SaveAssets();
|
||||
EditorUtility.DisplayDialog("完成", $"成功创建 {created} 个动画片段!", "确定");
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
// 异常处理:提示错误并关闭进度条
|
||||
EditorUtility.DisplayDialog("错误", $"创建动画失败:{e.Message}\n{e.StackTrace}", "确定");
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 4. 必须关闭进度条(无论成功/失败/取消)
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
}
|
||||
|
||||
// 保存设置到 EditorPrefs
|
||||
private void SavePrefs()
|
||||
{
|
||||
EditorPrefs.SetString(PREF_ROOT, rootFolderPath);
|
||||
EditorPrefs.SetString(PREF_SAVE, saveFolderPath);
|
||||
EditorPrefs.SetString(PREF_PREFIX, fixedSpritePrefix);
|
||||
EditorPrefs.SetInt(PREF_NUMCOUNT, defaultNumCount);
|
||||
}
|
||||
|
||||
// 加载设置
|
||||
private void LoadPrefs()
|
||||
{
|
||||
if (EditorPrefs.HasKey(PREF_ROOT)) rootFolderPath = EditorPrefs.GetString(PREF_ROOT);
|
||||
if (EditorPrefs.HasKey(PREF_SAVE)) saveFolderPath = EditorPrefs.GetString(PREF_SAVE);
|
||||
if (EditorPrefs.HasKey(PREF_PREFIX)) fixedSpritePrefix = EditorPrefs.GetString(PREF_PREFIX);
|
||||
if (EditorPrefs.HasKey(PREF_NUMCOUNT)) defaultNumCount = EditorPrefs.GetInt(PREF_NUMCOUNT);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public interface IEventInfo{
|
||||
}
|
||||
|
||||
public class EventInfo<T>:IEventInfo
|
||||
{
|
||||
public UnityAction<T> actions;
|
||||
public EventInfo(UnityAction<T> action)
|
||||
{
|
||||
actions += action;
|
||||
}
|
||||
}
|
||||
public class EventInfo : IEventInfo
|
||||
{
|
||||
public UnityAction actions;
|
||||
public EventInfo(UnityAction action)
|
||||
{
|
||||
actions += action;
|
||||
}
|
||||
}
|
||||
public class EventCenter : Singleton<EventCenter>
|
||||
{
|
||||
private Dictionary<string, IEventInfo> eventDic
|
||||
= new Dictionary<string, IEventInfo>();
|
||||
|
||||
public void AddEventListener<T>(string name,UnityAction<T> action)
|
||||
{
|
||||
if(eventDic.ContainsKey(name))
|
||||
{
|
||||
(eventDic[name] as EventInfo<T>).actions += action;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventDic.Add(name, new EventInfo<T>(action));
|
||||
}
|
||||
}
|
||||
|
||||
public void AddEventListener(string name, UnityAction action)
|
||||
{
|
||||
if (eventDic.ContainsKey(name))
|
||||
{
|
||||
(eventDic[name] as EventInfo).actions += action;
|
||||
}
|
||||
else
|
||||
{
|
||||
eventDic.Add(name, new EventInfo(action));
|
||||
}
|
||||
}
|
||||
|
||||
public void EventTrigger<T>(string name,T info)
|
||||
{
|
||||
if(eventDic.ContainsKey(name))
|
||||
{
|
||||
(eventDic[name] as EventInfo<T>).actions?.Invoke(info);
|
||||
}
|
||||
}
|
||||
public void EventTrigger(string name)
|
||||
{
|
||||
if (eventDic.ContainsKey(name))
|
||||
{
|
||||
(eventDic[name] as EventInfo).actions?.Invoke();
|
||||
}
|
||||
}
|
||||
public void RemoveEventListener<T>(string name, UnityAction<T> action)
|
||||
{
|
||||
if (eventDic.ContainsKey(name))
|
||||
{
|
||||
//移除这个委托
|
||||
(eventDic[name] as EventInfo<T>).actions -= action;
|
||||
}
|
||||
}
|
||||
public void RemoveEventListener(string name, UnityAction action)
|
||||
{
|
||||
if (eventDic.ContainsKey(name))
|
||||
{
|
||||
//移除这个委托
|
||||
(eventDic[name] as EventInfo).actions -= action;
|
||||
}
|
||||
}
|
||||
public void Clear()
|
||||
{
|
||||
eventDic.Clear();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class InputMgr : Singleton<InputMgr>
|
||||
{
|
||||
private bool isStart = false;
|
||||
public InputMgr()
|
||||
{
|
||||
MonoMgr.Instance.AddUpdateListener(MyUpdate);
|
||||
}
|
||||
public void StartOrEndCheck(bool isOpen)
|
||||
{
|
||||
isStart = isOpen;
|
||||
}
|
||||
private void MyUpdate()
|
||||
{
|
||||
if (!isStart)
|
||||
return;
|
||||
CheckKeyCode(KeyCode.J);
|
||||
CheckKeyCode(KeyCode.K);
|
||||
}
|
||||
private void CheckKeyCode(KeyCode key)
|
||||
{
|
||||
if(Input.GetKeyDown(key))
|
||||
{
|
||||
EventCenter.Instance.EventTrigger("KeyisDown", key);
|
||||
}
|
||||
if (Input.GetKeyUp(key))
|
||||
{
|
||||
EventCenter.Instance.EventTrigger("KeyisUp", key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 用法
|
||||
//public class Inputtest : MonoBehaviour
|
||||
//{
|
||||
// void Start()
|
||||
// {
|
||||
// //开启输入检测
|
||||
// InputMgr.GetInstance().StartOrEndCheck(true);
|
||||
// //添加事件监听
|
||||
// EventCenter.GetInstance().AddEventListener<KeyCode>("KeyisDown", CheckInputDown);
|
||||
// EventCenter.GetInstance().AddEventListener<KeyCode>("KeyisUp", CheckInputUp);
|
||||
// }
|
||||
// private void CheckInputDown(KeyCode obj)
|
||||
// {
|
||||
// switch (obj)
|
||||
// {
|
||||
// case KeyCode.W:
|
||||
// Debug.Log("前进");
|
||||
// break;
|
||||
// case KeyCode.A:
|
||||
// break;
|
||||
// case KeyCode.S:
|
||||
// break;
|
||||
// case KeyCode.D:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// private void CheckInputUp(KeyCode obj)
|
||||
// {
|
||||
// switch (obj)
|
||||
// {
|
||||
// case KeyCode.W:
|
||||
// Debug.Log("不再前进");
|
||||
// break;
|
||||
// case KeyCode.A:
|
||||
// break;
|
||||
// case KeyCode.S:
|
||||
// break;
|
||||
// case KeyCode.D:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// private void OnDestroy()
|
||||
// {
|
||||
// EventCenter.GetInstance().RemoveEventListener<KeyCode>("KeyisDown", CheckInputDown);
|
||||
// EventCenter.GetInstance().RemoveEventListener<KeyCode>("KeyisUp", CheckInputUp);
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class MonoController : MonoBehaviour
|
||||
{
|
||||
private event UnityAction updateEvent;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if(updateEvent!=null)
|
||||
{
|
||||
updateEvent();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddUpdateListener(UnityAction func)
|
||||
{
|
||||
updateEvent += func;
|
||||
}
|
||||
public void RemoveUpdateListener(UnityAction func)
|
||||
{
|
||||
updateEvent -= func;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.Internal;
|
||||
|
||||
public class MonoMgr : Singleton<MonoMgr>
|
||||
{
|
||||
private MonoController controller;
|
||||
public MonoMgr()
|
||||
{
|
||||
GameObject obj = new GameObject("MonoController");
|
||||
controller = obj.AddComponent<MonoController>();
|
||||
}
|
||||
public void AddUpdateListener(UnityAction func)
|
||||
{
|
||||
controller.AddUpdateListener(func);
|
||||
}
|
||||
public void RemoveUpdateListener(UnityAction func)
|
||||
{
|
||||
controller.RemoveUpdateListener(func);
|
||||
}
|
||||
public Coroutine StartCoroutine(IEnumerator routine)
|
||||
{
|
||||
return controller.StartCoroutine(routine);
|
||||
}
|
||||
|
||||
public Coroutine StartCoroutine(string methodName,[DefaultValue("null")]object value)
|
||||
{
|
||||
return controller.StartCoroutine(methodName, value);
|
||||
}
|
||||
public Coroutine StartCoroutine(string methodName)
|
||||
{
|
||||
return controller.StartCoroutine(methodName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
public class MusicMgr : Singleton<MusicMgr>
|
||||
{
|
||||
private AudioSource bkMusic = null;
|
||||
private float bkVaule = 1;
|
||||
private float soundVaule = 1;
|
||||
private GameObject soundObj = null;
|
||||
private List<AudioSource> soundList = new List<AudioSource>();
|
||||
|
||||
public MusicMgr()
|
||||
{
|
||||
MonoMgr.Instance.AddUpdateListener(MyUpdate);
|
||||
}
|
||||
|
||||
private void MyUpdate()
|
||||
{
|
||||
for(int i=soundList.Count-1;i>=0;i--)
|
||||
{
|
||||
if(soundList[i].isPlaying)
|
||||
{
|
||||
Object.Destroy(soundList[i]);
|
||||
soundList.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void PlayBKMusic(string name)
|
||||
{
|
||||
if(bkMusic==null)
|
||||
{
|
||||
GameObject obj = new GameObject("BKMusic");
|
||||
bkMusic = obj.AddComponent<AudioSource>();
|
||||
}
|
||||
ResMgr.Instance.LoadAsync<AudioClip>("Music/BackgrondMusic/" + name,
|
||||
(clip) =>
|
||||
{
|
||||
bkMusic.clip = clip;
|
||||
bkMusic.loop = true;
|
||||
bkMusic.volume = bkVaule;
|
||||
bkMusic.Play();
|
||||
});
|
||||
}
|
||||
|
||||
public void ChangeBKValue(float v)
|
||||
{
|
||||
bkVaule = v;
|
||||
if(bkMusic=null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bkMusic.volume = bkVaule;
|
||||
}
|
||||
|
||||
public void PauseBKMusic()
|
||||
{
|
||||
if (bkMusic = null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bkMusic.Pause();
|
||||
}
|
||||
public void StopBKMusic()
|
||||
{
|
||||
if (bkMusic = null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bkMusic.Stop();
|
||||
}
|
||||
|
||||
public void PlaySound(string name,bool isLoop,UnityAction<AudioSource> callback=null)
|
||||
{
|
||||
if(soundObj==null)
|
||||
{
|
||||
soundObj = new GameObject();
|
||||
soundObj.name = "Sounds";
|
||||
}
|
||||
AudioSource source = soundObj.AddComponent<AudioSource>();
|
||||
ResMgr.Instance.LoadAsync<AudioClip>("Music/Sounds/" + name,
|
||||
(clip) =>
|
||||
{
|
||||
source.clip = clip;
|
||||
source.loop = isLoop;
|
||||
source.volume = soundVaule;
|
||||
source.Play();
|
||||
soundList.Add(source);
|
||||
if (callback != null)
|
||||
{
|
||||
callback(source);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void ChangeSoundValue(float value)
|
||||
{
|
||||
soundVaule = value;
|
||||
for(int i=0;i<soundList.Count;++i)
|
||||
{
|
||||
soundList[i].volume = value;
|
||||
}
|
||||
}
|
||||
|
||||
public void StopSound(AudioSource source)
|
||||
{
|
||||
if(soundList.Contains(source))
|
||||
{
|
||||
soundList.Remove(source);
|
||||
source.Stop();
|
||||
Object.Destroy(source);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PoolData
|
||||
{
|
||||
public GameObject fatherObj;
|
||||
public List<GameObject> poolList;
|
||||
public PoolData(GameObject obj,GameObject poolParent)
|
||||
{
|
||||
fatherObj = new GameObject(obj.name);
|
||||
fatherObj.transform.parent = poolParent.transform;
|
||||
poolList = new List<GameObject>();
|
||||
PushObj(obj);
|
||||
}
|
||||
|
||||
public void PushObj(GameObject obj)
|
||||
{
|
||||
poolList.Add(obj);
|
||||
obj.transform.parent = fatherObj.transform;
|
||||
obj.SetActive(false);
|
||||
}
|
||||
|
||||
public GameObject GetObj()
|
||||
{
|
||||
GameObject obj;
|
||||
obj = poolList[0];
|
||||
poolList.RemoveAt(0);
|
||||
obj.SetActive(true);
|
||||
obj.transform.parent = null;
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
public class Pool : Singleton<Pool>
|
||||
{
|
||||
public Dictionary<string, PoolData> dic = new Dictionary<string, PoolData>();//生成一个字典
|
||||
private GameObject poolObj;//Scene窗口中的“pool”总收纳盒
|
||||
public GameObject Get(string name, Vector3 position, Quaternion rotation)//返回一个预制体,
|
||||
{
|
||||
GameObject obj;
|
||||
if (dic.ContainsKey(name) && dic[name].poolList.Count > 0)//如果字典里有这个东西,并且它的数量大于0就取出来
|
||||
{
|
||||
obj = dic[name].GetObj();
|
||||
obj.transform.position = position;//实例化时候的参数传过来
|
||||
obj.transform.rotation = rotation;//同上
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = Object.Instantiate(Resources.Load(name), position, rotation) as GameObject;//没有就读取一个,不用存入字典
|
||||
obj.name = name;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
public GameObject Return(GameObject obj)//隐藏掉
|
||||
{
|
||||
if(obj.activeSelf)
|
||||
{
|
||||
if(poolObj==null)
|
||||
{
|
||||
poolObj = new GameObject("pool");
|
||||
}
|
||||
string name = obj.name;
|
||||
if (dic.ContainsKey(name))//如果找到了这个名字
|
||||
{
|
||||
dic[name].PushObj(obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
dic.Add(name, new PoolData(obj, poolObj) { });
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
public void Clear()//切换场景时将所有缓存清除
|
||||
{
|
||||
dic.Clear();
|
||||
poolObj = null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
public class ResMgr : Singleton<ResMgr>
|
||||
{
|
||||
public T Load<T>(string name)where T:Object
|
||||
{
|
||||
T res = Resources.Load<T>(name);
|
||||
if (res is GameObject)
|
||||
return Object.Instantiate(res);
|
||||
else
|
||||
return res;
|
||||
}
|
||||
public T Load<T>(string name,Vector3 position,Quaternion rotation) where T : Object
|
||||
{
|
||||
T res = Resources.Load<T>(name);
|
||||
if (res is GameObject)
|
||||
return Object.Instantiate(res, position, rotation);
|
||||
else
|
||||
return res;
|
||||
}
|
||||
public void LoadAsync<T>(string name,UnityAction<T> callback)where T:Object
|
||||
{
|
||||
MonoMgr.Instance.StartCoroutine(ReallyLoadAsync(name,callback));
|
||||
}
|
||||
private IEnumerator ReallyLoadAsync<T>(string name,UnityAction<T> callback)where T:Object
|
||||
{
|
||||
ResourceRequest r = Resources.LoadAsync<T>(name);
|
||||
yield return r;
|
||||
if (r.asset is GameObject)
|
||||
{
|
||||
callback(Object.Instantiate(r.asset) as T);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(r.asset as T);
|
||||
}
|
||||
}
|
||||
#region 异步加载使用方法(得到加载物体并设定位置等)
|
||||
//需要注意的是,异步加载中,调用异步加载后,物体并没有被加载,需要等n帧才会被加载,所以我们不能直接返回物体,而是在方法中将物体传出去。
|
||||
//private void Update()
|
||||
//{
|
||||
// if (Input.GetMouseButtonDown(1))
|
||||
// {
|
||||
// ResMgr.Instance.LoadAsync<GameObject>("cube", DoSome);
|
||||
// }
|
||||
//}
|
||||
//private void DoSome(GameObject obj)
|
||||
//{
|
||||
// Debug.Log("调用了回调函数");
|
||||
//}
|
||||
////为了方便,我们还可以直接使用Lambda表达式来方便书写
|
||||
//private void Update()
|
||||
//{
|
||||
// if (Input.GetMouseButtonDown(1))
|
||||
// {
|
||||
// ResMgr.GetInstance().LoadAsync<GameObject>("cube", (obj) =>
|
||||
// {
|
||||
// Debug.Log("调用了回调函数");
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
//Addressable
|
||||
public void AALoadAsync<T>(string name, UnityAction<T> callback) where T : Object
|
||||
{
|
||||
MonoMgr.Instance.StartCoroutine(AAReallyLoadAsync(name, callback));
|
||||
}
|
||||
private IEnumerator AAReallyLoadAsync<T>(string name, UnityAction<T> callback) where T : Object
|
||||
{
|
||||
AsyncOperationHandle async = Addressables.LoadAssetAsync<T>(name);
|
||||
yield return async;
|
||||
if (async.Result is GameObject)
|
||||
{
|
||||
callback(Object.Instantiate(async.Result as GameObject) as T);
|
||||
}
|
||||
else
|
||||
{
|
||||
callback(async.Result as T);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DontDestroyMgr : Singleton<DontDestroyMgr>
|
||||
{
|
||||
List<GameObject> dontDesObj = new List<GameObject>();
|
||||
public void DontDesOnLoad(GameObject obj)
|
||||
{
|
||||
if(!dontDesObj.Contains(obj))
|
||||
{
|
||||
Object.DontDestroyOnLoad(obj);
|
||||
dontDesObj.Add(obj);
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
foreach(GameObject obj in dontDesObj)
|
||||
{
|
||||
Object.DestroyImmediate(obj);
|
||||
}
|
||||
dontDesObj.Clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.SceneManagement;
|
||||
public class SceneMgr : Singleton<SceneMgr>
|
||||
{
|
||||
public void LoadScene(string name,UnityAction func)
|
||||
{
|
||||
SceneManager.LoadScene(name);
|
||||
func();
|
||||
}
|
||||
|
||||
public void LoadSceneAsync(string name,UnityAction func)
|
||||
{
|
||||
MonoMgr.Instance.StartCoroutine(ReallyLoadSceneAsync(name, func));
|
||||
}
|
||||
|
||||
private IEnumerator ReallyLoadSceneAsync(string name,UnityAction func)
|
||||
{
|
||||
AsyncOperation ao = SceneManager.LoadSceneAsync(name);
|
||||
while(!ao.isDone)
|
||||
{
|
||||
EventCenter.Instance.EventTrigger("Loading", ao.progress);
|
||||
yield return ao.progress;
|
||||
}
|
||||
func();
|
||||
}
|
||||
|
||||
public string GetActiveSceneName()
|
||||
{
|
||||
return SceneManager.GetActiveScene().name;
|
||||
}
|
||||
|
||||
public void AALoadSceneAsync(string name, UnityAction func)
|
||||
{
|
||||
|
||||
MonoMgr.Instance.StartCoroutine(AAReallyLoadSceneAsync(name + ".unity", func));
|
||||
}
|
||||
|
||||
private IEnumerator AAReallyLoadSceneAsync(string name, UnityAction func)
|
||||
{
|
||||
AsyncOperationHandle async = Addressables.LoadSceneAsync(name);
|
||||
while (!async.IsDone)
|
||||
{
|
||||
EventCenter.Instance.EventTrigger("Loading", async.PercentComplete);
|
||||
yield return async.PercentComplete;
|
||||
}
|
||||
func();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Linq;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
/// This just exposes the Sorting Layer / Order in MeshRenderer since it's there
|
||||
/// but not displayed in the inspector. Getting MeshRenderer to render in front
|
||||
/// of a SpriteRenderer is pretty hard without this.
|
||||
[CustomEditor(typeof(MeshRenderer))]
|
||||
public class MeshRendererSortingEditor : Editor
|
||||
{
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
base.OnInspectorGUI();
|
||||
|
||||
MeshRenderer renderer = target as MeshRenderer;
|
||||
|
||||
|
||||
var layers = SortingLayer.layers;
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
int newId = DrawSortingLayersPopup(renderer.sortingLayerID);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
renderer.sortingLayerID = newId;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
EditorGUI.BeginChangeCheck();
|
||||
int order = EditorGUILayout.IntField("Sorting Order", renderer.sortingOrder);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
renderer.sortingOrder = order;
|
||||
}
|
||||
EditorGUILayout.EndHorizontal();
|
||||
|
||||
}
|
||||
|
||||
int DrawSortingLayersPopup(int layerID)
|
||||
{
|
||||
var layers = SortingLayer.layers;
|
||||
var names = layers.Select(l => l.name).ToArray();
|
||||
if (!SortingLayer.IsValid(layerID))
|
||||
{
|
||||
layerID = layers[0].id;
|
||||
}
|
||||
var layerValue = SortingLayer.GetLayerValueFromID(layerID);
|
||||
var newLayerValue = EditorGUILayout.Popup("Sorting Layer", layerValue, names);
|
||||
return layers[newLayerValue].id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// This is free and unencumbered software released into the public domain.
|
||||
//
|
||||
// Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
// distribute this software, either in source code form or as a compiled
|
||||
// binary, for any purpose, commercial or non-commercial, and by any
|
||||
// means.
|
||||
//
|
||||
// In jurisdictions that recognize copyright laws, the author or authors
|
||||
// of this software dedicate any and all copyright interest in the
|
||||
// software to the public domain. We make this dedication for the benefit
|
||||
// of the public at large and to the detriment of our heirs and
|
||||
// successors. We intend this dedication to be an overt act of
|
||||
// relinquishment in perpetuity of all present and future rights to this
|
||||
// software under copyright law.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
// For more information, please refer to <http://unlicense.org/>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,276 @@
|
||||
// File: Assets/Editor/PsbToUGUIWindow.cs
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
public class PsbToUGUIWindow : EditorWindow
|
||||
{
|
||||
[Header("Inputs")]
|
||||
private GameObject sourceRoot;
|
||||
private Canvas targetCanvas;
|
||||
|
||||
[Header("Config")]
|
||||
private float referencePPU = 100f; // Match PSD Importer Pixels Per Unit
|
||||
private bool copyAlphaFromRenderer = true;
|
||||
private bool preserveSortingOrder = true;
|
||||
private bool addRaycastTargets = false; // For UI images; off if purely visual
|
||||
private bool autoCreateCanvasIfMissing = true;
|
||||
private string parentName = "PSB_UI";
|
||||
|
||||
[MenuItem("Tools/PSB → UGUI Converter")]
|
||||
public static void ShowWindow()
|
||||
{
|
||||
var win = GetWindow<PsbToUGUIWindow>("PSB → UGUI");
|
||||
win.minSize = new Vector2(420, 320);
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
EditorGUILayout.LabelField("Source", EditorStyles.boldLabel);
|
||||
sourceRoot = (GameObject)EditorGUILayout.ObjectField(
|
||||
new GUIContent("PSB root (scene GameObject)", "Select the instantiated PSB root that contains SpriteRenderers"),
|
||||
sourceRoot, typeof(GameObject), true);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Target", EditorStyles.boldLabel);
|
||||
targetCanvas = (Canvas)EditorGUILayout.ObjectField(
|
||||
new GUIContent("Target Canvas", "Canvas to place generated UI under"),
|
||||
targetCanvas, typeof(Canvas), true);
|
||||
|
||||
autoCreateCanvasIfMissing = EditorGUILayout.Toggle(
|
||||
new GUIContent("Auto-create canvas if missing", "Create an Overlay Canvas+EventSystem when none provided"),
|
||||
autoCreateCanvasIfMissing
|
||||
);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
EditorGUILayout.LabelField("Conversion settings", EditorStyles.boldLabel);
|
||||
referencePPU = EditorGUILayout.FloatField(
|
||||
new GUIContent("Reference Pixels Per Unit", "Use the PSD Importer PPU (often 100). Controls world→UI pixel mapping"),
|
||||
referencePPU
|
||||
);
|
||||
copyAlphaFromRenderer = EditorGUILayout.Toggle(
|
||||
new GUIContent("Copy alpha from SpriteRenderer color", "Image color.a = SpriteRenderer.color.a"),
|
||||
copyAlphaFromRenderer
|
||||
);
|
||||
addRaycastTargets = EditorGUILayout.Toggle(
|
||||
new GUIContent("Enable raycast target on Images", "Turn off for purely decorative layers"),
|
||||
addRaycastTargets
|
||||
);
|
||||
preserveSortingOrder = EditorGUILayout.Toggle(
|
||||
new GUIContent("Preserve sorting order", "Use sortingOrder to set sibling order"),
|
||||
preserveSortingOrder
|
||||
);
|
||||
parentName = EditorGUILayout.TextField(
|
||||
new GUIContent("Parent name", "Name of the generated UI root under the Canvas"),
|
||||
parentName
|
||||
);
|
||||
|
||||
EditorGUILayout.Space();
|
||||
|
||||
using (new EditorGUI.DisabledScope(sourceRoot == null))
|
||||
{
|
||||
if (GUILayout.Button("Convert to UGUI"))
|
||||
{
|
||||
Convert();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Convert()
|
||||
{
|
||||
if (sourceRoot == null)
|
||||
{
|
||||
ShowNotification(new GUIContent("Select a source root."));
|
||||
return;
|
||||
}
|
||||
|
||||
Canvas canvas = targetCanvas;
|
||||
if (canvas == null && autoCreateCanvasIfMissing)
|
||||
{
|
||||
var canvasGO = new GameObject("Canvas", typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
canvas = canvasGO.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
var scaler = canvasGO.GetComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920, 1080);
|
||||
scaler.referencePixelsPerUnit = referencePPU;
|
||||
|
||||
if (FindObjectOfType<UnityEngine.EventSystems.EventSystem>() == null)
|
||||
{
|
||||
var es = new GameObject("EventSystem", typeof(UnityEngine.EventSystems.EventSystem), typeof(UnityEngine.EventSystems.StandaloneInputModule));
|
||||
Undo.RegisterCreatedObjectUndo(es, "Create EventSystem");
|
||||
}
|
||||
|
||||
Undo.RegisterCreatedObjectUndo(canvasGO, "Create Canvas");
|
||||
}
|
||||
|
||||
if (canvas == null)
|
||||
{
|
||||
ShowNotification(new GUIContent("Provide a Canvas or enable auto-create."));
|
||||
return;
|
||||
}
|
||||
|
||||
GameObject uiRootGO = new GameObject(string.IsNullOrEmpty(parentName) ? "PSB_UI" : parentName, typeof(RectTransform));
|
||||
Undo.RegisterCreatedObjectUndo(uiRootGO, "Create UI Root");
|
||||
uiRootGO.transform.SetParent(canvas.transform, false);
|
||||
var uiRootRT = uiRootGO.GetComponent<RectTransform>();
|
||||
uiRootRT.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
uiRootRT.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
uiRootRT.pivot = new Vector2(0.5f, 0.5f);
|
||||
uiRootRT.anchoredPosition = Vector2.zero;
|
||||
uiRootRT.localScale = Vector3.one;
|
||||
|
||||
var mapping = new Dictionary<Transform, RectTransform>();
|
||||
mapping[sourceRoot.transform] = uiRootRT;
|
||||
|
||||
var all = sourceRoot.GetComponentsInChildren<Transform>(true)
|
||||
.OrderBy(t => t == sourceRoot.transform ? -1 : 0)
|
||||
.ThenBy(t => t.GetSiblingIndex())
|
||||
.ToList();
|
||||
|
||||
foreach (var t in all)
|
||||
{
|
||||
if (t == sourceRoot.transform) continue;
|
||||
var parent = t.parent;
|
||||
if (!mapping.TryGetValue(parent, out var parentRT))
|
||||
{
|
||||
Debug.LogWarning($"Parent mapping missing for {t.name}. Skipping.");
|
||||
continue;
|
||||
}
|
||||
|
||||
var containerGO = new GameObject(t.name, typeof(RectTransform));
|
||||
Undo.RegisterCreatedObjectUndo(containerGO, "Create UI Container");
|
||||
var rt = containerGO.GetComponent<RectTransform>();
|
||||
containerGO.transform.SetParent(parentRT, false);
|
||||
|
||||
rt.localPosition = t.localPosition * referencePPU;
|
||||
rt.localRotation = t.localRotation;
|
||||
rt.localScale = t.localScale;
|
||||
|
||||
rt.anchorMin = new Vector2(0.5f, 0.5f);
|
||||
rt.anchorMax = new Vector2(0.5f, 0.5f);
|
||||
rt.pivot = new Vector2(0.5f, 0.5f);
|
||||
|
||||
mapping[t] = rt;
|
||||
}
|
||||
// Create UI Images for SpriteRenderers and export PNG files
|
||||
foreach (var kv in mapping.ToList())
|
||||
{
|
||||
var src = kv.Key;
|
||||
var dstRT = kv.Value;
|
||||
|
||||
var sr = src.GetComponent<SpriteRenderer>();
|
||||
if (sr == null || sr.sprite == null)
|
||||
continue;
|
||||
|
||||
Object prefab = PrefabUtility.GetCorrespondingObjectFromSource(sourceRoot);
|
||||
string psbPath = AssetDatabase.GetAssetPath(prefab);
|
||||
if (string.IsNullOrEmpty(psbPath))
|
||||
{
|
||||
psbPath = AssetDatabase.GetAssetPath(sr.sprite);
|
||||
}
|
||||
|
||||
string psbFolder = Path.GetDirectoryName(psbPath);
|
||||
if (string.IsNullOrEmpty(psbFolder))
|
||||
{
|
||||
Debug.LogError($"无法获取有效的 psb 文件夹路径,源对象: {sourceRoot.name}");
|
||||
continue;
|
||||
}
|
||||
string psbName = Path.GetFileNameWithoutExtension(psbPath);
|
||||
string targetFolder = Path.Combine(psbFolder, psbName);
|
||||
if (!AssetDatabase.IsValidFolder(targetFolder))
|
||||
{
|
||||
AssetDatabase.CreateFolder(psbFolder, psbName);
|
||||
}
|
||||
|
||||
// 使用 RenderTexture 拷贝再导出 PNG
|
||||
Sprite srcSprite = sr.sprite;
|
||||
Texture2D srcTex = srcSprite.texture;
|
||||
Rect rect = srcSprite.rect;
|
||||
int w = Mathf.RoundToInt(rect.width);
|
||||
int h = Mathf.RoundToInt(rect.height);
|
||||
|
||||
RenderTexture rt = RenderTexture.GetTemporary(srcTex.width, srcTex.height, 0);
|
||||
Graphics.Blit(srcTex, rt);
|
||||
RenderTexture.active = rt;
|
||||
|
||||
Texture2D outTex = new Texture2D(w, h, TextureFormat.RGBA32, false);
|
||||
outTex.ReadPixels(new Rect(rect.x, rect.y, rect.width, rect.height), 0, 0);
|
||||
outTex.Apply();
|
||||
|
||||
RenderTexture.active = null;
|
||||
RenderTexture.ReleaseTemporary(rt);
|
||||
|
||||
byte[] pngData = outTex.EncodeToPNG();
|
||||
string pngPath = Path.Combine(targetFolder, srcSprite.name + ".png");
|
||||
pngPath = AssetDatabase.GenerateUniqueAssetPath(pngPath);
|
||||
File.WriteAllBytes(pngPath, pngData);
|
||||
|
||||
AssetDatabase.ImportAsset(pngPath);
|
||||
var texImp = AssetImporter.GetAtPath(pngPath) as TextureImporter;
|
||||
if (texImp != null)
|
||||
{
|
||||
texImp.textureType = TextureImporterType.Sprite;
|
||||
texImp.spritePixelsPerUnit = referencePPU;
|
||||
texImp.alphaIsTransparency = true;
|
||||
texImp.spritePivot = srcSprite.pivot / new Vector2(rect.width, rect.height);
|
||||
texImp.SaveAndReimport();
|
||||
}
|
||||
|
||||
Sprite copiedSprite = AssetDatabase.LoadAssetAtPath<Sprite>(pngPath);
|
||||
|
||||
var img = dstRT.gameObject.AddComponent<Image>();
|
||||
img.sprite = copiedSprite;
|
||||
img.preserveAspect = false;
|
||||
img.raycastTarget = addRaycastTargets;
|
||||
|
||||
if (copyAlphaFromRenderer)
|
||||
{
|
||||
var c = img.color;
|
||||
c.a = sr.color.a;
|
||||
img.color = c;
|
||||
}
|
||||
|
||||
img.SetNativeSize();
|
||||
dstRT.pivot = copiedSprite.pivot / new Vector2(rect.width, rect.height);
|
||||
}
|
||||
|
||||
if (preserveSortingOrder)
|
||||
{
|
||||
var parents = mapping.Values.Select(rt => rt.parent).Distinct().Where(p => p != null);
|
||||
foreach (var p in parents)
|
||||
{
|
||||
var children = new List<RectTransform>();
|
||||
for (int i = 0; i < p.childCount; i++)
|
||||
{
|
||||
children.Add(p.GetChild(i) as RectTransform);
|
||||
}
|
||||
|
||||
children = children
|
||||
.OrderBy(rt =>
|
||||
{
|
||||
var correspondingSrc = mapping.FirstOrDefault(x => x.Value == rt).Key;
|
||||
var sr = correspondingSrc != null ? correspondingSrc.GetComponent<SpriteRenderer>() : null;
|
||||
int order = sr != null ? sr.sortingOrder : 0;
|
||||
return order;
|
||||
})
|
||||
.ThenBy(rt => rt.name)
|
||||
.ToList();
|
||||
|
||||
for (int i = 0; i < children.Count; i++)
|
||||
{
|
||||
children[i].SetSiblingIndex(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Selection.activeObject = uiRootGO;
|
||||
EditorGUIUtility.PingObject(uiRootGO);
|
||||
Debug.Log("PSB → UGUI conversion completed (sprites exported as PNG and assigned).");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class SubUIBase : UIBase
|
||||
{
|
||||
[HideInInspector] public SubUIManager uIManager;
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
|
||||
/// <summary>
|
||||
/// 子 UI 管理器:不继承 MonoBehaviour,适合子场景/模块内局部面板管理
|
||||
/// </summary>
|
||||
public class SubUIManager
|
||||
{
|
||||
public UIBase subUIBaseParent;
|
||||
private readonly Transform parent;
|
||||
private readonly Dictionary<UIPanel, SubUIBase> panels = new Dictionary<UIPanel, SubUIBase>();
|
||||
private readonly Dictionary<UIPanel, string> addressMap = new Dictionary<UIPanel, string>();
|
||||
|
||||
public SubUIManager(Transform parent, UIPanelAddressConfig uIPanelAddressConfig)
|
||||
{
|
||||
this.parent = parent;
|
||||
foreach (var entry in uIPanelAddressConfig.panels)
|
||||
{
|
||||
if (!addressMap.ContainsKey(entry.type))
|
||||
addressMap.Add(entry.type, entry.address);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 这里使用C#的异步所以操作建议在onshown中进行要不然外面的函数要加异步
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <param name="onShown"></param>
|
||||
public async void ShowAsync(UIPanel type, object args = null, System.Action<UIBase> onShown = null)
|
||||
{
|
||||
if (addressMap.ContainsKey(type)) {
|
||||
|
||||
UIBase uIBase = await LoadAndShowAsync(type, addressMap[type]);
|
||||
subUIBaseParent = uIBase;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("当前页面不存在");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async Task<SubUIBase> LoadAndShowAsync(UIPanel type, string address)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var existing) && existing != null)
|
||||
return existing;
|
||||
if (!addressMap.TryGetValue(type, out var obj) || obj == null)
|
||||
{
|
||||
Debug.LogError($"[SubUI] No prefab for {type}");
|
||||
return null;
|
||||
}
|
||||
|
||||
AsyncOperationHandle<GameObject> handle = Addressables.LoadAssetAsync<GameObject>(address);
|
||||
await handle.Task; // 等待异步完成
|
||||
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
var prefab = handle.Result;
|
||||
var instance = Object.Instantiate(prefab, parent).GetComponent<SubUIBase>();
|
||||
instance.uIManager = this;
|
||||
instance.name = $"Sub_{type}_Panel";
|
||||
instance.Init(type);
|
||||
panels[type] = instance;
|
||||
//return instance;
|
||||
|
||||
|
||||
//var instance = GetOrCreate(type, prefab);
|
||||
instance.Show();
|
||||
return instance;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Failed to load UI prefab at {address}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Hide(UIPanel type)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var panel) && panel != null)
|
||||
panel.Hide();
|
||||
}
|
||||
|
||||
public void Close(UIPanel type)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var panel) && panel != null)
|
||||
{
|
||||
panel.Hide();
|
||||
Object.Destroy(panel.gameObject);
|
||||
}
|
||||
panels.Remove(type);
|
||||
}
|
||||
|
||||
public void CloseAll()
|
||||
{
|
||||
foreach (var kv in panels)
|
||||
{
|
||||
if (kv.Value != null)
|
||||
{
|
||||
kv.Value.Hide();
|
||||
Object.Destroy(kv.Value.gameObject);
|
||||
}
|
||||
}
|
||||
panels.Clear();
|
||||
}
|
||||
|
||||
private UIBase GetOrCreate(UIPanel type,GameObject prefab)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var existing) && existing != null)
|
||||
return existing;
|
||||
|
||||
if (!addressMap.TryGetValue(type, out var obj) || prefab == null)
|
||||
{
|
||||
Debug.LogError($"[SubUI] No prefab for {type}");
|
||||
return null;
|
||||
}
|
||||
|
||||
var instance = Object.Instantiate(prefab, parent).GetComponent<SubUIBase>();
|
||||
instance.name = $"Sub_{type}_Panel";
|
||||
instance.Init(type);
|
||||
panels[type] = instance;
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// UI 基类:统一生命周期、显示/隐藏、入场出场动画钩子
|
||||
/// </summary>
|
||||
public abstract class UIBase : MonoBehaviour
|
||||
{
|
||||
public UIPanel PanelType { get; private set; }
|
||||
|
||||
// 初始化,由 UIManager 赋值
|
||||
public void Init(UIPanel type)
|
||||
{
|
||||
PanelType = type;
|
||||
OnInit();
|
||||
}
|
||||
|
||||
// 生命周期钩子
|
||||
protected virtual void OnInit() { }
|
||||
protected virtual void OnShow(object args = null) { }
|
||||
protected virtual void OnHide() { }
|
||||
|
||||
public virtual void Show(object args = null)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
OnShow(args);
|
||||
}
|
||||
|
||||
public virtual void Hide()
|
||||
{
|
||||
OnHide();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
using Unity.VisualScripting.FullSerializer;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using System.Net;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
//ui面板枚举 这里要求分类 Main *00 *00-*99 整数为主界面尾数为子界面
|
||||
public enum UIPanel
|
||||
{
|
||||
None = 0,
|
||||
LoginPanel = 10,
|
||||
#region 100-199HomePanel
|
||||
//100-150center界面
|
||||
HomeMainPanel = 100,
|
||||
SelectRoomLevelPenel = 101,
|
||||
//150-199 Margin界面
|
||||
VIPPenel = 151,
|
||||
JJJPenel = 152,
|
||||
HDPenel = 153,
|
||||
|
||||
MonthCardPanel=161,
|
||||
BackPackPanel=162,
|
||||
AnnouncementPanel=163,
|
||||
RankPanel=164,
|
||||
EmailPanel=165,
|
||||
SafeBoxPanel=166,
|
||||
ServicePanel=167,
|
||||
ShopPanel=168,
|
||||
|
||||
TurretPanel=181,
|
||||
ZSPanel=182,
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class UIManager : MonoSingleton<UIManager>
|
||||
{
|
||||
// 已加载的面板实例 主面板列表
|
||||
private readonly Dictionary<UIPanel, UIBase> panels = new Dictionary<UIPanel, UIBase>();
|
||||
[SerializeField] private UIPanelAddressConfig config;
|
||||
|
||||
|
||||
// 父节点(可指定到 Canvas 下某个容器)
|
||||
[SerializeField] private Transform uiRoot;
|
||||
|
||||
private Dictionary<UIPanel, string> addressMap = new Dictionary<UIPanel, string>(); //第二种加载
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
foreach (var entry in config.panels)
|
||||
{
|
||||
if (!addressMap.ContainsKey(entry.type))
|
||||
addressMap.Add(entry.type, entry.address);
|
||||
}
|
||||
|
||||
if (uiRoot == null)
|
||||
{
|
||||
var canvas = FindObjectOfType<Canvas>();
|
||||
uiRoot = canvas != null ? canvas.transform : transform;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步显示(若未实例化则立即实例化)
|
||||
/// </summary>
|
||||
public UIBase Show(UIPanel type, object args = null)
|
||||
{
|
||||
if (addressMap.ContainsKey(type))
|
||||
{
|
||||
// 模拟异步:此处可替换为真正的资源加载(Addressables/AssetBundle)
|
||||
var handle = Addressables.LoadAsset<GameObject>(addressMap[type]);
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
var panel = GetOrCreatePanel(type, handle.Result);
|
||||
panel?.Show(args);
|
||||
return panel;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Failed to load UI prefab for {type}");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("加载失败" + type.ToString() + "不存在");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Addressables/异步加载 关闭另外一个面板
|
||||
/// </summary>
|
||||
public Coroutine ShowAsync(UIPanel type, UIPanel isClosePanel,object args = null, Action<UIBase> onShown = null)
|
||||
{
|
||||
if (isClosePanel == 0)
|
||||
return StartCoroutine(CoShow(type, args, onShown));
|
||||
else
|
||||
{
|
||||
return StartCoroutine(CoShow(type, args, onShown, isClosePanel));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Addressables/异步加载
|
||||
/// </summary>
|
||||
public Coroutine ShowAsync(UIPanel type, object args = null, Action<UIBase> onShown = null)
|
||||
{
|
||||
return StartCoroutine(CoShow(type, args, onShown));
|
||||
}
|
||||
private IEnumerator CoShow(UIPanel type, object args, Action<UIBase> onShown)
|
||||
{
|
||||
if (addressMap.ContainsKey(type))
|
||||
{
|
||||
// 模拟异步:此处可替换为真正的资源加载(Addressables/AssetBundle)
|
||||
var handle = Addressables.LoadAssetAsync<GameObject>(addressMap[type]);
|
||||
yield return handle;
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
var panel = GetOrCreatePanel(type, handle.Result);
|
||||
panel?.Show(args);
|
||||
onShown?.Invoke(panel);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Failed to load UI prefab for {type}");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("加载失败" + type.ToString() + "不存在");
|
||||
yield break;
|
||||
}
|
||||
|
||||
}
|
||||
private IEnumerator CoShow(UIPanel type, object args, Action<UIBase> onShown,UIPanel uIPanel)
|
||||
{
|
||||
|
||||
if (addressMap.ContainsKey(type))
|
||||
{
|
||||
// 模拟异步:此处可替换为真正的资源加载(Addressables/AssetBundle)
|
||||
var handle = Addressables.LoadAssetAsync<GameObject>(addressMap[type]);
|
||||
yield return handle;
|
||||
if (handle.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
var panel = GetOrCreatePanel(type, handle.Result);
|
||||
panel?.Show(args);
|
||||
onShown?.Invoke(panel);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Failed to load UI prefab for {type}");
|
||||
UIManager.Instance.Close(uIPanel);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("加载失败" + type.ToString() + "不存在");
|
||||
UIManager.Instance.Get<UIBase>(uIPanel)?.Show();
|
||||
yield break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 隐藏
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
public void Hide(UIPanel type)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var panel) && panel != null)
|
||||
{
|
||||
panel.Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning($"Hide failed: panel {type} not found.");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsShown(UIPanel type)
|
||||
{
|
||||
return panels.TryGetValue(type, out var panel) && panel.gameObject.activeSelf;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取uiPanel 有就返回没有就返回空
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public T Get<T>(UIPanel type) where T : UIBase
|
||||
{
|
||||
return panels.TryGetValue(type, out var panel) ? panel as T : null;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取或者创建panel
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
private UIBase GetOrCreatePanel(UIPanel type, GameObject obj)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var existing) && existing != null)
|
||||
return existing;
|
||||
|
||||
if (!addressMap.TryGetValue(type, out var prefabPath) || prefabPath == null)
|
||||
{
|
||||
Debug.LogError($"No prefab registered for {type}");
|
||||
return null;
|
||||
}
|
||||
|
||||
var instance = Instantiate(obj, uiRoot).GetComponent<UIBase>();
|
||||
instance.name = $"{type}_Panel";
|
||||
instance.Init(type);
|
||||
|
||||
panels[type] = instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭并销毁某个面板实例(内存回收)
|
||||
/// </summary>
|
||||
public void Close(UIPanel type)
|
||||
{
|
||||
if (panels.TryGetValue(type, out var panel) && panel != null)
|
||||
{
|
||||
panel.Hide();
|
||||
Destroy(panel.gameObject);
|
||||
}
|
||||
panels.Remove(type);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭并销毁所有面板
|
||||
/// </summary>
|
||||
public void CloseAll()
|
||||
{
|
||||
foreach (var kv in panels)
|
||||
{
|
||||
if (kv.Value != null)
|
||||
{
|
||||
kv.Value.Hide();
|
||||
Destroy(kv.Value.gameObject);
|
||||
}
|
||||
}
|
||||
panels.Clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "UIPanelAddressConfig", menuName = "UI/UIPanelAddressConfig")]
|
||||
public class UIPanelAddressConfig : ScriptableObject
|
||||
{
|
||||
[System.Serializable]
|
||||
public struct PanelEntry
|
||||
{
|
||||
public UIPanel type;
|
||||
public string address; // Addressables 名称
|
||||
}
|
||||
|
||||
public PanelEntry[] panels;
|
||||
}
|
||||
@@ -0,0 +1,497 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
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
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 3
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
buildHeightMesh: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &159595480
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 159595483}
|
||||
- component: {fileID: 159595482}
|
||||
- component: {fileID: 159595481}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &159595481
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 159595480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_SendPointerHoverToParent: 1
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &159595482
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 159595480}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &159595483
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 159595480}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1096182885
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1096182889}
|
||||
- component: {fileID: 1096182888}
|
||||
- component: {fileID: 1096182887}
|
||||
- component: {fileID: 1096182886}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1096182886
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1096182885}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1096182887
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1096182885}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 1
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 1624, y: 750}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0.5
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!223 &1096182888
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1096182885}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
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
|
||||
--- !u!224 &1096182889
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1096182885}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1 &1931237641
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1931237645}
|
||||
- component: {fileID: 1931237644}
|
||||
- component: {fileID: 1931237643}
|
||||
- component: {fileID: 1931237642}
|
||||
m_Layer: 0
|
||||
m_Name: Camera
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1931237642
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931237641}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 0
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
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 &1931237643
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931237641}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &1931237644
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931237641}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
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_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &1931237645
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1931237641}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1008.883, y: 401.90103, z: 1.0208728}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2075409194
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2075409196}
|
||||
- component: {fileID: 2075409195}
|
||||
- component: {fileID: 2075409197}
|
||||
m_Layer: 0
|
||||
m_Name: Manager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2075409195
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2075409194}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4d72ecaf73fa12840af5c1f31e26df19, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
config: {fileID: 11400000, guid: f2f67348a5eb9f3449b426fec5d2fd12, type: 2}
|
||||
uiRoot: {fileID: 1096182889}
|
||||
--- !u!4 &2075409196
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2075409194}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1346.259, y: 346.40878, z: -11.613456}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &2075409197
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2075409194}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: afce420be78fe7e45bf80ca49529e276, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 1096182889}
|
||||
- {fileID: 159595483}
|
||||
- {fileID: 1931237645}
|
||||
- {fileID: 2075409196}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameManager : MonoSingleton<GameManager>
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
UIManager.Instance.ShowAsync(UIPanel.LoginPanel);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
%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: 5a7ef048f8e8db64eb225d5dc89be0b0, type: 3}
|
||||
m_Name: AllUIManager
|
||||
m_EditorClassIdentifier:
|
||||
panels:
|
||||
- type: 10
|
||||
address: Assets/MyGame/aa/UI/Login/LoginPanel.prefab
|
||||
- type: 100
|
||||
address: Assets/MyGame/aa/UI/Home/MainPanel.prefab
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UIHome_BY_SelectRoomLevelPanel : SubUIBase
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHome_BY_VIPPenel : SubUIBase
|
||||
{
|
||||
|
||||
[Header("下一页上一页")]
|
||||
public Button btn_Next;
|
||||
public Button btn_Last;
|
||||
[Header("VIP等级-名字-介绍-奖励")]
|
||||
public TextMeshProUGUI txt_VIPLevel;
|
||||
public TextMeshProUGUI txt_VIPName;
|
||||
public TextMeshProUGUI txt_VIPDescription;
|
||||
public Button btn_AwardPrefab;
|
||||
public Button btn_AwardParent;
|
||||
|
||||
public Button btn_Award_A;
|
||||
public Button btn_Award_B;
|
||||
public Button btn_Award_C;
|
||||
[Header("炮台")]
|
||||
public Image img_Turret;
|
||||
[Header("关闭")]
|
||||
public Button btn_Close;
|
||||
|
||||
public Slider EXP;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
btn_Close.onClick.AddListener(OnClose);
|
||||
}
|
||||
private void OnClose()
|
||||
{
|
||||
uIManager.Close(UIPanel.VIPPenel);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class UIHomeMain : UIBase
|
||||
{
|
||||
public SubUIManager subUIManager;
|
||||
public UIPanelAddressConfig panelAddressConfig;
|
||||
public Transform SubPanelParent;
|
||||
|
||||
#region 中间
|
||||
public Button defaultButton;
|
||||
[Header("风雷之渊")]
|
||||
public Button FLZYButton;
|
||||
[Header("星际迷航")]
|
||||
public Button XJMHButton;
|
||||
[Header("太古仙墟")]
|
||||
public Button TGXXButton;
|
||||
[Header("黑化悟空")]
|
||||
public Button HHWKButton;
|
||||
[Header("中国象棋")]
|
||||
public Button ZGXQButton;
|
||||
[Header("敬请期待")]
|
||||
public Button JQQDButton;
|
||||
#endregion
|
||||
|
||||
[Header("两侧按钮")]
|
||||
[Header("Left")]
|
||||
|
||||
#region left
|
||||
public Button btn_VIP;
|
||||
public Button btn_JJJ;
|
||||
public Button btn_Activity;
|
||||
#endregion
|
||||
[Header("Right")]
|
||||
#region Right
|
||||
public Button btn_Turret;
|
||||
public Button btn_ZS;
|
||||
public Button btn_Seting;
|
||||
#endregion
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
subUIManager = new SubUIManager(SubPanelParent, panelAddressConfig);
|
||||
btn_VIP.onClick.AddListener(OnVIP);
|
||||
}
|
||||
private void OnVIP()
|
||||
{
|
||||
subUIManager.ShowAsync(UIPanel.VIPPenel);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
%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: 5a7ef048f8e8db64eb225d5dc89be0b0, type: 3}
|
||||
m_Name: UIMain
|
||||
m_EditorClassIdentifier:
|
||||
panels:
|
||||
- type: 101
|
||||
address: Assets/MyGame/aa/UI/Home/Sub/SelectRoomPanel.prefab
|
||||
- type: 151
|
||||
address: Assets/MyGame/aa/UI/Home/Sub/VIPPanel.prefab
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoginPanel : UIBase
|
||||
{
|
||||
[Header("手机登录按钮")]
|
||||
public Button phoneLogin;
|
||||
[Header("隐私协议多选狂")]
|
||||
public Toggle privacyPolicy;
|
||||
[Header("加载中进度条")]
|
||||
public GameObject loadingParent;
|
||||
[Header("登录隐私父对象")]
|
||||
public GameObject loginParent;
|
||||
private void Start()
|
||||
{
|
||||
phoneLogin.onClick.AddListener(OnPhoneLogin);
|
||||
}
|
||||
private void OnPhoneLogin()
|
||||
{
|
||||
loginParent.SetActive(false);
|
||||
loadingParent.SetActive(true);
|
||||
//这里要跳转到具体的登录界面
|
||||
UIManager.Instance.ShowAsync(UIPanel.HomeMainPanel, UIPanel.LoginPanel);
|
||||
}
|
||||
public override void Show(object args = null)
|
||||
{
|
||||
base.Show(args);
|
||||
if (loadingParent.activeSelf)
|
||||
{
|
||||
loadingParent.SetActive(false);
|
||||
}
|
||||
if (!loginParent.activeSelf)
|
||||
{
|
||||
loginParent.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
%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: fcf7219bab7fe46a1ad266029b2fee19, type: 3}
|
||||
m_Name: Readme
|
||||
m_EditorClassIdentifier:
|
||||
icon: {fileID: 2800000, guid: 727a75301c3d24613a3ebcec4a24c2c8, type: 3}
|
||||
title: URP Empty Template
|
||||
sections:
|
||||
- heading: Welcome to the Universal Render Pipeline
|
||||
text: This template includes the settings and assets you need to start creating with the Universal Render Pipeline.
|
||||
linkText:
|
||||
url:
|
||||
- heading: URP Documentation
|
||||
text:
|
||||
linkText: Read more about URP
|
||||
url: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@latest
|
||||
- heading: Forums
|
||||
text:
|
||||
linkText: Get answers and support
|
||||
url: https://forum.unity.com/forums/universal-render-pipeline.383/
|
||||
- heading: Report bugs
|
||||
text:
|
||||
linkText: Submit a report
|
||||
url: https://unity3d.com/unity/qa/bug-reporting
|
||||
loadedLayout: 1
|
||||
@@ -0,0 +1,407 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.18028305, g: 0.22571313, b: 0.3069213, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
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
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 512
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 256
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRDenoiserTypeDirect: 1
|
||||
m_PVRDenoiserTypeIndirect: 1
|
||||
m_PVRDenoiserTypeAO: 1
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
maxJobWorkers: 0
|
||||
preserveTilesOutsideBounds: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &330585543
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 330585546}
|
||||
- component: {fileID: 330585545}
|
||||
- component: {fileID: 330585544}
|
||||
- component: {fileID: 330585547}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &330585544
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &330585545
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &330585546
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &330585547
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 330585543}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_RenderShadows: 1
|
||||
m_RequiresDepthTextureOption: 2
|
||||
m_RequiresOpaqueTextureOption: 2
|
||||
m_CameraType: 0
|
||||
m_Cameras: []
|
||||
m_RendererIndex: -1
|
||||
m_VolumeLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 1
|
||||
m_VolumeTrigger: {fileID: 0}
|
||||
m_VolumeFrameworkUpdateModeOption: 2
|
||||
m_RenderPostProcessing: 1
|
||||
m_Antialiasing: 0
|
||||
m_AntialiasingQuality: 2
|
||||
m_StopNaN: 0
|
||||
m_Dithering: 0
|
||||
m_ClearDepth: 1
|
||||
m_AllowXRRendering: 1
|
||||
m_RequiresDepthTexture: 0
|
||||
m_RequiresColorTexture: 0
|
||||
m_Version: 2
|
||||
--- !u!1 &410087039
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 410087041}
|
||||
- component: {fileID: 410087040}
|
||||
- component: {fileID: 410087042}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &410087040
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 410087039}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_Intensity: 2
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.80208
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 5000
|
||||
m_UseColorTemperature: 1
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_UseViewFrustumForShadowCasterCull: 1
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &410087041
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 410087039}
|
||||
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: 1
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!114 &410087042
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 410087039}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Version: 1
|
||||
m_UsePipelineSettings: 1
|
||||
m_AdditionalLightsShadowResolutionTier: 2
|
||||
m_LightLayerMask: 1
|
||||
m_CustomShadowLayers: 0
|
||||
m_ShadowLayerMask: 1
|
||||
m_LightCookieSize: {x: 1, y: 1}
|
||||
m_LightCookieOffset: {x: 0, y: 0}
|
||||
--- !u!1 &832575517
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 832575519}
|
||||
- component: {fileID: 832575518}
|
||||
m_Layer: 0
|
||||
m_Name: Global Volume
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &832575518
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 832575517}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IsGlobal: 1
|
||||
priority: 0
|
||||
blendDistance: 0
|
||||
weight: 1
|
||||
sharedProfile: {fileID: 11400000, guid: a6560a915ef98420e9faacc1c7438823, type: 2}
|
||||
--- !u!4 &832575519
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 832575517}
|
||||
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: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,123 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-7893295128165547882
|
||||
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
|
||||
m_AdvancedMode: 0
|
||||
threshold:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
min: 0
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
min: 0
|
||||
scatter:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0.7
|
||||
min: 0
|
||||
max: 1
|
||||
clamp:
|
||||
m_OverrideState: 0
|
||||
m_Value: 65472
|
||||
min: 0
|
||||
tint:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 1, g: 1, b: 1, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
highQualityFiltering:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
skipIterations:
|
||||
m_OverrideState: 0
|
||||
m_Value: 1
|
||||
min: 0
|
||||
max: 16
|
||||
dirtTexture:
|
||||
m_OverrideState: 0
|
||||
m_Value: {fileID: 0}
|
||||
dirtIntensity:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
min: 0
|
||||
--- !u!114 &-7011558710299706105
|
||||
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
|
||||
m_AdvancedMode: 0
|
||||
color:
|
||||
m_OverrideState: 0
|
||||
m_Value: {r: 0, g: 0, b: 0, a: 1}
|
||||
hdr: 0
|
||||
showAlpha: 0
|
||||
showEyeDropper: 1
|
||||
center:
|
||||
m_OverrideState: 0
|
||||
m_Value: {x: 0.5, y: 0.5}
|
||||
intensity:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.25
|
||||
min: 0
|
||||
max: 1
|
||||
smoothness:
|
||||
m_OverrideState: 1
|
||||
m_Value: 0.4
|
||||
min: 0.01
|
||||
max: 1
|
||||
rounded:
|
||||
m_OverrideState: 0
|
||||
m_Value: 0
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
|
||||
m_Name: SampleSceneProfile
|
||||
m_EditorClassIdentifier:
|
||||
components:
|
||||
- {fileID: 849379129802519247}
|
||||
- {fileID: -7893295128165547882}
|
||||
- {fileID: -7011558710299706105}
|
||||
--- !u!114 &849379129802519247
|
||||
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
|
||||
m_AdvancedMode: 0
|
||||
mode:
|
||||
m_OverrideState: 1
|
||||
m_Value: 1
|
||||
@@ -0,0 +1,76 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1878332245247344467
|
||||
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: f62c9c65cf3354c93be831c8bc075510, type: 3}
|
||||
m_Name: SSAO
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Shader: {fileID: 0}
|
||||
m_Settings:
|
||||
Downsample: 1
|
||||
AfterOpaque: 0
|
||||
Source: 0
|
||||
NormalSamples: 0
|
||||
Intensity: 0.5
|
||||
DirectLightingStrength: 0.25
|
||||
Radius: 0.25
|
||||
SampleCount: 4
|
||||
--- !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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: URP-Balanced-Renderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
|
||||
type: 3}
|
||||
m_RendererFeatures:
|
||||
- {fileID: -1878332245247344467}
|
||||
m_RendererFeatureMap: adc0de57c6d2eee5
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 0}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 0}
|
||||
coreBlitColorAndDepthPS: {fileID: 0}
|
||||
cameraMotionVector: {fileID: 0}
|
||||
objectMotionVector: {fileID: 0}
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
m_RenderingMode: 0
|
||||
m_DepthPrimingMode: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_ClusteredRendering: 0
|
||||
m_TileSize: 32
|
||||
@@ -0,0 +1,114 @@
|
||||
%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: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: URP-Balanced
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: e634585d5c4544dd297acaee93dc2beb, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 1024
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsPerObjectLimit: 2
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 512
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 1
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 1
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 512
|
||||
m_AdditionalLightsCookieFormat: 1
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 1
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 2
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 1
|
||||
m_PrefilterSSAOSourceDepthLow: 0
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 0
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 0
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 1
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 1
|
||||
m_PrefilterSoftShadowsQualityMedium: 1
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
@@ -0,0 +1,104 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-1878332245247344467
|
||||
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: f62c9c65cf3354c93be831c8bc075510, type: 3}
|
||||
m_Name: SSAO
|
||||
m_EditorClassIdentifier:
|
||||
m_Active: 1
|
||||
m_Settings:
|
||||
AOMethod: 1
|
||||
Downsample: 0
|
||||
AfterOpaque: 0
|
||||
Source: 1
|
||||
NormalSamples: 1
|
||||
Intensity: 0.5
|
||||
DirectLightingStrength: 0.25
|
||||
Radius: 0.25
|
||||
Samples: 0
|
||||
BlurQuality: 0
|
||||
Falloff: 100
|
||||
SampleCount: -1
|
||||
m_BlueNoise256Textures:
|
||||
- {fileID: 2800000, guid: 36f118343fc974119bee3d09e2111500, type: 3}
|
||||
- {fileID: 2800000, guid: 4b7b083e6b6734e8bb2838b0b50a0bc8, type: 3}
|
||||
- {fileID: 2800000, guid: c06cc21c692f94f5fb5206247191eeee, type: 3}
|
||||
- {fileID: 2800000, guid: cb76dd40fa7654f9587f6a344f125c9a, type: 3}
|
||||
- {fileID: 2800000, guid: e32226222ff144b24bf3a5a451de54bc, type: 3}
|
||||
- {fileID: 2800000, guid: 3302065f671a8450b82c9ddf07426f3a, type: 3}
|
||||
- {fileID: 2800000, guid: 56a77a3e8d64f47b6afe9e3c95cb57d5, type: 3}
|
||||
m_Shader: {fileID: 4800000, guid: 0849e84e3d62649e8882e9d6f056a017, type: 3}
|
||||
--- !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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: URP-HighFidelity-Renderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
|
||||
type: 3}
|
||||
hdrDebugViewPS: {fileID: 4800000, guid: 573620ae32aec764abd4d728906d2587, type: 3}
|
||||
m_RendererFeatures:
|
||||
- {fileID: -1878332245247344467}
|
||||
m_RendererFeatureMap: adc0de57c6d2eee5
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 0}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
fallbackLoadingPS: {fileID: 4800000, guid: 7f888aff2ac86494babad1c2c5daeee2, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 4800000, guid: 93446b5c5339d4f00b85c159e1159b7c, type: 3}
|
||||
coreBlitColorAndDepthPS: {fileID: 4800000, guid: d104b2fc1ca6445babb8e90b0758136b,
|
||||
type: 3}
|
||||
blitHDROverlay: {fileID: 4800000, guid: a89bee29cffa951418fc1e2da94d1959, type: 3}
|
||||
cameraMotionVector: {fileID: 4800000, guid: c56b7e0d4c7cb484e959caeeedae9bbf,
|
||||
type: 3}
|
||||
objectMotionVector: {fileID: 4800000, guid: 7b3ede40266cd49a395def176e1bc486,
|
||||
type: 3}
|
||||
dataDrivenLensFlare: {fileID: 4800000, guid: 6cda457ac28612740adb23da5d39ea92,
|
||||
type: 3}
|
||||
terrainDetailLitPS: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144,
|
||||
type: 3}
|
||||
terrainDetailGrassPS: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1,
|
||||
type: 3}
|
||||
terrainDetailGrassBillboardPS: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90,
|
||||
type: 3}
|
||||
m_AssetVersion: 2
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
m_RenderingMode: 0
|
||||
m_DepthPrimingMode: 0
|
||||
m_CopyDepthMode: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_IntermediateTextureMode: 1
|
||||
@@ -0,0 +1,114 @@
|
||||
%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: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: URP-HighFidelity
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: c40be3174f62c4acf8c1216858c64956, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 1
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 4
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 4096
|
||||
m_AdditionalLightsRenderingMode: 1
|
||||
m_AdditionalLightsPerObjectLimit: 8
|
||||
m_AdditionalLightShadowsSupported: 1
|
||||
m_AdditionalLightsShadowmapResolution: 4096
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 1
|
||||
m_ReflectionProbeBoxProjection: 1
|
||||
m_ShadowDistance: 150
|
||||
m_ShadowCascadeCount: 4
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 1
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 4096
|
||||
m_AdditionalLightsCookieFormat: 4
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 1
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 3
|
||||
m_PrefilteringModeAdditionalLight: 3
|
||||
m_PrefilteringModeAdditionalLightShadows: 2
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 2
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 0
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 0
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 0
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 1
|
||||
m_PrefilterSoftShadowsQualityMedium: 1
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 1
|
||||
@@ -0,0 +1,52 @@
|
||||
%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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
|
||||
m_Name: URP-Performant-Renderer
|
||||
m_EditorClassIdentifier:
|
||||
debugShaders:
|
||||
debugReplacementPS: {fileID: 4800000, guid: cf852408f2e174538bcd9b7fda1c5ae7,
|
||||
type: 3}
|
||||
m_RendererFeatures: []
|
||||
m_RendererFeatureMap:
|
||||
m_UseNativeRenderPass: 0
|
||||
postProcessData: {fileID: 11400000, guid: 41439944d30ece34e96484bdb6645b55, type: 2}
|
||||
shaders:
|
||||
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
|
||||
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
|
||||
screenSpaceShadowPS: {fileID: 0}
|
||||
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
|
||||
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
|
||||
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
|
||||
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
|
||||
coreBlitPS: {fileID: 0}
|
||||
coreBlitColorAndDepthPS: {fileID: 0}
|
||||
cameraMotionVector: {fileID: 0}
|
||||
objectMotionVector: {fileID: 0}
|
||||
m_OpaqueLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_TransparentLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_DefaultStencilState:
|
||||
overrideStencilState: 0
|
||||
stencilReference: 0
|
||||
stencilCompareFunction: 8
|
||||
passOperation: 2
|
||||
failOperation: 0
|
||||
zFailOperation: 0
|
||||
m_ShadowTransparentReceive: 1
|
||||
m_RenderingMode: 0
|
||||
m_DepthPrimingMode: 0
|
||||
m_AccurateGbufferNormals: 0
|
||||
m_ClusteredRendering: 0
|
||||
m_TileSize: 32
|
||||
@@ -0,0 +1,114 @@
|
||||
%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: bf2edee5c58d82540a51f03df9d42094, type: 3}
|
||||
m_Name: URP-Performant
|
||||
m_EditorClassIdentifier:
|
||||
k_AssetVersion: 11
|
||||
k_AssetPreviousVersion: 11
|
||||
m_RendererType: 1
|
||||
m_RendererData: {fileID: 0}
|
||||
m_RendererDataList:
|
||||
- {fileID: 11400000, guid: 707360a9c581a4bd7aa53bfeb1429f71, type: 2}
|
||||
m_DefaultRendererIndex: 0
|
||||
m_RequireDepthTexture: 0
|
||||
m_RequireOpaqueTexture: 0
|
||||
m_OpaqueDownsampling: 1
|
||||
m_SupportsTerrainHoles: 1
|
||||
m_SupportsHDR: 0
|
||||
m_HDRColorBufferPrecision: 0
|
||||
m_MSAA: 1
|
||||
m_RenderScale: 1
|
||||
m_UpscalingFilter: 0
|
||||
m_FsrOverrideSharpness: 0
|
||||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 0
|
||||
m_MainLightShadowmapResolution: 1024
|
||||
m_AdditionalLightsRenderingMode: 0
|
||||
m_AdditionalLightsPerObjectLimit: 4
|
||||
m_AdditionalLightShadowsSupported: 0
|
||||
m_AdditionalLightsShadowmapResolution: 512
|
||||
m_AdditionalLightsShadowResolutionTierLow: 128
|
||||
m_AdditionalLightsShadowResolutionTierMedium: 256
|
||||
m_AdditionalLightsShadowResolutionTierHigh: 512
|
||||
m_ReflectionProbeBlending: 0
|
||||
m_ReflectionProbeBoxProjection: 0
|
||||
m_ShadowDistance: 50
|
||||
m_ShadowCascadeCount: 1
|
||||
m_Cascade2Split: 0.25
|
||||
m_Cascade3Split: {x: 0.1, y: 0.3}
|
||||
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
|
||||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 0
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
m_SupportsDynamicBatching: 0
|
||||
m_MixedLightingSupported: 1
|
||||
m_SupportsLightCookies: 1
|
||||
m_SupportsLightLayers: 0
|
||||
m_DebugLevel: 0
|
||||
m_StoreActionsOptimization: 0
|
||||
m_EnableRenderGraph: 0
|
||||
m_UseAdaptivePerformance: 1
|
||||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 16
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
m_MaxPixelLights: 0
|
||||
m_ShadowAtlasResolution: 256
|
||||
m_VolumeFrameworkUpdateMode: 0
|
||||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 0
|
||||
m_PrefilteringModeAdditionalLight: 0
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 1
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 1
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 1
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterSoftShadowsQualityLow: 1
|
||||
m_PrefilterSoftShadowsQualityMedium: 1
|
||||
m_PrefilterSoftShadowsQualityHigh: 1
|
||||
m_PrefilterSoftShadows: 0
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
|
After Width: | Height: | Size: 24 KiB |
@@ -0,0 +1,654 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &1
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_PixelRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 45
|
||||
width: 1666
|
||||
height: 958
|
||||
m_ShowMode: 4
|
||||
m_Title:
|
||||
m_RootView: {fileID: 6}
|
||||
m_MinSize: {x: 950, y: 542}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
--- !u!114 &2
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 466
|
||||
width: 290
|
||||
height: 442
|
||||
m_MinSize: {x: 234, y: 271}
|
||||
m_MaxSize: {x: 10004, y: 10021}
|
||||
m_ActualView: {fileID: 14}
|
||||
m_Panes:
|
||||
- {fileID: 14}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &3
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 4}
|
||||
- {fileID: 2}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 973
|
||||
y: 0
|
||||
width: 290
|
||||
height: 908
|
||||
m_MinSize: {x: 234, y: 492}
|
||||
m_MaxSize: {x: 10004, y: 14042}
|
||||
vertical: 1
|
||||
controlID: 226
|
||||
--- !u!114 &4
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 290
|
||||
height: 466
|
||||
m_MinSize: {x: 204, y: 221}
|
||||
m_MaxSize: {x: 4004, y: 4021}
|
||||
m_ActualView: {fileID: 17}
|
||||
m_Panes:
|
||||
- {fileID: 17}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &5
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 466
|
||||
width: 973
|
||||
height: 442
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_Panes:
|
||||
- {fileID: 15}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &6
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 7}
|
||||
- {fileID: 8}
|
||||
- {fileID: 9}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1666
|
||||
height: 958
|
||||
m_MinSize: {x: 950, y: 542}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
--- !u!114 &7
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1666
|
||||
height: 30
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
m_LastLoadedLayoutName: Tutorial
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 10}
|
||||
- {fileID: 3}
|
||||
- {fileID: 11}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 30
|
||||
width: 1666
|
||||
height: 908
|
||||
m_MinSize: {x: 713, y: 492}
|
||||
m_MaxSize: {x: 18008, y: 14042}
|
||||
vertical: 0
|
||||
controlID: 74
|
||||
--- !u!114 &9
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 938
|
||||
width: 1666
|
||||
height: 20
|
||||
m_MinSize: {x: 0, y: 0}
|
||||
m_MaxSize: {x: 0, y: 0}
|
||||
--- !u!114 &10
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 12}
|
||||
- {fileID: 5}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 973
|
||||
height: 908
|
||||
m_MinSize: {x: 202, y: 442}
|
||||
m_MaxSize: {x: 4002, y: 8042}
|
||||
vertical: 1
|
||||
controlID: 75
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1263
|
||||
y: 0
|
||||
width: 403
|
||||
height: 908
|
||||
m_MinSize: {x: 277, y: 71}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 13}
|
||||
m_Panes:
|
||||
- {fileID: 13}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 973
|
||||
height: 466
|
||||
m_MinSize: {x: 202, y: 221}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 16}
|
||||
m_Panes:
|
||||
- {fileID: 16}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &13
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AutoRepaintOnSceneChange: 0
|
||||
m_MinSize: {x: 275, y: 50}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Inspector
|
||||
m_Image: {fileID: -6905738622615590433, guid: 0000000000000000d000000000000000,
|
||||
type: 0}
|
||||
m_Tooltip:
|
||||
m_DepthBufferBits: 0
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 2
|
||||
y: 19
|
||||
width: 401
|
||||
height: 887
|
||||
m_ScrollPosition: {x: 0, y: 0}
|
||||
m_InspectorMode: 0
|
||||
m_PreviewResizer:
|
||||
m_CachedPref: -160
|
||||
m_ControlHash: -371814159
|
||||
m_PrefName: Preview_InspectorPreview
|
||||
m_PreviewWindow: {fileID: 0}
|
||||
--- !u!114 &14
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AutoRepaintOnSceneChange: 0
|
||||
m_MinSize: {x: 230, y: 250}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
m_TitleContent:
|
||||
m_Text: Project
|
||||
m_Image: {fileID: -7501376956915960154, guid: 0000000000000000d000000000000000,
|
||||
type: 0}
|
||||
m_Tooltip:
|
||||
m_DepthBufferBits: 0
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 2
|
||||
y: 19
|
||||
width: 286
|
||||
height: 421
|
||||
m_SearchFilter:
|
||||
m_NameFilter:
|
||||
m_ClassNames: []
|
||||
m_AssetLabels: []
|
||||
m_AssetBundleNames: []
|
||||
m_VersionControlStates: []
|
||||
m_ReferencingInstanceIDs:
|
||||
m_ScenePaths: []
|
||||
m_ShowAllHits: 0
|
||||
m_SearchArea: 0
|
||||
m_Folders:
|
||||
- Assets
|
||||
m_ViewMode: 0
|
||||
m_StartGridSize: 64
|
||||
m_LastFolders:
|
||||
- Assets
|
||||
m_LastFoldersGridSize: -1
|
||||
m_LastProjectPath: /Users/danielbrauer/Unity Projects/New Unity Project 47
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: ee240000
|
||||
m_LastClickedID: 9454
|
||||
m_ExpandedIDs: ee24000000ca9a3bffffff7f
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
m_Path:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_AssetTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 68fbffff
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: ee240000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
m_Path:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_ListAreaState:
|
||||
m_SelectedInstanceIDs: 68fbffff
|
||||
m_LastClickedInstanceID: -1176
|
||||
m_HadKeyboardFocusLastEvent: 0
|
||||
m_ExpandedInstanceIDs: c6230000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 1
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_CreateAssetUtility:
|
||||
m_EndAction: {fileID: 0}
|
||||
m_InstanceID: 0
|
||||
m_Path:
|
||||
m_Icon: {fileID: 0}
|
||||
m_ResourceFile:
|
||||
m_NewAssetIndexInList: -1
|
||||
m_ScrollPosition: {x: 0, y: 0}
|
||||
m_GridSize: 64
|
||||
m_DirectoriesAreaWidth: 110
|
||||
--- !u!114 &15
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AutoRepaintOnSceneChange: 1
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Game
|
||||
m_Image: {fileID: -2087823869225018852, guid: 0000000000000000d000000000000000,
|
||||
type: 0}
|
||||
m_Tooltip:
|
||||
m_DepthBufferBits: 32
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 19
|
||||
width: 971
|
||||
height: 421
|
||||
m_MaximizeOnPlay: 0
|
||||
m_Gizmos: 0
|
||||
m_Stats: 0
|
||||
m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_TargetDisplay: 0
|
||||
m_ZoomArea:
|
||||
m_HRangeLocked: 0
|
||||
m_VRangeLocked: 0
|
||||
m_HBaseRangeMin: -242.75
|
||||
m_HBaseRangeMax: 242.75
|
||||
m_VBaseRangeMin: -101
|
||||
m_VBaseRangeMax: 101
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
m_VAllowExceedBaseRangeMax: 1
|
||||
m_ScaleWithWindow: 0
|
||||
m_HSlider: 0
|
||||
m_VSlider: 0
|
||||
m_IgnoreScrollWheelUntilClicked: 0
|
||||
m_EnableMouseInput: 1
|
||||
m_EnableSliderZoom: 0
|
||||
m_UniformScale: 1
|
||||
m_UpDirection: 1
|
||||
m_DrawArea:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 17
|
||||
width: 971
|
||||
height: 404
|
||||
m_Scale: {x: 2, y: 2}
|
||||
m_Translation: {x: 485.5, y: 202}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -242.75
|
||||
y: -101
|
||||
width: 485.5
|
||||
height: 202
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 2
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_CurrentColorSpace: 0
|
||||
m_LastWindowPixelSize: {x: 1942, y: 842}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000000000100000100
|
||||
--- !u!114 &16
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AutoRepaintOnSceneChange: 1
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Scene
|
||||
m_Image: {fileID: 2318424515335265636, guid: 0000000000000000d000000000000000,
|
||||
type: 0}
|
||||
m_Tooltip:
|
||||
m_DepthBufferBits: 32
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 19
|
||||
width: 971
|
||||
height: 445
|
||||
m_SceneLighting: 1
|
||||
lastFramingTime: 0
|
||||
m_2DMode: 0
|
||||
m_isRotationLocked: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: 0, y: 0, z: 0}
|
||||
speed: 2
|
||||
m_Value: {x: 0, y: 0, z: 0}
|
||||
m_RenderMode: 0
|
||||
m_ValidateTrueMetals: 0
|
||||
m_SceneViewState:
|
||||
showFog: 1
|
||||
showMaterialUpdate: 0
|
||||
showSkybox: 1
|
||||
showFlares: 1
|
||||
showImageEffects: 1
|
||||
grid:
|
||||
xGrid:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
m_Value: 0
|
||||
yGrid:
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
m_Value: 1
|
||||
zGrid:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
m_Value: 0
|
||||
m_Rotation:
|
||||
m_Target: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
|
||||
speed: 2
|
||||
m_Value: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
|
||||
m_Size:
|
||||
m_Target: 10
|
||||
speed: 2
|
||||
m_Value: 10
|
||||
m_Ortho:
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
m_Value: 0
|
||||
m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_LastSceneViewOrtho: 0
|
||||
m_ReplacementShader: {fileID: 0}
|
||||
m_ReplacementString:
|
||||
m_LastLockedObject: {fileID: 0}
|
||||
m_ViewIsLockedToObject: 0
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_PrefabParentObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_AutoRepaintOnSceneChange: 0
|
||||
m_MinSize: {x: 200, y: 200}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Hierarchy
|
||||
m_Image: {fileID: -590624980919486359, guid: 0000000000000000d000000000000000,
|
||||
type: 0}
|
||||
m_Tooltip:
|
||||
m_DepthBufferBits: 0
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 2
|
||||
y: 19
|
||||
width: 286
|
||||
height: 445
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 68fbffff
|
||||
m_LastClickedID: -1176
|
||||
m_ExpandedIDs: 7efbffff00000000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
m_OriginalName:
|
||||
m_EditFieldRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 0
|
||||
height: 0
|
||||
m_UserData: 0
|
||||
m_IsWaitingForDelay: 0
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
m_ExpandedScenes:
|
||||
-
|
||||
m_CurrenRootInstanceID: 0
|
||||
m_Locked: 0
|
||||
m_CurrentSortingName: TransformSorting
|
||||
@@ -0,0 +1,242 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
[CustomEditor(typeof(Readme))]
|
||||
[InitializeOnLoad]
|
||||
public class ReadmeEditor : Editor
|
||||
{
|
||||
static string s_ShowedReadmeSessionStateName = "ReadmeEditor.showedReadme";
|
||||
|
||||
static string s_ReadmeSourceDirectory = "Assets/TutorialInfo";
|
||||
|
||||
const float k_Space = 16f;
|
||||
|
||||
static ReadmeEditor()
|
||||
{
|
||||
EditorApplication.delayCall += SelectReadmeAutomatically;
|
||||
}
|
||||
|
||||
static void RemoveTutorial()
|
||||
{
|
||||
if (EditorUtility.DisplayDialog("Remove Readme Assets",
|
||||
|
||||
$"All contents under {s_ReadmeSourceDirectory} will be removed, are you sure you want to proceed?",
|
||||
"Proceed",
|
||||
"Cancel"))
|
||||
{
|
||||
if (Directory.Exists(s_ReadmeSourceDirectory))
|
||||
{
|
||||
FileUtil.DeleteFileOrDirectory(s_ReadmeSourceDirectory);
|
||||
FileUtil.DeleteFileOrDirectory(s_ReadmeSourceDirectory + ".meta");
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log($"Could not find the Readme folder at {s_ReadmeSourceDirectory}");
|
||||
}
|
||||
|
||||
var readmeAsset = SelectReadme();
|
||||
if (readmeAsset != null)
|
||||
{
|
||||
var path = AssetDatabase.GetAssetPath(readmeAsset);
|
||||
FileUtil.DeleteFileOrDirectory(path + ".meta");
|
||||
FileUtil.DeleteFileOrDirectory(path);
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
static void SelectReadmeAutomatically()
|
||||
{
|
||||
if (!SessionState.GetBool(s_ShowedReadmeSessionStateName, false))
|
||||
{
|
||||
var readme = SelectReadme();
|
||||
SessionState.SetBool(s_ShowedReadmeSessionStateName, true);
|
||||
|
||||
if (readme && !readme.loadedLayout)
|
||||
{
|
||||
LoadLayout();
|
||||
readme.loadedLayout = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadLayout()
|
||||
{
|
||||
var assembly = typeof(EditorApplication).Assembly;
|
||||
var windowLayoutType = assembly.GetType("UnityEditor.WindowLayout", true);
|
||||
var method = windowLayoutType.GetMethod("LoadWindowLayout", BindingFlags.Public | BindingFlags.Static);
|
||||
method.Invoke(null, new object[] { Path.Combine(Application.dataPath, "TutorialInfo/Layout.wlt"), false });
|
||||
}
|
||||
|
||||
static Readme SelectReadme()
|
||||
{
|
||||
var ids = AssetDatabase.FindAssets("Readme t:Readme");
|
||||
if (ids.Length == 1)
|
||||
{
|
||||
var readmeObject = AssetDatabase.LoadMainAssetAtPath(AssetDatabase.GUIDToAssetPath(ids[0]));
|
||||
|
||||
Selection.objects = new UnityEngine.Object[] { readmeObject };
|
||||
|
||||
return (Readme)readmeObject;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Couldn't find a readme");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHeaderGUI()
|
||||
{
|
||||
var readme = (Readme)target;
|
||||
Init();
|
||||
|
||||
var iconWidth = Mathf.Min(EditorGUIUtility.currentViewWidth / 3f - 20f, 128f);
|
||||
|
||||
GUILayout.BeginHorizontal("In BigTitle");
|
||||
{
|
||||
if (readme.icon != null)
|
||||
{
|
||||
GUILayout.Space(k_Space);
|
||||
GUILayout.Label(readme.icon, GUILayout.Width(iconWidth), GUILayout.Height(iconWidth));
|
||||
}
|
||||
GUILayout.Space(k_Space);
|
||||
GUILayout.BeginVertical();
|
||||
{
|
||||
|
||||
GUILayout.FlexibleSpace();
|
||||
GUILayout.Label(readme.title, TitleStyle);
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
GUILayout.EndVertical();
|
||||
GUILayout.FlexibleSpace();
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
var readme = (Readme)target;
|
||||
Init();
|
||||
|
||||
foreach (var section in readme.sections)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(section.heading))
|
||||
{
|
||||
GUILayout.Label(section.heading, HeadingStyle);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(section.text))
|
||||
{
|
||||
GUILayout.Label(section.text, BodyStyle);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(section.linkText))
|
||||
{
|
||||
if (LinkLabel(new GUIContent(section.linkText)))
|
||||
{
|
||||
Application.OpenURL(section.url);
|
||||
}
|
||||
}
|
||||
|
||||
GUILayout.Space(k_Space);
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Remove Readme Assets", ButtonStyle))
|
||||
{
|
||||
RemoveTutorial();
|
||||
}
|
||||
}
|
||||
|
||||
bool m_Initialized;
|
||||
|
||||
GUIStyle LinkStyle
|
||||
{
|
||||
get { return m_LinkStyle; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
GUIStyle m_LinkStyle;
|
||||
|
||||
GUIStyle TitleStyle
|
||||
{
|
||||
get { return m_TitleStyle; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
GUIStyle m_TitleStyle;
|
||||
|
||||
GUIStyle HeadingStyle
|
||||
{
|
||||
get { return m_HeadingStyle; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
GUIStyle m_HeadingStyle;
|
||||
|
||||
GUIStyle BodyStyle
|
||||
{
|
||||
get { return m_BodyStyle; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
GUIStyle m_BodyStyle;
|
||||
|
||||
GUIStyle ButtonStyle
|
||||
{
|
||||
get { return m_ButtonStyle; }
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
GUIStyle m_ButtonStyle;
|
||||
|
||||
void Init()
|
||||
{
|
||||
if (m_Initialized)
|
||||
return;
|
||||
m_BodyStyle = new GUIStyle(EditorStyles.label);
|
||||
m_BodyStyle.wordWrap = true;
|
||||
m_BodyStyle.fontSize = 14;
|
||||
m_BodyStyle.richText = true;
|
||||
|
||||
m_TitleStyle = new GUIStyle(m_BodyStyle);
|
||||
m_TitleStyle.fontSize = 26;
|
||||
|
||||
m_HeadingStyle = new GUIStyle(m_BodyStyle);
|
||||
m_HeadingStyle.fontStyle = FontStyle.Bold;
|
||||
m_HeadingStyle.fontSize = 18;
|
||||
|
||||
m_LinkStyle = new GUIStyle(m_BodyStyle);
|
||||
m_LinkStyle.wordWrap = false;
|
||||
|
||||
// Match selection color which works nicely for both light and dark skins
|
||||
m_LinkStyle.normal.textColor = new Color(0x00 / 255f, 0x78 / 255f, 0xDA / 255f, 1f);
|
||||
m_LinkStyle.stretchWidth = false;
|
||||
|
||||
m_ButtonStyle = new GUIStyle(EditorStyles.miniButton);
|
||||
m_ButtonStyle.fontStyle = FontStyle.Bold;
|
||||
|
||||
m_Initialized = true;
|
||||
}
|
||||
|
||||
bool LinkLabel(GUIContent label, params GUILayoutOption[] options)
|
||||
{
|
||||
var position = GUILayoutUtility.GetRect(label, LinkStyle, options);
|
||||
|
||||
Handles.BeginGUI();
|
||||
Handles.color = LinkStyle.normal.textColor;
|
||||
Handles.DrawLine(new Vector3(position.xMin, position.yMax), new Vector3(position.xMax, position.yMax));
|
||||
Handles.color = Color.white;
|
||||
Handles.EndGUI();
|
||||
|
||||
EditorGUIUtility.AddCursorRect(position, MouseCursor.Link);
|
||||
|
||||
return GUI.Button(position, label, LinkStyle);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
public class Readme : ScriptableObject
|
||||
{
|
||||
public Texture2D icon;
|
||||
public string title;
|
||||
public Section[] sections;
|
||||
public bool loadedLayout;
|
||||
|
||||
[Serializable]
|
||||
public class Section
|
||||
{
|
||||
public string heading, text, linkText, url;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 106 KiB |
|
After Width: | Height: | Size: 142 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 857 B |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 63 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 182 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 559 B |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 1016 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 96 KiB |
|
After Width: | Height: | Size: 80 KiB |