diff --git a/Plugins/Sirenix.meta b/Plugins/Sirenix.meta index 768d4b49..c7c7756d 100644 --- a/Plugins/Sirenix.meta +++ b/Plugins/Sirenix.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2df134d7de710431fb6feeef155f0ccd +guid: f8b16eeee739e52448b12de8c6e054fd folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll index 28d8ec88..70d8ac7d 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll and b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll differ diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta index 2001b712..27171b21 100644 --- a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta +++ b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.dll.meta @@ -1,115 +1,79 @@ -fileFormatVersion: 2 -guid: 5651992cdad94894a3af7dc3f1da9170 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : N3DS - second: - enabled: 1 - settings: {} - - first: - : PSM - second: - enabled: 1 - settings: {} - - first: - : PSP2 - second: - enabled: 1 - settings: {} - - first: - : SamsungTV - second: - enabled: 1 - settings: {} - - first: - : Tizen - second: - enabled: 1 - settings: {} - - first: - : WiiU - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 1 - Exclude Linux: 1 - Exclude Linux64: 1 - Exclude LinuxUniversal: 1 - Exclude N3DS: 0 - Exclude OSXIntel: 1 - Exclude OSXIntel64: 1 - Exclude OSXUniversal: 1 - Exclude PS4: 0 - Exclude PSM: 0 - Exclude PSP2: 0 - Exclude SamsungTV: 0 - Exclude Tizen: 0 - Exclude WebGL: 0 - Exclude WiiU: 0 - Exclude Win: 1 - Exclude Win64: 1 - Exclude WindowsStoreApps: 0 - Exclude XboxOne: 0 - Exclude iOS: 0 - Exclude tvOS: 0 - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - PS4: PS4 - second: - enabled: 1 - settings: {} - - first: - Standalone: OSXUniversal - second: - enabled: 0 - settings: {} - - first: - WebGL: WebGL - second: - enabled: 1 - settings: {} - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - XboxOne: XboxOne - second: - enabled: 1 - settings: {} - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 5651992cdad94894a3af7dc3f1da9170 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + N3DS: + enabled: 1 + settings: {} + PS4: + enabled: 1 + settings: {} + PSM: + enabled: 1 + settings: {} + PSP2: + enabled: 1 + settings: {} + SamsungTV: + enabled: 1 + settings: {} + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + WiiU: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + XboxOne: + enabled: 1 + settings: {} + iOS: + enabled: 1 + settings: {} + tvOS: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.pdb b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.pdb index f62b12e6..782999f2 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.pdb and b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Serialization.pdb differ diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll index 92fc2595..d7975884 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll and b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll differ diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta index 5648dd41..ede7be7d 100644 --- a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta +++ b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.dll.meta @@ -1,115 +1,79 @@ -fileFormatVersion: 2 -guid: 5978f8f3dd274e848fbb7a123bde1fb9 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : N3DS - second: - enabled: 1 - settings: {} - - first: - : PSM - second: - enabled: 1 - settings: {} - - first: - : PSP2 - second: - enabled: 1 - settings: {} - - first: - : SamsungTV - second: - enabled: 1 - settings: {} - - first: - : Tizen - second: - enabled: 1 - settings: {} - - first: - : WiiU - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: - Exclude Android: 1 - Exclude Editor: 1 - Exclude Linux: 1 - Exclude Linux64: 1 - Exclude LinuxUniversal: 1 - Exclude N3DS: 0 - Exclude OSXIntel: 1 - Exclude OSXIntel64: 1 - Exclude OSXUniversal: 1 - Exclude PS4: 0 - Exclude PSM: 0 - Exclude PSP2: 0 - Exclude SamsungTV: 0 - Exclude Tizen: 0 - Exclude WebGL: 0 - Exclude WiiU: 0 - Exclude Win: 1 - Exclude Win64: 1 - Exclude WindowsStoreApps: 0 - Exclude XboxOne: 0 - Exclude iOS: 0 - Exclude tvOS: 0 - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - PS4: PS4 - second: - enabled: 1 - settings: {} - - first: - Standalone: OSXUniversal - second: - enabled: 0 - settings: {} - - first: - WebGL: WebGL - second: - enabled: 1 - settings: {} - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 1 - settings: - CPU: AnyCPU - - first: - XboxOne: XboxOne - second: - enabled: 1 - settings: {} - - first: - iPhone: iOS - second: - enabled: 1 - settings: {} - - first: - tvOS: tvOS - second: - enabled: 1 - settings: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 5978f8f3dd274e848fbb7a123bde1fb9 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 0 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + N3DS: + enabled: 1 + settings: {} + PS4: + enabled: 1 + settings: {} + PSM: + enabled: 1 + settings: {} + PSP2: + enabled: 1 + settings: {} + SamsungTV: + enabled: 1 + settings: {} + Tizen: + enabled: 1 + settings: {} + WebGL: + enabled: 1 + settings: {} + WiiU: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 1 + settings: + CPU: AnyCPU + XboxOne: + enabled: 1 + settings: {} + iOS: + enabled: 1 + settings: {} + tvOS: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.pdb b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.pdb index cfb7240a..a494c114 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.pdb and b/Plugins/Sirenix/Assemblies/NoEditor/Sirenix.Utilities.pdb differ diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll index 380fcd8e..4822c5ad 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll and b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll differ diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta index 12bb3b92..ef7f3d92 100644 --- a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta +++ b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.dll.meta @@ -1,109 +1,76 @@ -fileFormatVersion: 2 -guid: d2a8f0021d6b47c5923d8972dfb81ef1 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : Linux - second: - enabled: 1 - settings: {} - - first: - : LinuxUniversal - second: - enabled: 1 - settings: {} - - first: - : OSXIntel - second: - enabled: 1 - settings: {} - - first: - : OSXIntel64 - second: - enabled: 1 - settings: {} - - first: - : PSM - second: - enabled: 0 - settings: {} - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: - Exclude Android: 0 - Exclude Editor: 1 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude N3DS: 1 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude PS4: 1 - Exclude PSM: 1 - Exclude PSP2: 1 - Exclude SamsungTV: 1 - Exclude Tizen: 1 - Exclude WebGL: 1 - Exclude WiiU: 1 - Exclude Win: 0 - Exclude Win64: 0 - Exclude WindowsStoreApps: 1 - Exclude XboxOne: 1 - Exclude iOS: 1 - Exclude tvOS: 1 - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Standalone: Linux64 - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: OSXUniversal - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: Win - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: Win64 - second: - enabled: 1 - settings: - CPU: - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: d2a8f0021d6b47c5923d8972dfb81ef1 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + Linux: + enabled: 1 + settings: {} + Linux64: + enabled: 1 + settings: {} + LinuxUniversal: + enabled: 1 + settings: {} + OSXIntel: + enabled: 1 + settings: {} + OSXIntel64: + enabled: 1 + settings: {} + OSXUniversal: + enabled: 1 + settings: {} + PSM: + enabled: 0 + settings: {} + Win: + enabled: 1 + settings: {} + Win64: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.pdb b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.pdb index 2d1276a4..ea3d9205 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.pdb and b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Serialization.pdb differ diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll index 6efc32df..be7dc995 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll and b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll differ diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta index 0f9ae0b6..471a59ea 100644 --- a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta +++ b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.dll.meta @@ -1,109 +1,76 @@ -fileFormatVersion: 2 -guid: 1e0a9643dc0d4b46bf2321f72c4e503e -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - : Linux - second: - enabled: 1 - settings: {} - - first: - : LinuxUniversal - second: - enabled: 1 - settings: {} - - first: - : OSXIntel - second: - enabled: 1 - settings: {} - - first: - : OSXIntel64 - second: - enabled: 1 - settings: {} - - first: - : PSM - second: - enabled: 0 - settings: {} - - first: - Android: Android - second: - enabled: 1 - settings: {} - - first: - Any: - second: - enabled: 0 - settings: - Exclude Android: 0 - Exclude Editor: 1 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude N3DS: 1 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude PS4: 1 - Exclude PSM: 1 - Exclude PSP2: 1 - Exclude SamsungTV: 1 - Exclude Tizen: 1 - Exclude WebGL: 1 - Exclude WiiU: 1 - Exclude Win: 0 - Exclude Win64: 0 - Exclude WindowsStoreApps: 1 - Exclude XboxOne: 1 - Exclude iOS: 1 - Exclude tvOS: 1 - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Standalone: Linux64 - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: OSXUniversal - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: Win - second: - enabled: 1 - settings: - CPU: - - first: - Standalone: Win64 - second: - enabled: 1 - settings: - CPU: - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 1e0a9643dc0d4b46bf2321f72c4e503e +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 1 + settings: {} + Any: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 1 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 1 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + Linux: + enabled: 1 + settings: {} + Linux64: + enabled: 1 + settings: {} + LinuxUniversal: + enabled: 1 + settings: {} + OSXIntel: + enabled: 1 + settings: {} + OSXIntel64: + enabled: 1 + settings: {} + OSXUniversal: + enabled: 1 + settings: {} + PSM: + enabled: 0 + settings: {} + Win: + enabled: 1 + settings: {} + Win64: + enabled: 1 + settings: {} + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.pdb b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.pdb index a63facca..699efd78 100644 Binary files a/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.pdb and b/Plugins/Sirenix/Assemblies/NoEmitAndNoEditor/Sirenix.Utilities.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll index f9d4f878..ed9162b0 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll and b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta index fd1b7ab4..af2b507f 100644 --- a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta +++ b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.dll.meta @@ -1,55 +1,46 @@ -fileFormatVersion: 2 -guid: 47a84ebde4ec47fabb620b30cc7a3e5c -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 - platformData: - - first: - Any: - second: - enabled: 1 - settings: - Exclude Android: 0 - Exclude Editor: 0 - Exclude Linux: 0 - Exclude Linux64: 0 - Exclude LinuxUniversal: 0 - Exclude N3DS: 0 - Exclude OSXIntel: 0 - Exclude OSXIntel64: 0 - Exclude OSXUniversal: 0 - Exclude PS4: 0 - Exclude PSM: 0 - Exclude PSP2: 0 - Exclude SamsungTV: 0 - Exclude Tizen: 0 - Exclude WebGL: 0 - Exclude WiiU: 0 - Exclude Win: 0 - Exclude Win64: 0 - Exclude WindowsStoreApps: 0 - Exclude XboxOne: 0 - Exclude iOS: 0 - Exclude tvOS: 0 - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 47a84ebde4ec47fabb620b30cc7a3e5c +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 1 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 0 + Exclude Linux64: 0 + Exclude LinuxUniversal: 0 + Exclude N3DS: 0 + Exclude OSXIntel: 0 + Exclude OSXIntel64: 0 + Exclude OSXUniversal: 0 + Exclude PS4: 0 + Exclude PSM: 0 + Exclude PSP2: 0 + Exclude SamsungTV: 0 + Exclude Tizen: 0 + Exclude WebGL: 0 + Exclude WiiU: 0 + Exclude Win: 0 + Exclude Win64: 0 + Exclude WindowsStoreApps: 0 + Exclude XboxOne: 0 + Exclude iOS: 0 + Exclude tvOS: 0 + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.pdb b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.pdb index b5b95adc..42760bf9 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml index 25756ce4..11b6231c 100644 --- a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml +++ b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Attributes.xml @@ -383,7 +383,7 @@ Gets the height of the button. If it's zero or below then use default. - + The icon to be displayed inside the button. @@ -1539,9 +1539,7 @@ - - The name of a local field, member or property that returns a Color. Both static and instance methods are supported. - + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -1556,7 +1554,7 @@ Sets the GUI color for the property. - Specify the name of a local field, member or property that returns a Color. + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). @@ -1962,11 +1960,21 @@ The maximum Width. Values between 0 and 1 will be treated as percentage, 0 = ignore, otherwise pixels. + + + The width between each column. Values between 0 and 1 will be treated as percentage, otherwise pixels. + + Adds a title above the horizontal group. + + + Fallback to using the default label width, whatever that might be. + + The label width, 0 = auto. @@ -2137,9 +2145,7 @@ - - The color of the icon. - + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -2215,6 +2221,12 @@ Optional resolved string that specifies a condition for whether to show the inline button or not. + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + Draws a button to the right of the property. @@ -2231,41 +2243,41 @@ Optional label of the button. - - InlineAttribute is used on any property or field with a type that inherits from UnityEngine.Object. This includes components and assets etc. - - - - public class InlineEditorExamples : MonoBehaviour - { - [DisableInInlineEditors] - public Vector3 DisabledInInlineEditors; - - [HideInInlineEditors] - public Vector3 HiddenInInlineEditors; - - [InlineEditor] - public Transform InlineComponent; + + InlineAttribute is used on any property or field with a type that inherits from UnityEngine.Object. This includes components and assets etc. + + + + public class InlineEditorExamples : MonoBehaviour + { + [DisableInInlineEditors] + public Vector3 DisabledInInlineEditors; - [InlineEditor(InlineEditorModes.FullEditor)] - public Material FullInlineEditor; + [HideInInlineEditors] + public Vector3 HiddenInInlineEditors; - [InlineEditor(InlineEditorModes.GUIAndHeader)] - public Material InlineMaterial; + [InlineEditor] + public Transform InlineComponent; - [InlineEditor(InlineEditorModes.SmallPreview)] - public Material[] InlineMaterialList; + [InlineEditor(InlineEditorModes.FullEditor)] + public Material FullInlineEditor; - [InlineEditor(InlineEditorModes.LargePreview)] - public GameObject InlineObjectPreview; + [InlineEditor(InlineEditorModes.GUIAndHeader)] + public Material InlineMaterial; - [InlineEditor(InlineEditorModes.LargePreview)] - public Mesh InlineMeshPreview; - } - - - - + [InlineEditor(InlineEditorModes.SmallPreview)] + public Material[] InlineMaterialList; + + [InlineEditor(InlineEditorModes.LargePreview)] + public GameObject InlineObjectPreview; + + [InlineEditor(InlineEditorModes.LargePreview)] + public Mesh InlineMeshPreview; + } + + + + @@ -2290,7 +2302,7 @@ Maximum height of the inline editor. If the inline editor exceeds the specified height, a scrollbar will appear. - Values less or equals to zero will let the InlineEditor expand to its full size. + Values less or equals to zero will let the InlineEditor expand to its full size. @@ -2305,8 +2317,8 @@ - If false, this will prevent the InlineEditor attribute from incrementing the InlineEditorAttributeDrawer.CurrentInlineEditorDrawDepth. - This is helpful in cases where you want to draw the entire editor, and disregard attributes + If false, this will prevent the InlineEditor attribute from incrementing the InlineEditorAttributeDrawer.CurrentInlineEditorDrawDepth. + This is helpful in cases where you want to draw the entire editor, and disregard attributes such as [] and []. @@ -2320,6 +2332,11 @@ Whether to set GUI.enabled = false when drawing an editor for an asset that is locked by source control. Defaults to true. + + + Where to draw the preview. + + Initializes a new instance of the class. @@ -2417,15 +2434,13 @@ of that member reference or expression will be nicified. - + The icon to be displayed. - - The color of the icon. - + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -2433,6 +2448,12 @@ The new text of the label. + + + Give a property a custom icon. + + The icon to be shown next to the property. + Give a property a custom label. @@ -2556,9 +2577,7 @@ - - A resolved string with "int index" and "Color defaultColor" parameters that lets you control the color of individual elements. - + A resolved string with "int index" and "Color defaultColor" parameters that lets you control the color of individual elements. Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -2586,9 +2605,25 @@ Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether or not item count should be shown. + + + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + - Override the default setting specified in the Advanced Odin Preferences window and explicitly tell whether or not the list should be expanded or collapsed by default. + Whether to show a foldout for the collection or not. If this is set to false, the collection will *always* be expanded. + + This documentation used to wrongly state that this value would override the default setting specified in the Advanced Odin Preferences + window and explicitly tell whether or not the list should be expanded or collapsed by default. This value *would* do that, but it would + also simultaneously act as ShowFoldout, leading to weird and unintuitive behaviour. + + + + + + Override the default setting specified in the Odin Preferences window and explicitly tell whether or not the list should be expanded or collapsed by default. + Note that this will override the persisted expand state, as this is set *every time* the collection drawer is initialized. @@ -2626,14 +2661,14 @@ Whether the IsReadOnly property is set. - + - Whether the Expanded property is set. + Whether the ShowIndexLabels property is set. - + - Whether the ShowIndexLabels property is set. + Whether the DefaultExpandedState property is set. @@ -3226,7 +3261,7 @@ Draws a square ObjectField which renders a preview for UnityEngine.Object types. - This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. @@ -3240,7 +3275,7 @@ { [PreviewField] public UnityEngine.Object SomeObject; - + [PreviewField] public Texture SomeTexture; @@ -3256,6 +3291,11 @@ The height of the object field + + + The FilterMode to be used for the preview. (Applies only to previews retrieved via the previewGetter parameter). + + Left aligned. @@ -3266,6 +3306,11 @@ Whether an alignment value is specified. + + + A resolved value that should resolve to the desired preview texture. + + Draws a square object field which renders a preview for UnityEngine.Object type objects. @@ -3277,6 +3322,21 @@ The height of the preview field. + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The filter mode to be used for the preview texture. + Draws a square object field which renders a preview for UnityEngine.Object type objects. @@ -3284,6 +3344,23 @@ The height of the preview field. The alignment of the preview field. + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The alignment of the preview field. + The filter mode to be used for the preview texture. + + + + Draws a square object field which renders a preview for UnityEngine.Object type objects. + + A resolved value that should resolve to the desired preview texture. + The height of the preview field. + The alignment of the preview field. + The filter mode to be used for the preview texture. + Draws a square object field which renders a preview for UnityEngine.Object type objects. @@ -3418,9 +3495,7 @@ - - Optional resolved string that should evaluate to a Color value, to dynamically change the color of the progress bar. - + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -3430,10 +3505,7 @@ - - Optional resolved string that should evaluate to a Color value, to dynamically change the background color of the progress bar. - Default background color is (0.16, 0.16, 0.16, 1). - + Optional resolved string that should evaluate to a Color value, to dynamically change the background color of the progress bar. Default background color is (0.16, 0.16, 0.16, 1). It supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. @@ -3871,7 +3943,7 @@ - ReadOnly is used on any property, and disabled the property from being changed in the inspector. + ReadOnly is used on any property, and prevents the property from being changed in the inspector. Use this for when you want to see the value of a property in the inspector, but don't want it to be changed. @@ -4037,6 +4109,74 @@ The type of info box to draw. + + + + The minimum length of the collection. If not set, there is no minimum length restriction. + + + + + The maximum length of the collection. If not set, there is no maximum length restriction. + + + + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". + If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + + + + + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". + If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + + Limits the collection to be contain the specified number of elements. + + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + The maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + The minimum length of the collection. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + The minimum and maximum length of the collection. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + A C# expression for getting the maximum length of the collection, for example "@this.otherList.Count". If set, MaxLength will be the fallback in case nothing in case MaxLengthGetter returns null. + + + + Limits the collection to be contain the specified number of elements. + + A C# expression for getting the minimum length of the collection, for example "@this.otherList.Count". If set, MinLength will be the fallback in case nothing in case MinLengthGetter returns null. + The maximum length of the collection. + Groups buttons into a group that will position and resize the buttons based on the amount of available layout space. @@ -4415,6 +4555,9 @@ The icon to be displayed. + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + Draws a label at the end of the property. @@ -4552,6 +4695,14 @@ If true, the tab group will be hidden if it only contains one tab. + + Supports a variety of color formats, including named colors (e.g. "red", "orange", "green", "blue"), hex codes (e.g. "#FF0000" and "#FF0000FF"), and RGBA (e.g. "RGBA(1,1,1,1)") or RGB (e.g. "RGB(1,1,1)"), including Odin attribute expressions (e.g "@this.MyColor"). Here are the available named colors: black, blue, clear, cyan, gray, green, grey, magenta, orange, purple, red, transparent, transparentBlack, transparentWhite, white, yellow, lightblue, lightcyan, lightgray, lightgreen, lightgrey, lightmagenta, lightorange, lightpurple, lightred, lightyellow, darkblue, darkcyan, darkgray, darkgreen, darkgrey, darkmagenta, darkorange, darkpurple, darkred, darkyellow. + + + + Specify how tabs should be layouted. + + Organizes the property into the specified tab in the default group. @@ -4570,28 +4721,19 @@ Set to true to have a constant height across the entire tab group. The order of the group. - + - Name of all tabs in this group. - - - - - Combines the tab group with another group. - - The other group. - - - - Not yet documented. + Organizes the property into the specified tab in the specified group. - Not yet documented. + The group to attach the tab to. + The name of the tab. + Set to true to have a constant height across the entire tab group. + The order of the group. - + - Not yet documented. + Name of all tabs in this group. - Not yet documented. diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll index fc35018e..a90d2cee 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll and b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.pdb b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.pdb index 8da5f60a..7e2f4ffb 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml index 07fcfd23..5b70fd28 100644 --- a/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml +++ b/Plugins/Sirenix/Assemblies/Sirenix.OdinInspector.Editor.xml @@ -2622,31 +2622,6 @@ Gets the strongly typed ValueEntry of the OdinValueStateUpdater's property. - - - Not yet documented. - - - - - Not yet documented. - - - - - Not yet documented. - - - - - Not yet documented. - - - - - Not yet documented. - - Represents a weakly typed collection of values for a - one value per selected inspector target. @@ -6338,11 +6313,6 @@ Not yet documented. - - - Draws the property. - - Base drawer to inherit from to draw methods. @@ -8442,7 +8412,7 @@ OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) { { "Home", this, EditorIcons.House }, // draws the someDataField in this case. - { "Odin Settings", null, EditorIcons.SettingsCog }, + { "Odin Settings", null, SdfIconType.GearFill }, { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, { "Camera current", Camera.current }, @@ -8967,7 +8937,7 @@ OdinMenuTree tree = new OdinMenuTree(supportsMultiSelect: true) { { "Home", this, EditorIcons.House }, - { "Odin Settings", null, EditorIcons.SettingsCog }, + { "Odin Settings", null, SdfIconType.GearFill }, { "Odin Settings/Color Palettes", ColorPaletteManager.Instance, EditorIcons.EyeDropper }, { "Odin Settings/AOT Generation", AOTGenerationConfig.Instance, EditorIcons.SmartPhone }, { "Camera current", Camera.current }, @@ -9035,6 +9005,11 @@ Adds a menu item with the specified object instance and icon at the the specified path. + + + Adds a menu item with the specified object instance and icon at the the specified path. + + Adds a menu item with the specified object instance and icon at the the specified path. @@ -9360,6 +9335,11 @@ Assigns the specified icon to the last menu item in the collection. + + + Assigns the specified icon to the last menu item in the collection. + + Assigns the specified icon to the last menu item in the collection. @@ -9603,7 +9583,7 @@ Selects an enum. - + Draws an enum selector field using the enum selector. @@ -9613,7 +9593,7 @@ Draws an enum selector field using the enum selector. - + Draws an enum selector field using the enum selector. @@ -9967,7 +9947,7 @@ Draws dropwdown field, that creates and binds the selector to the dropdown field. - + Draws dropwdown field, that creates and binds the selector to the dropdown field. diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll new file mode 100644 index 00000000..d7544f66 Binary files /dev/null and b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta new file mode 100644 index 00000000..1270f2ef --- /dev/null +++ b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.dll.meta @@ -0,0 +1,46 @@ +fileFormatVersion: 2 +guid: 61824742f78323c439d83403f8272d41 +timeCreated: 1488828285 +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude N3DS: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude PS4: 1 + Exclude PSM: 1 + Exclude PSP2: 1 + Exclude SamsungTV: 1 + Exclude Tizen: 1 + Exclude WebGL: 1 + Exclude WiiU: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude WindowsStoreApps: 1 + Exclude XboxOne: 1 + Exclude iOS: 1 + Exclude tvOS: 1 + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb new file mode 100644 index 00000000..810f2876 Binary files /dev/null and b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb differ diff --git a/Plugins/Sirenix/Odin Inspector/Config/Resources.meta b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb.meta similarity index 54% rename from Plugins/Sirenix/Odin Inspector/Config/Resources.meta rename to Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb.meta index bcf325d3..78e88a68 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Resources.meta +++ b/Plugins/Sirenix/Assemblies/Sirenix.Reflection.Editor.pdb.meta @@ -1,8 +1,7 @@ -fileFormatVersion: 2 -guid: 067f9889215354fc2923729e5535e12e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: +fileFormatVersion: 2 +guid: 61824742f78323c439d83403f8270e6f +timeCreated: 1488828285 +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll index c440a7df..6934f091 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll and b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.pdb b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.pdb index c72ed5fe..69a9bd30 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.Config.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll index 922e8e6d..9ac5061d 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll and b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.pdb b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.pdb index 28598e73..552bb5a9 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Serialization.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.Serialization.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll index e9b7af0d..90cd4e34 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll and b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.pdb b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.pdb index 3cb08fdd..0f8020d7 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml index 216c5627..0622a489 100644 --- a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml +++ b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.Editor.xml @@ -1149,6 +1149,11 @@ Draws the graphics for a DropZone. + + + Draws the graphics for a DropZone. + + A draggable zone for both Unity and non-unity objects. @@ -1753,12 +1758,23 @@ - Begins the layout measuring. Remember to end with . + Begins the layout measuring. Remember to end with . + + + + + Begins the layout measuring. Remember to end with . + + + Ends the layout measuring started by + + The measured rect. + - Ends the layout measuring started by + Ends the layout measuring started by The measured rect. @@ -2277,11 +2293,6 @@ - - - The animation speed (1 / s) - - The animation speed @@ -2703,21 +2714,6 @@ - - - Gets the title of the tab. - - - - - Gets the title of the tab. - - - - - Gets the rect of the page. - - Begins the page. @@ -2916,6 +2912,13 @@ If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. @@ -2936,6 +2939,20 @@ Wheather or not to allow scene objects. How the square object field should be aligned. + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + Position and size of the field. + The label to use, or null if no label should be used. + The Unity object. + The Texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + How the square object field should be aligned. + Draws a square ObjectField which renders a preview for UnityEngine.Object types. @@ -2974,6 +2991,20 @@ The height or size of the square object field. How the square object field should be aligned. + + + Draws a square ObjectField which renders a preview for UnityEngine.Object types. + This object field also adds support for drag and drop, dragging an object to another square object field, swaps the values. + If you hold down control while letting go it will replace the value, And you can control + click the object field to quickly delete the value it holds. + + The label to use, or null if no label should be used. + The Unity object. + The texture to be used as the preview. + The Unity object type. This supports inheritance. + Wheather or not to allow scene objects. + The height or size of the square object field. + How the square object field should be aligned. + Draws a square ObjectField which renders a preview for UnityEngine.Object types. @@ -3009,6 +3040,17 @@ Wheather or not to allow scene objects. Layout options. + + + Draws a polymorphic ObjectField. + + The label to use, or null if no label should be used. + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + Draws a polymorphic ObjectField. @@ -3038,6 +3080,16 @@ Wheather or not to allow scene objects. Layout options. + + + Draws a polymorphic ObjectField. + + The value. + The object type. This supports inheritance. + The title to be shown in the object picker. + Wheather or not to allow scene objects. + Layout options. + Draws a field for a layer mask. @@ -5893,6 +5945,25 @@ The button's style. + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's icon alignment. ButtonIconAlignment.LeftOfText by default. + The button's style. + + + + + Draws a SDF icon button. + + The button's rect. + The button's icon. + The button's style. + + Draws a SDF icon button. @@ -5904,7 +5975,7 @@ The button's style. - + Draws a SDF icon button. @@ -5926,7 +5997,7 @@ The button's style. - + Calculates the minimum needed space for a SDF icon button where the label is still visible. @@ -5944,6 +6015,16 @@ true if the button was pressed. Otherwise false. + + + Draws a toolbar icon button. + + The icon for the button. + If true, the button clickable while GUI.enabled == false. + + true if the button was pressed. Otherwise false. + + Draws a toolbar icon button. @@ -6972,6 +7053,11 @@ Centered label style. + + + White centered label style. + + Centered mini label style. diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll index 56e12294..b8ced21e 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll and b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.dll differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.pdb b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.pdb index 71a6e56e..553048d1 100644 Binary files a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.pdb and b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.pdb differ diff --git a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml index 0f72eb31..339e4118 100644 --- a/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml +++ b/Plugins/Sirenix/Assemblies/Sirenix.Utilities.xml @@ -1355,6 +1355,11 @@ The string to check. true if this string is null, empty, or contains only whitespace; otherwise, false. + + + O(n*m) - Use with care. + + Type method extensions. @@ -1363,7 +1368,6 @@ Type name alias lookup. - TypeNameAlternatives["Single"] will give you "float", "UInt16" will give you "ushort", "Boolean[]" will give you "bool[]" etc.. @@ -1525,11 +1529,6 @@ Returns a lazy enumerable of all the base classes of this type - - - Used to filter out unwanted type names. Ex "int" instead of "Int32" - - Returns a nicely formatted name of a type. diff --git a/Plugins/Sirenix/Odin Inspector.meta b/Plugins/Sirenix/Odin Inspector.meta index 9fede689..0213108e 100644 --- a/Plugins/Sirenix/Odin Inspector.meta +++ b/Plugins/Sirenix/Odin Inspector.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c597a91dfeb7e41e6ba6fc6529a49110 +guid: abce34fc4c84f7e40a26a9d11d1c578a folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset b/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset index 44e44883..fa73a132 100644 --- a/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset +++ b/Plugins/Sirenix/Odin Inspector/Assets/Editor/OdinPathLookup.asset @@ -10,4 +10,4 @@ MonoBehaviour: m_EditorHideFlags: 0 m_Script: {fileID: -262940062, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} m_Name: OdinPathLookup - m_EditorClassIdentifier: + m_EditorClassIdentifier: \ No newline at end of file diff --git a/Plugins/Sirenix/Odin Inspector/Config.meta b/Plugins/Sirenix/Odin Inspector/Config.meta index a0de0ead..76d98d87 100644 --- a/Plugins/Sirenix/Odin Inspector/Config.meta +++ b/Plugins/Sirenix/Odin Inspector/Config.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e27ddb641b8d54d0ba8ce0baa9a86bdf +guid: 8e01b42340c914b3fbcfaa7169848990 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor.meta index a1e84bac..e8d21b70 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor.meta +++ b/Plugins/Sirenix/Odin Inspector/Config/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d0f01eb4b6cf9446692bbdd703444fed +guid: 4546e7d5fb02f43cea5ef2dd75730285 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset b/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset deleted file mode 100644 index 91f67d8a..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset +++ /dev/null @@ -1,20 +0,0 @@ -%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: 1726182683, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} - m_Name: AOTGenerationConfig - m_EditorClassIdentifier: - automateBeforeBuilds: 0 - deleteDllAfterBuilds: 1 - AutomateForAllAOTPlatforms: 1 - automateForPlatforms: 0900000014000000 - lastScan: 0 - supportSerializedTypes: [] diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta deleted file mode 100644 index e22e804a..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/AOTGenerationConfig.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 88e60ca804b5448369102f80317eb6cf -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset b/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset deleted file mode 100644 index 4393db14..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset +++ /dev/null @@ -1,136 +0,0 @@ -%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: 772478971, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} - m_Name: ColorPaletteManager - m_EditorClassIdentifier: - colorPalettes: - - name: Country - showAlpha: 0 - colors: - - {r: 0.776, g: 0.651, b: 0.349, a: 1} - - {r: 0.863, g: 0.761, b: 0.631, a: 1} - - {r: 0.91, g: 0.831, b: 0.686, a: 1} - - {r: 0.961, g: 0.902, b: 0.788, a: 1} - - {r: 0.753, g: 0.714, b: 0.667, a: 1} - - {r: 0.478, g: 0.573, b: 0.431, a: 1} - - {r: 0.314, g: 0.427, b: 0.31, a: 1} - - {r: 0.596, g: 0.345, b: 0.235, a: 1} - - {r: 0.545, g: 0.329, b: 0.318, a: 1} - - {r: 0.647, g: 0.204, b: 0.227, a: 1} - - {r: 0.435, g: 0.161, b: 0.063, a: 1} - - {r: 0.357, g: 0.333, b: 0.278, a: 1} - - {r: 0.976, g: 0.98, b: 0.961, a: 1} - - {r: 0.165, g: 0.271, b: 0.11, a: 1} - - name: Beach - showAlpha: 0 - colors: - - {r: 0.996, g: 0.906, b: 0.459, a: 1} - - {r: 0.314, g: 0.592, b: 0.035, a: 1} - - {r: 0.486, g: 0.953, b: 0.875, a: 1} - - {r: 0.996, g: 0.82, b: 0.212, a: 1} - - {r: 1, g: 0.769, b: 0.165, a: 1} - - {r: 0.804, g: 0.835, b: 0.753, a: 1} - - {r: 1, g: 0.769, b: 0.165, a: 1} - - {r: 1, g: 0.702, b: 0.063, a: 1} - - {r: 1, g: 0.898, b: 0.569, a: 1} - - name: Fall - showAlpha: 0 - colors: - - {r: 0.82, g: 0.722, b: 0.318, a: 1} - - {r: 0.537, g: 0.192, b: 0.153, a: 1} - - {r: 0.996, g: 0.812, b: 0.012, a: 1} - - {r: 1, g: 0.431, b: 0.02, a: 1} - - {r: 0.937, g: 0.267, b: 0.094, a: 1} - - {r: 0.42, g: 0.212, b: 0.18, a: 1} - - {r: 0.992, g: 0.651, b: 0.004, a: 1} - - {r: 0.89, g: 0.353, b: 0.086, a: 1} - - {r: 1, g: 0.443, b: 0.004, a: 1} - - {r: 0.682, g: 0.275, b: 0.137, a: 1} - - {r: 0.306, g: 0.231, b: 0.114, a: 1} - - {r: 0.384, g: 0.416, b: 0.082, a: 1} - - {r: 0.165, g: 0.157, b: 0.008, a: 1} - - {r: 0.906, g: 0.635, b: 0.227, a: 1} - - {r: 0.82, g: 0.722, b: 0.318, a: 1} - - {r: 0.745, g: 0.435, b: 0.031, a: 1} - - {r: 0.765, g: 0.682, b: 0.569, a: 1} - - {r: 0.18, g: 0.149, b: 0.075, a: 1} - - {r: 0.702, g: 0.451, b: 0.059, a: 1} - - name: Passion - showAlpha: 0 - colors: - - {r: 0.925, g: 0.682, b: 0.624, a: 1} - - {r: 0.188, g: 0.114, b: 0.224, a: 1} - - {r: 0.349, g: 0.11, b: 0.231, a: 1} - - {r: 0.435, g: 0.267, b: 0.357, a: 1} - - name: Sepia - showAlpha: 0 - colors: - - {r: 0.353, g: 0.098, b: 0.02, a: 1} - - {r: 0.663, g: 0.188, b: 0.114, a: 1} - - {r: 0.906, g: 0.643, b: 0.082, a: 1} - - {r: 0.996, g: 0.839, b: 0.322, a: 1} - - {r: 0.486, g: 0.392, b: 0.02, a: 1} - - {r: 0.294, g: 0.235, b: 0.012, a: 1} - - name: Floral - showAlpha: 0 - colors: - - {r: 0.855, g: 0.518, b: 0.412, a: 1} - - {r: 0.827, g: 0.294, b: 0.333, a: 1} - - {r: 0.737, g: 0.118, b: 0.208, a: 1} - - {r: 0.549, g: 0.149, b: 0.235, a: 1} - - {r: 0.949, g: 0.925, b: 0.784, a: 1} - - {r: 0.945, g: 0.882, b: 0.69, a: 1} - - {r: 0.871, g: 0.812, b: 0.698, a: 1} - - {r: 0.4, g: 0.196, b: 0.243, a: 1} - - {r: 0.271, g: 0.157, b: 0.227, a: 1} - - name: Underwater - showAlpha: 0 - colors: - - {r: 0.663, g: 0.416, b: 0.733, a: 1} - - {r: 0.2, g: 0.6, b: 0.698, a: 1} - - {r: 0.11, g: 0.49, b: 0.698, a: 1} - - {r: 0.439, g: 0.627, b: 0.227, a: 1} - - {r: 0, g: 0.357, b: 0.604, a: 1} - - {r: 0.067, g: 0.271, b: 0.353, a: 1} - - name: Breeze - showAlpha: 0 - colors: - - {r: 0.706, g: 1, b: 0, a: 1} - - {r: 0.651, g: 1, b: 0.404, a: 1} - - {r: 0.122, g: 1, b: 0.514, a: 1} - - {r: 0.216, g: 0.894, b: 0.961, a: 1} - - {r: 0.4, g: 1, b: 0.882, a: 1} - - {r: 0.027, g: 0.792, b: 0.8, a: 1} - - name: Clovers - showAlpha: 0 - colors: - - {r: 0.431, g: 0.549, b: 0.102, a: 1} - - {r: 0.671, g: 0.714, b: 0.071, a: 1} - - {r: 0.969, g: 0.949, b: 0.831, a: 1} - - {r: 0.886, g: 0.902, b: 0.702, a: 1} - - {r: 0.753, g: 0.824, b: 0.627, a: 1} - - {r: 0.404, g: 0.6, b: 0.4, a: 1} - - name: Tropical - showAlpha: 0 - colors: - - {r: 0.953, g: 0.647, b: 0.804, a: 1} - - {r: 0.965, g: 0.741, b: 0.871, a: 1} - - {r: 0.949, g: 0.549, b: 0.643, a: 1} - - {r: 0.992, g: 0.659, b: 0.498, a: 1} - - {r: 0.976, g: 0.792, b: 0.729, a: 1} - - {r: 0.984, g: 0.855, b: 0.725, a: 1} - - {r: 0.259, g: 0.882, b: 0.663, a: 1} - - {r: 0.349, g: 0.753, b: 0.78, a: 1} - - {r: 0.725, g: 0.976, b: 0.91, a: 1} - - {r: 0.647, g: 0.745, b: 0.957, a: 1} - - {r: 0.725, g: 0.863, b: 0.973, a: 1} - - {r: 0.89, g: 0.945, b: 0.996, a: 1} diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta deleted file mode 100644 index 3468a929..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/ColorPaletteManager.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f0d24f12f0f294c7fa7ab18090fd8d4c -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta index d94541b7..cc5f8828 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta +++ b/Plugins/Sirenix/Odin Inspector/Config/Editor/GeneralDrawerConfig.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fa1366bf1102e4442968b94acae9b3bc +guid: f1750fa5ace264d9989a9b0383a59444 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset b/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset deleted file mode 100644 index 338ffe3d..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset +++ /dev/null @@ -1,15 +0,0 @@ -%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: 188390376, guid: a4865f1ab4504ed8a368670db22f409c, type: 3} - m_Name: ImportSettingsConfig - m_EditorClassIdentifier: - automateBeforeBuild: 1 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta deleted file mode 100644 index 48aa26aa..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/ImportSettingsConfig.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: eb826b41b8c58429296f3448f879458d -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta index 0b8b3240..6e19cd58 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta +++ b/Plugins/Sirenix/Odin Inspector/Config/Editor/InspectorConfig.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5c59df0bacacc4b0daa9240513f49c28 +guid: 0cc10d8d79c5648e2931e6d95d60066a NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset b/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset index d5eb9e69..efc977db 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset +++ b/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset @@ -15,9 +15,5 @@ MonoBehaviour: configurations: - ID: Unity.Mathematics ActivationSettings: 0 - - ID: Unity.Localization - ActivationSettings: 0 - - ID: Unity.Entities - ActivationSettings: 0 ModuleTogglingSettings: 2 ModuleUpdateSettings: 0 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta index 019ce5c7..3910bf68 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta +++ b/Plugins/Sirenix/Odin Inspector/Config/Editor/OdinModuleConfig.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d361d8afd7824494ea4d5f21c3f73f94 +guid: c78b2db66760a460fb52833ba2de4b43 NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset b/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset deleted file mode 100644 index 979e72e9..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset +++ /dev/null @@ -1,22 +0,0 @@ -%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: 1549551891, guid: 74721b9f0af448f5ae2e91102a1a5edd, type: 3} - m_Name: GlobalSerializationConfig - m_EditorClassIdentifier: - HideSerializationCautionaryMessage: 1 - HidePrefabCautionaryMessage: 1 - HideOdinSerializeAttributeWarningMessages: 0 - HideNonSerializedShowInInspectorWarningMessages: 0 - buildSerializationFormat: 0 - editorSerializationFormat: 2 - loggingPolicy: 0 - errorHandlingPolicy: 0 diff --git a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta b/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta deleted file mode 100644 index c12ca5f9..00000000 --- a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix/GlobalSerializationConfig.asset.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f897115d4c42e42f990bf412ed70dfef -NativeFormatImporter: - externalObjects: {} - mainObjectFileID: 11400000 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data b/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data index 4f684460..d05996ec 100644 Binary files a/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data and b/Plugins/Sirenix/Odin Inspector/Modules/Unity.Localization.data differ diff --git a/Resources/GlobalManager.prefab b/Resources/GlobalManager.prefab index 936a7aae..bd01cc07 100644 --- a/Resources/GlobalManager.prefab +++ b/Resources/GlobalManager.prefab @@ -124,12 +124,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b750b66b07a8348e08d53030fdb40e6c, type: 3} m_Name: m_EditorClassIdentifier: - IsDebugJson: 0 - IsDebugPool: 0 - IsDebugData: 0 - IsDebugAsset: 0 - IsDebugEvent: 0 - IsDebugScene: 0 + isDebugJson: 0 + isDebugPool: 0 + isDebugData: 0 + isDebugAsset: 0 + isDebugEvent: 0 + isDebugScene: 0 + key: + chat: "\u83B7\u53D6\u5730\u5740: https://platform.openai.com/account/api-keys" --- !u!114 &778044560079173824 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Runtime/.DS_Store b/Runtime/.DS_Store index 76e1ff45..6d143188 100644 Binary files a/Runtime/.DS_Store and b/Runtime/.DS_Store differ diff --git a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta b/Runtime/AI.meta similarity index 77% rename from Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta rename to Runtime/AI.meta index acd8e838..06c44e0c 100644 --- a/Plugins/Sirenix/Odin Inspector/Config/Resources/Sirenix.meta +++ b/Runtime/AI.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 063daa680fb6a4e938467438fa6dadbf +guid: 1323de4a1abac4ad7b518340024ee4f5 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Runtime/AI/ChatGPT.cs b/Runtime/AI/ChatGPT.cs new file mode 100755 index 00000000..52f64ebe --- /dev/null +++ b/Runtime/AI/ChatGPT.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using JFramework; +using JFramework.Core; +using JFramework.Table; +using UnityEngine; +using UnityEngine.Networking; + +// ReSharper disable All +internal static class ChatGPT +{ + internal static string key => GlobalManager.Instance.key; + internal static string chat=> GlobalManager.Instance.chat; + + public static void SendData() + { + if (chat.IsEmpty()) return; + GlobalManager.Instance.StartCoroutine(Request(chat)); + GlobalManager.Instance.chat = ""; + } + + private static IEnumerator Request(string prompt) + { + using var request = new UnityWebRequest(ChatConst.Url, "POST"); + var jsonText = JsonUtility.ToJson(new PostData + { + model = ChatConst.Model, + prompt = prompt, + max_tokens = ChatConst.MaxTokens, + temperature = ChatConst.Temperature, + top_p = ChatConst.TopPage, + frequency_penalty = ChatConst.FrequencyPenalty, + presence_penalty = ChatConst.PresencePenalty, + stop = ChatConst.Stop + }); + var jsonByte = Encoding.UTF8.GetBytes(jsonText); + request.uploadHandler = new UploadHandlerRaw(jsonByte); + request.downloadHandler = new DownloadHandlerBuffer(); + request.SetRequestHeader("Content-Type", "application/json"); + request.SetRequestHeader("Authorization", $"Bearer {key}"); + yield return request.SendWebRequest(); + + if (request.result == UnityWebRequest.Result.Success) + { + try + { + var replyMsg = request.downloadHandler.text; + var response = JsonUtility.FromJson(replyMsg); + if (response != null && response.choices.Count > 0) + { + var index = response.choices.Count - 1; + var message = response.choices[index].message; + message.content = message.content.Trim(); + Debug.Log(message.content); + } + } + catch (Exception e) + { + Debug.LogWarning($"{nameof(ChatGPT).Red()} => 返回数据解析失败!\n" + e); + } + } + else + { + Debug.LogError($"{nameof(ChatGPT).Red()} => {request.error}"); + } + } + + private struct ChatConst + { + public const string Url = "https://api.openai.com/v1/completions"; + public const string Model = "text-davinci-003"; + public const int MaxTokens = 1024; + public const float Temperature = 0.9f; + public const int TopPage = 1; + public const float FrequencyPenalty = 0.0f; + public const float PresencePenalty = 0.6f; + public const string Stop = "\\n"; + } + + public struct PostData + { + public string model; + public string prompt; + public int max_tokens; + public float temperature; + public int top_p; + public float frequency_penalty; + public float presence_penalty; + public string stop; + } + + public class TextResponse + { + public string id; + public string @object; + public string created; + public string model; + public Usage usage; + public List choices; + } + + public struct Choice + { + public Message message; + public string finish_reason; + public int index; + } + + public struct Message + { + public string role; + public string content; + } + + public struct Usage + { + public string prompt_tokens; + public string completion_tokens; + public string total_tokens; + } +} \ No newline at end of file diff --git a/Runtime/AI/ChatGPT.cs.meta b/Runtime/AI/ChatGPT.cs.meta new file mode 100755 index 00000000..4d2c1b2c --- /dev/null +++ b/Runtime/AI/ChatGPT.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5d6e8aefd6bca3c4ea9600a211d0949a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Asset/AssetManager.cs b/Runtime/Asset/AssetManager.cs index cf3de33b..a0beae0c 100644 --- a/Runtime/Asset/AssetManager.cs +++ b/Runtime/Asset/AssetManager.cs @@ -17,7 +17,7 @@ public static class AssetManager /// 资源存储字典 /// internal static Dictionary assetDict; - + /// /// 管理器名称 /// @@ -40,16 +40,22 @@ public static T Load(string name) where T : Object Debug.Log($"{Name.Red()} 没有初始化"); return null; } - + var result = Addressables.LoadAssetAsync(name).WaitForCompletion(); - if (GlobalManager.Instance.IsDebugAsset) + if (result == null) + { + Debug.Log($"{Name.Sky()} 加载 => {name.Red()} 资源失败"); + return null; + } + + if (GlobalManager.IsDebugAsset) { Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 资源成功"); } - + return result is GameObject ? Object.Instantiate(result) : result; } - + /// /// 通过资源加载管理器异步加载资源 /// @@ -63,70 +69,54 @@ public static void LoadAsync(string name, Action action) where T : Object Debug.Log($"{Name.Red()} 没有初始化"); return; } - + AsyncOperationHandle handle; if (assetDict.ContainsKey(name)) { handle = (AsyncOperationHandle)assetDict[name]; if (handle.IsDone) { - action(handle.Result is GameObject ? Object.Instantiate(handle.Result) : handle.Result); - if (GlobalManager.Instance.IsDebugAsset) - { - Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 资源成功"); - } + LoadSuccess(handle.Result, action); } else { - handle.Completed += obj => - { - if (obj.Status == AsyncOperationStatus.Succeeded) - { - action(obj.Result is GameObject ? Object.Instantiate(obj.Result) : obj.Result); - if (GlobalManager.Instance.IsDebugAsset) - { - Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 资源成功"); - } - } - }; + handle.Completed -= LoadCompleted; + handle.Completed += LoadCompleted; } return; } - try - { - handle = Addressables.LoadAssetAsync(name); - } - catch (Exception) - { - Debug.Log($"{Name.Sky()} 加载 => {name.Red()} 资源失败"); - return; - } - - handle.Completed += obj => + handle = Addressables.LoadAssetAsync(name); + handle.Completed += LoadCompleted; + assetDict.Add(name, handle); + + void LoadCompleted(AsyncOperationHandle obj) { if (obj.Status == AsyncOperationStatus.Succeeded) { - action(obj.Result is GameObject ? Object.Instantiate(obj.Result) : obj.Result); - if (GlobalManager.Instance.IsDebugAsset) - { - Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 资源成功"); - } + LoadSuccess(obj.Result, action); } else { - if (GlobalManager.Instance.IsDebugAsset) - { - Debug.Log($"{Name.Sky()} 加载 => {name.Red()} 资源失败"); - } if (assetDict.ContainsKey(name)) { assetDict.Remove(name); } + + Debug.Log($"{Name.Sky()} 加载 => {name.Red()} 资源失败"); } - }; - assetDict.Add(name, handle); + } + + void LoadSuccess(T result, Action callback) + { + if (GlobalManager.IsDebugAsset) + { + Debug.Log($"{Name.Sky()} 加载 => {result.name.Green()} 资源成功"); + } + + callback(result is GameObject ? Object.Instantiate(result) : result); + } } /// @@ -141,7 +131,7 @@ public static void Dispose(string name) Debug.Log($"{Name.Red()} 没有初始化"); return; } - + if (!assetDict.ContainsKey(name)) return; var handle = (AsyncOperationHandle)assetDict[name]; Addressables.Release(handle); diff --git a/Runtime/Audio/AudioManager.cs b/Runtime/Audio/AudioManager.cs index a06ea5bf..134f0d6c 100644 --- a/Runtime/Audio/AudioManager.cs +++ b/Runtime/Audio/AudioManager.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using UnityEngine; +// ReSharper disable All namespace JFramework.Core { public static class AudioManager @@ -39,12 +40,12 @@ public static class AudioManager /// /// 背景音乐 /// - public static float SoundVolume => audioSetting?.soundVolume ?? 0.5f; + public static float soundVolume => audioSetting?.soundVolume ?? 0.5f; /// /// 游戏声音 /// - public static float AudioVolume => audioSetting?.audioVolume ?? 0.5f; + public static float sudioVolume => audioSetting?.audioVolume ?? 0.5f; /// /// 音效管理器初始化 diff --git a/Runtime/Controller/Controller.cs b/Runtime/Controller/Controller.cs index 6d282a0f..5e460c44 100644 --- a/Runtime/Controller/Controller.cs +++ b/Runtime/Controller/Controller.cs @@ -22,23 +22,23 @@ public abstract class Controller : SerializedScriptableObject, IControl private void Start(TEntity owner) { this.owner = owner; - Start(); + Spawn(); } /// /// 控制器初始化 /// - protected abstract void Start(); + protected virtual void Spawn() { } /// /// 通过接口初始化控制器 /// /// 控制器的所有者 - void IController.Start(IEntity owner) => Start((TEntity)owner); - + void IController.Spawn(IEntity owner) => Start((TEntity)owner); + /// /// 控制器清除 /// - void IController.Clear() => Destroy(this); + void IController.Despawn() => Destroy(this); } } \ No newline at end of file diff --git a/Runtime/Controller/IController.cs b/Runtime/Controller/IController.cs index c47ea0df..4e1c3504 100644 --- a/Runtime/Controller/IController.cs +++ b/Runtime/Controller/IController.cs @@ -9,11 +9,11 @@ public interface IController /// 控制器初始化 /// /// 控制器的所有者 - void Start(IEntity owner); + void Spawn(IEntity owner); /// /// 控制器清除 /// - void Clear(); + void Despawn(); } } \ No newline at end of file diff --git a/Runtime/DataTable/DataManager.cs b/Runtime/DataTable/DataManager.cs index b2a607fc..0d58b532 100644 --- a/Runtime/DataTable/DataManager.cs +++ b/Runtime/DataTable/DataManager.cs @@ -60,7 +60,7 @@ internal static void Awake() return; } - if (GlobalManager.Instance.IsDebugData) + if (GlobalManager.IsDebugData) { Debug.Log($"{Name.Sky()} 加载 => {type.Name.Blue()} 数据表"); } @@ -118,7 +118,7 @@ public static T Get(int key) where T : IData IntDataDict.TryGetValue(typeof(T), out IntDataDict soDict); if (soDict == null) return default; soDict.TryGetValue(key, out IData data); - if (GlobalManager.Instance.IsDebugData) + if (GlobalManager.IsDebugData) { Debug.Log(data != null ? $"{Name.Sky()} 获取 => {typeof(T).Name.Blue()} : {key.ToString().Green()} 数据成功" @@ -139,7 +139,7 @@ public static T Get(string key) where T : IData StrDataDict.TryGetValue(typeof(T), out StrDataDict soDict); if (soDict == null) return default; soDict.TryGetValue(key, out IData data); - if (GlobalManager.Instance.IsDebugData) + if (GlobalManager.IsDebugData) { Debug.Log(data != null ? $"{Name.Sky()} 获取 => {typeof(T).Name.Blue()} : {key.Green()} 数据成功" @@ -160,7 +160,7 @@ public static T Get(Enum key) where T : IData EnmDataDict.TryGetValue(typeof(T), out EnmDataDict soDict); if (soDict == null) return default; soDict.TryGetValue(key, out IData data); - if (GlobalManager.Instance.IsDebugData) + if (GlobalManager.IsDebugData) { Debug.Log(data != null ? $"{Name.Sky()} 获取 => {typeof(T).Name.Blue()} : {key.ToString().Green()} 数据成功" @@ -179,7 +179,7 @@ public static T Get(Enum key) where T : IData public static List GetTable() where T : IData { var table = GetTable(typeof(T)); - if (GlobalManager.Instance.IsDebugData && table != null) + if (GlobalManager.IsDebugData && table != null) { Debug.Log($"{Name.Sky()} 获取 => {typeof(T).Name.Blue()} 列表成功"); } @@ -260,16 +260,6 @@ private static Type GetKeyField(Assembly assembly, Type type) return assembly.GetType("JFramework.Table." + name); } - /// - /// 获取数据的键值 - /// - /// 返回数据的主键 - public static object GetKeyField(IData data) - { - var key = GetKeyField(data.GetType()); - return key == null ? null : key.GetValue(data); - } - /// /// 清除数据管理器 /// diff --git a/Runtime/Date/DateSetting.cs b/Runtime/Date/DateSetting.cs deleted file mode 100644 index 8e72164f..00000000 --- a/Runtime/Date/DateSetting.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace JFramework -{ - public struct DateSetting - { - /// - /// 刷新事件标识 - /// - public const int OnDateChanged = 998; - - /// - /// 每日刷新时间 - /// - public const int RefreshHour = 5; - } -} \ No newline at end of file diff --git a/Runtime/Date/DateSetting.cs.meta b/Runtime/Date/DateSetting.cs.meta deleted file mode 100644 index e0f87d55..00000000 --- a/Runtime/Date/DateSetting.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: ad2635b185ae4ff8a0a5f50ec7edae7f -timeCreated: 1680117310 \ No newline at end of file diff --git a/Runtime/Date.meta b/Runtime/DateTime.meta similarity index 100% rename from Runtime/Date.meta rename to Runtime/DateTime.meta diff --git a/Runtime/Date/DateManager.cs b/Runtime/DateTime/DailyManager.cs similarity index 75% rename from Runtime/Date/DateManager.cs rename to Runtime/DateTime/DailyManager.cs index 3c492059..0b2b081f 100644 --- a/Runtime/Date/DateManager.cs +++ b/Runtime/DateTime/DailyManager.cs @@ -1,14 +1,21 @@ using System; using UnityEngine; +// ReSharper disable All namespace JFramework.Core { - internal static class DateManager + public static class DailyManager { + public static event Action UpdateEvent; + /// + /// 每日刷新时间 + /// + private const int RefreshTime = 5; + /// /// 管理器名称 /// - private static string Name => nameof(DateManager); + private static string Name => nameof(DailyManager); /// /// 上一次检测时间 @@ -21,9 +28,9 @@ internal static class DateManager private static DateTime dateTime => DateTime.Now; /// - /// 明天 + /// 明天的早上5点 /// - internal static DateTime tomorrow; + private static DateTime tomorrow; private static int lastDayOfYear { @@ -36,9 +43,8 @@ private static int lastDayOfYear /// internal static void Awake() { - lastCheckTime = -5; - GlobalManager.Instance.UpdateAction += OnUpdate; - tomorrow = DateTime.Today.Add(new TimeSpan(1, DateSetting.RefreshHour, 0, 0)); + GlobalManager.Instance.UpdateEvent += OnUpdate; + tomorrow = DateTime.Today.Add(new TimeSpan(1, RefreshTime, 0, 0)); } /// @@ -58,15 +64,15 @@ private static void OnUpdate() if (dateTime.DayOfYear - lastDayOfYear >= 2) { lastDayOfYear = dateTime.DayOfYear; - EventManager.Invoke(DateSetting.OnDateChanged); + UpdateEvent?.Invoke(); } //只有一天未登陆 else { - if (dateTime.Hour >= DateSetting.RefreshHour) + if (dateTime.Hour >= RefreshTime) { lastDayOfYear = dateTime.DayOfYear; - EventManager.Invoke(DateSetting.OnDateChanged); + UpdateEvent?.Invoke(); } } } @@ -79,15 +85,15 @@ private static void OnUpdate() if (lastYearTotalDays + dateTime.DayOfYear - lastDayOfYear >= 2) { lastDayOfYear = dateTime.DayOfYear; - EventManager.Invoke(DateSetting.OnDateChanged); + UpdateEvent?.Invoke(); } //一天未登陆并且到达刷新时间 else { - if (dateTime.Hour >= DateSetting.RefreshHour) + if (dateTime.Hour >= RefreshTime) { lastDayOfYear = dateTime.DayOfYear; - EventManager.Invoke(DateSetting.OnDateChanged); + UpdateEvent?.Invoke(); } } } @@ -100,7 +106,6 @@ private static void OnUpdate() /// internal static void Destroy() { - lastDayOfYear = dateTime.DayOfYear; } } } \ No newline at end of file diff --git a/Runtime/Date/DateManager.cs.meta b/Runtime/DateTime/DailyManager.cs.meta similarity index 100% rename from Runtime/Date/DateManager.cs.meta rename to Runtime/DateTime/DailyManager.cs.meta diff --git a/Runtime/Entity/Entity.cs b/Runtime/Entity/Entity.cs index f25c100c..9dee315a 100644 --- a/Runtime/Entity/Entity.cs +++ b/Runtime/Entity/Entity.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using JFramework.Core; using JFramework.Interface; using UnityEngine; @@ -12,25 +11,21 @@ namespace JFramework [Serializable] public abstract class Entity : MonoBehaviour, IEntity { - /// - /// 控制器容器 - /// - private Dictionary controllerDict; - /// /// 实体生成 /// /// 传入生成参数 - public virtual void Spawn(params object[] value) - { - } + public virtual void Spawn(params object[] value) { } /// /// 实体更新 /// - protected virtual void OnUpdate() - { - } + protected virtual void OnUpdate() { } + + /// + /// 实体销毁 + /// + public virtual void Despawn() { } /// /// 实体启用 @@ -53,29 +48,17 @@ protected virtual void OnDisable() /// /// 实体销毁 /// - protected virtual void OnDestroy() + protected void OnDestroy() { - if (controllerDict == null) return; - foreach (var controller in controllerDict.Values) + try { - controller.Clear(); + Despawn(); + } + catch (Exception e) + { + Debug.LogWarning(e); + throw; } - } - - /// - /// 获取控制器 - /// - /// 可使用任何继承IController的对象 - /// 返回控制器对象 - public T Get() where T : ScriptableObject, IController - { - var key = typeof(T).Name; - controllerDict ??= new Dictionary(); - if (controllerDict.ContainsKey(key)) return (T)controllerDict[key]; - var controller = ScriptableObject.CreateInstance(); - controllerDict.Add(key, controller); - controller.Start(this); - return controller; } /// diff --git a/Runtime/Entity/EntitySpecial.cs b/Runtime/Entity/EntitySpecial.cs new file mode 100644 index 00000000..99795b4a --- /dev/null +++ b/Runtime/Entity/EntitySpecial.cs @@ -0,0 +1,41 @@ +using System.Collections.Generic; +using JFramework.Interface; +using Sirenix.OdinInspector; +using Sirenix.Utilities; +using UnityEngine; + +// ReSharper disable All +namespace JFramework +{ + public class EntitySpecial : Entity + { + /// + /// 控制器容器 + /// + [ShowInInspector, LabelText("控制器容器"), SerializeField] + private readonly Dictionary controllerDict = new Dictionary(); + + /// + /// 获取控制器 + /// + /// 可使用任何继承IController的对象 + /// 返回控制器对象 + public T Get() where T : ScriptableObject, IController + { + var key = typeof(T).Name; + if (controllerDict.ContainsKey(key)) return (T)controllerDict[key]; + var controller = ScriptableObject.CreateInstance(); + controllerDict.Add(key, controller); + controller.Spawn(this); + return controller; + } + + /// + /// 实体销毁 + /// + public override void Despawn() + { + controllerDict?.Values.ForEach(controller => controller.Despawn()); + } + } +} \ No newline at end of file diff --git a/Runtime/Entity/EntitySpecial.cs.meta b/Runtime/Entity/EntitySpecial.cs.meta new file mode 100644 index 00000000..05b4fa9a --- /dev/null +++ b/Runtime/Entity/EntitySpecial.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0de891c411bd4138adb0630e91382dd0 +timeCreated: 1682461657 \ No newline at end of file diff --git a/Runtime/Entity/IEntity.cs b/Runtime/Entity/IEntity.cs index 415e6ef8..700c568b 100644 --- a/Runtime/Entity/IEntity.cs +++ b/Runtime/Entity/IEntity.cs @@ -10,10 +10,15 @@ public interface IEntity /// /// 传入生成的参数 void Spawn(params object[] value); - + /// - /// 实体的更新方法 + /// 实体更新 /// void Update(); + + /// + /// 实体销毁 + /// + void Despawn(); } } \ No newline at end of file diff --git a/Runtime/Event/EventManager.cs b/Runtime/Event/EventManager.cs index 5d179b9f..b2b3ef89 100644 --- a/Runtime/Event/EventManager.cs +++ b/Runtime/Event/EventManager.cs @@ -40,7 +40,7 @@ public static void Listen(int id, EventData action) eventDict.Add(id, action); } - if (GlobalManager.Instance.IsDebugEvent) + if (GlobalManager.IsDebugEvent) { Debug.Log($"{Name.Sky()} 侦听 => {action.Method.ToString().Yellow()} 事件"); } @@ -56,7 +56,7 @@ public static void Remove(int id, EventData action) if (eventDict == null) return; if (eventDict.ContainsKey(id)) { - if (GlobalManager.Instance.IsDebugEvent) + if (GlobalManager.IsDebugEvent) { Debug.Log($"{Name.Sky()} 移除 => {action.Method.ToString().Yellow()} 事件"); } @@ -75,7 +75,7 @@ public static void Invoke(int id, params object[] value) if (eventDict == null) return; if (eventDict.ContainsKey(id)) { - if (GlobalManager.Instance.IsDebugEvent) + if (GlobalManager.IsDebugEvent) { Debug.Log($"{Name.Sky()} 触发 => {eventDict[id]?.Method.ToString().Yellow()} 事件"); } diff --git a/Runtime/Extensions/StringExtension.cs b/Runtime/Extensions/StringExtension.cs index aedf2197..408e57af 100644 --- a/Runtime/Extensions/StringExtension.cs +++ b/Runtime/Extensions/StringExtension.cs @@ -1,17 +1,56 @@ +// ReSharper disable All namespace JFramework { public static class StringExtension { + /// + /// 设置为绿色字符串 + /// public static string Green(this string s) => s.SetColor(TextColor.Green); + + /// + /// 设置为白色字符串 + /// public static string White(this string s) => s.SetColor(TextColor.White); + + /// + /// 设置为紫色字符串 + /// public static string Purple(this string s) => s.SetColor(TextColor.Purple); + + /// + /// 设置为黄色字符串 + /// public static string Yellow(this string s) => s.SetColor(TextColor.Yellow); + + /// + /// 设置为橙色字符串 + /// public static string Orange(this string s) => s.SetColor(TextColor.Orange); + + /// + /// 设置为粉色字符串 + /// public static string Pink(this string s) => s.SetColor(TextColor.Pink); + + /// + /// 设置为蓝色字符串 + /// public static string Blue(this string s) => s.SetColor(TextColor.Blue); + + /// + /// 设置为红色字符串 + /// public static string Red(this string s) => s.SetColor(TextColor.Red); + + /// + /// 设置为天蓝字符串 + /// public static string Sky(this string s) => s.SetColor(TextColor.Sky); + /// + /// 设置字符串颜色 + /// public static string SetColor(this string s, TextColor type) { return type switch diff --git a/Runtime/Extensions/UnityExtension.cs b/Runtime/Extensions/UnityExtension.cs index 191f69f5..2b197340 100644 --- a/Runtime/Extensions/UnityExtension.cs +++ b/Runtime/Extensions/UnityExtension.cs @@ -1,5 +1,4 @@ using System; -using UnityEngine; namespace JFramework { diff --git a/Runtime/FSM/State.cs b/Runtime/FSM/State.cs index 180aea3f..bc34cd14 100644 --- a/Runtime/FSM/State.cs +++ b/Runtime/FSM/State.cs @@ -1,3 +1,4 @@ +using System; using JFramework.Interface; namespace JFramework @@ -5,6 +6,7 @@ namespace JFramework /// /// 状态的抽象类 /// + [Serializable] public abstract class State : IState where TEntity : IEntity { /// @@ -25,7 +27,9 @@ private void OnAwake(TEntity owner) /// /// 状态初始化 /// - protected virtual void OnAwake() { } + protected virtual void OnAwake() + { + } /// /// 进入状态 diff --git a/Runtime/FSM/Machine.cs b/Runtime/FSM/StateMachine.cs similarity index 79% rename from Runtime/FSM/Machine.cs rename to Runtime/FSM/StateMachine.cs index 3bbd040d..40903833 100644 --- a/Runtime/FSM/Machine.cs +++ b/Runtime/FSM/StateMachine.cs @@ -5,9 +5,10 @@ using Sirenix.OdinInspector; using UnityEngine; +// ReSharper disable All namespace JFramework { - public class Machine : Controller where T : MonoBehaviour, IEntity + public abstract class StateMachine : Controller where T : MonoBehaviour, IEntity { /// /// 存储状态的字典 @@ -22,9 +23,10 @@ public class Machine : Controller where T : MonoBehaviour, IEntity protected IState state; /// - /// 状态机初始化 + /// 状态机启动 /// - protected override void Start() => stateDict = new Dictionary(); + /// 可传入任何继承IState的对象 + public void Enable() where TState : IState, new() => ChangeState(); /// /// 状态机更新 @@ -39,6 +41,7 @@ public class Machine : Controller where T : MonoBehaviour, IEntity public void AddState(IState state = null) where TState : IState, new() { var key = typeof(TState); + stateDict ??= new Dictionary(); if (stateDict.ContainsKey(key)) return; state ??= new TState(); stateDict.Add(key, state); @@ -65,5 +68,10 @@ public void ChangeState(float time) where TState : IState { TimerManager.Pop(time, ChangeState); } + + /// + /// 状态机禁用 + /// + public void Disable() => state = null; } } \ No newline at end of file diff --git a/Runtime/FSM/Machine.cs.meta b/Runtime/FSM/StateMachine.cs.meta similarity index 100% rename from Runtime/FSM/Machine.cs.meta rename to Runtime/FSM/StateMachine.cs.meta diff --git a/Runtime/Global/GlobalManager.cs b/Runtime/Global/GlobalManager.cs index 36373b1a..61a2993b 100644 --- a/Runtime/Global/GlobalManager.cs +++ b/Runtime/Global/GlobalManager.cs @@ -11,12 +11,6 @@ namespace JFramework.Core /// public sealed partial class GlobalManager : MonoBehaviour { - /// - /// 全局实体列表 - /// - [ShowInInspector, LabelText("实体管理数据"), FoldoutGroup("实体管理器"), ReadOnly] - private static List entityList; - /// /// 全局管理器名称 /// @@ -30,7 +24,7 @@ public sealed partial class GlobalManager : MonoBehaviour /// /// Update更新事件 /// - internal event Action UpdateAction; + internal event Action UpdateEvent; /// /// 全局管理器醒来 @@ -40,52 +34,31 @@ public sealed partial class GlobalManager : MonoBehaviour /// /// 全局Update更新 /// - private void Update() => UpdateAction?.Invoke(); + private void Update() => UpdateEvent?.Invoke(); /// /// 添加实体到管理器 /// /// 传入实体 - public void Listen(IEntity entity) - { - UpdateAction += entity.Update; - entityList.Add(entity); - } + public void Listen(IEntity entity) => UpdateEvent += entity.Update; /// /// 移除实体到管理器 /// /// 传入实体 - public void Remove(IEntity entity) - { - UpdateAction -= entity.Update; - entityList.Remove(entity); - } + public void Remove(IEntity entity) => UpdateEvent -= entity.Update; /// /// 设置全局单例 /// private static void Singleton() { - entityList = new List(); if (Instance != null) return; Instance = FindObjectOfType(); if (Instance != null) return; var obj = Resources.Load(Name); Instance = Instantiate(obj).GetComponent(); } - - /// - /// 从后台切换到前台 - /// - /// - private void OnApplicationPause(bool pauseStatus) - { - if (!pauseStatus) - { - EventManager.Invoke(DateSetting.OnDateChanged); - } - } /// /// 注册管理器 @@ -99,14 +72,14 @@ private static void Register() EventManager.Awake(); TimerManager.Awake(); JsonManager.Awake(); - DateManager.Awake(); + DailyManager.Awake(); AudioManager.Awake(); PoolManager.Awake(); SceneManager.Awake(); DataManager.Awake(); UIManager.Awake(); } - + /// /// 当程序退出 /// @@ -115,7 +88,7 @@ private void OnApplicationQuit() UIManager.Destroy(); PoolManager.Destroy(); DataManager.Destroy(); - DateManager.Destroy(); + DailyManager.Destroy(); JsonManager.Destroy(); SceneManager.Destroy(); TimerManager.Destroy(); @@ -124,8 +97,7 @@ private void OnApplicationQuit() EventManager.Destroy(); CommandManager.Destroy(); Instance = null; - entityList = null; - UpdateAction = null; + UpdateEvent = null; } } } \ No newline at end of file diff --git a/Runtime/Global/GlobalSetting.cs b/Runtime/Global/GlobalSetting.cs index c9000c68..a679f8cb 100644 --- a/Runtime/Global/GlobalSetting.cs +++ b/Runtime/Global/GlobalSetting.cs @@ -9,29 +9,41 @@ namespace JFramework.Core { public sealed partial class GlobalManager { - [ShowInInspector, LabelText("显示Json加载信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugJson; + [FoldoutGroup("设置管理器")] + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Json加载信息")] + private bool isDebugJson; - [ShowInInspector, LabelText("显示Pool存取信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugPool; + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Pool存取信息")] + private bool isDebugPool; - [ShowInInspector, LabelText("显示Data加载信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugData; + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Data加载信息")] + private bool isDebugData; - [ShowInInspector, LabelText("显示Asset加载信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugAsset; + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Asset加载信息")] + private bool isDebugAsset; - [ShowInInspector, LabelText("显示Event事件信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugEvent; + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Event事件信息")] + private bool isDebugEvent; - [ShowInInspector, LabelText("显示Scene加载信息"), FoldoutGroup("调试管理器")] - internal bool IsDebugScene; + [TabGroup("设置管理器/Setting", "Setting"), SerializeField, LabelText("显示Scene加载信息")] + private bool isDebugScene; + + [Required("请在此输入ChatGPT的密钥!")] + [TabGroup("设置管理器/Setting", "OpenAI"), SerializeField, LabelText("")] + internal string key = ""; - [ShowInInspector, LabelText("当前日期时间"), FoldoutGroup("日期管理器")] - private string dateTime => DateTime.Now.ToString("yyyy-M-d / hh:mm:ss"); + [TabGroup("设置管理器/Setting", "OpenAI"), SerializeField, LabelText("输入文本:"), TextArea(4,10)] + internal string chat = "获取地址: https://platform.openai.com/account/api-keys"; + + [Button("发送"), TabGroup("设置管理器/Setting", "OpenAI")] + public void SendRequest() => ChatGPT.SendData(); - [ShowInInspector, LabelText("下次刷新时间"), FoldoutGroup("日期管理器")] - private string refreshTime => DateManager.tomorrow.ToString("yyyy-M-d / hh:mm:ss"); + internal static bool IsDebugJson => Instance.isDebugJson; + internal static bool IsDebugPool => Instance.isDebugPool; + internal static bool IsDebugData => Instance.isDebugData; + internal static bool IsDebugAsset => Instance.isDebugAsset; + internal static bool IsDebugEvent => Instance.isDebugEvent; + internal static bool IsDebugScene => Instance.isDebugScene; [ShowInInspector, LabelText("场景管理数据"), FoldoutGroup("通用管理器")] private Dictionary sceneList => SceneManager.sceneDict; @@ -76,10 +88,10 @@ public sealed partial class GlobalManager private AudioSource audioSource => AudioManager.audioSource; [ShowInInspector, LabelText("背景音乐大小"), FoldoutGroup("音效管理器")] - private float soundVolume => AudioManager.SoundVolume; + private float soundVolume => AudioManager.soundVolume; [ShowInInspector, LabelText("游戏音乐大小"), FoldoutGroup("音效管理器")] - private float audioVolume => AudioManager.AudioVolume; + private float audioVolume => AudioManager.sudioVolume; [ShowInInspector, LabelText("完成音效队列"), FoldoutGroup("音效管理器")] private Queue audioQueue => AudioManager.audioQueue; diff --git a/Runtime/Json/JsonManager.cs b/Runtime/Json/JsonManager.cs index 04684351..6ef05ab0 100644 --- a/Runtime/Json/JsonManager.cs +++ b/Runtime/Json/JsonManager.cs @@ -46,7 +46,7 @@ public static void Save(object obj, string name, bool encrypt = false) return; } - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} 保存加密 => {name.Orange()} 数据文件"); } @@ -58,7 +58,7 @@ public static void Save(object obj, string name, bool encrypt = false) } else { - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson && name != Name) { Debug.Log($"{Name.Sky()} 保存 => {name.Orange()} 数据文件"); } @@ -89,7 +89,7 @@ public static void Load(ScriptableObject obj, bool decrypt = false) return; } - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} 读取解密 => {obj.name.Orange()} 数据文件"); } @@ -105,7 +105,7 @@ public static void Load(ScriptableObject obj, bool decrypt = false) } else { - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} 读取 => {Name.Orange()} 数据文件"); } @@ -140,7 +140,7 @@ public static void Load(ScriptableObject obj, bool decrypt = false) return default; } - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} 读取解密 => {name.Orange()} 数据文件"); } @@ -157,7 +157,7 @@ public static void Load(ScriptableObject obj, bool decrypt = false) } else { - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} 读取 => {name.Orange()} 数据文件"); } @@ -174,7 +174,7 @@ public static void Load(ScriptableObject obj, bool decrypt = false) /// public static void Clear() { - if (GlobalManager.Instance.IsDebugJson) + if (GlobalManager.IsDebugJson) { Debug.Log($"{Name.Sky()} <= Clear => {Name.Orange()}"); } diff --git a/Runtime/Json/JsonSetting.cs b/Runtime/Json/JsonSetting.cs index 3630fa5c..05a6a10b 100644 --- a/Runtime/Json/JsonSetting.cs +++ b/Runtime/Json/JsonSetting.cs @@ -50,9 +50,9 @@ public static byte[] Encrypt(string targetStr, byte[] key, byte[] iv) return memoryStream.ToArray(); } - catch (Exception) + catch (Exception e) { - Debug.LogWarning($"{nameof(JsonManager).Red()} 存档丢失 => 加密失败!"); + Debug.LogWarning($"{nameof(JsonManager).Red()} 存档丢失 => 加密失败!\n" + e); JsonManager.jsonDict = new Dictionary(); } @@ -79,9 +79,9 @@ public static string Decrypt(byte[] targetByte, byte[] key, byte[] iv) using StreamReader streamReader = new StreamReader(cryptoStream); return streamReader.ReadToEnd(); } - catch (Exception) + catch (Exception e) { - Debug.LogWarning($"{nameof(JsonManager).Red()} 存档丢失 => 解密失败!"); + Debug.LogWarning($"{nameof(JsonManager).Red()} 存档丢失 => 解密失败!\n" + e); JsonManager.jsonDict = new Dictionary(); } diff --git a/Runtime/Pool/PoolData.cs b/Runtime/Pool/PoolData.cs index 122ea43a..a0a71ded 100644 --- a/Runtime/Pool/PoolData.cs +++ b/Runtime/Pool/PoolData.cs @@ -59,7 +59,7 @@ protected override GameObject Pop() /// 推出的游戏物体 protected override void Push(GameObject obj) { - stack.Push(obj); + if (!stack.Contains(obj)) stack.Push(obj); if (pool != null) obj.transform.SetParent(pool.transform); obj.SetActive(false); } diff --git a/Runtime/Pool/PoolManager.cs b/Runtime/Pool/PoolManager.cs index 06002fa1..bd53a17b 100644 --- a/Runtime/Pool/PoolManager.cs +++ b/Runtime/Pool/PoolManager.cs @@ -47,9 +47,10 @@ public static void Pop(string key, Action action) if (poolDict.ContainsKey(key) && poolDict[key].Count > 0) { var obj = (GameObject)poolDict[key].Pop(); + if (obj != null) { - if (GlobalManager.Instance.IsDebugPool) + if (GlobalManager.IsDebugPool) { Debug.Log($"{Name.Sky()} 取出 => {key.Pink()} 对象成功"); } @@ -58,13 +59,13 @@ public static void Pop(string key, Action action) return; } - if (GlobalManager.Instance.IsDebugPool) + if (GlobalManager.IsDebugPool) { Debug.Log($"{Name.Sky()} 移除已销毁对象 : {key.Red()}"); } } - if (GlobalManager.Instance.IsDebugPool) + if (GlobalManager.IsDebugPool) { Debug.Log($"{Name.Sky()} 创建 => {key.Green()} 对象成功"); } @@ -100,16 +101,16 @@ public static void Push(GameObject obj) return; } - if (GlobalManager.Instance.IsDebugPool) + if (GlobalManager.IsDebugPool) { Debug.Log($"{Name.Sky()} 存入 => {key.Pink()} 对象成功"); } - + poolDict[key].Push(obj); } else { - if (GlobalManager.Instance.IsDebugPool) + if (GlobalManager.IsDebugPool) { Debug.Log($"{Name.Sky()} => 创建对象池 : {key.Green()}"); } diff --git a/Runtime/Scenes/SceneManager.cs b/Runtime/Scenes/SceneManager.cs index 87d005ab..e5a4b097 100644 --- a/Runtime/Scenes/SceneManager.cs +++ b/Runtime/Scenes/SceneManager.cs @@ -5,6 +5,7 @@ using UnityEngine.SceneManagement; using LoadManager = UnityEngine.SceneManagement.SceneManager; + namespace JFramework.Core { public static class SceneManager @@ -15,9 +16,9 @@ public static class SceneManager internal static Dictionary sceneDict; /// - /// 场景事件 + /// 场景加载事件(进度条) /// - public const int OnSceneChanged = 999; + public static event Action ProgressEvent; /// /// 场景加载进度条 @@ -48,7 +49,7 @@ private static float Progress /// /// 当前场景名称 /// - public static string Scene => LoadManager.GetActiveScene().name; + public static string name => LoadManager.GetActiveScene().name; /// /// 场景管理器初始化 @@ -60,8 +61,8 @@ internal static void Awake() { var path = SceneUtility.GetScenePathByBuildIndex(i); var data = path.Split('/'); - var name = data[^1]; - data = name.Split('.'); + var last = data[^1]; + data = last.Split('.'); sceneDict.Add(i, new SceneData() { Id = i, Name = data[0] }); } } @@ -78,7 +79,7 @@ public static void LoadScene(string name) return; } - if (GlobalManager.Instance.IsDebugScene) + if (GlobalManager.IsDebugScene) { Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 场景"); } @@ -99,7 +100,7 @@ public static void LoadSceneAsync(string name, Action action) return; } - if (GlobalManager.Instance.IsDebugScene) + if (GlobalManager.IsDebugScene) { Debug.Log($"{Name.Sky()} 异步加载 => {name.Green()} 场景"); } @@ -124,9 +125,9 @@ private static IEnumerator LoadSceneCompleted(string name, Action action) while (Progress < 0.99f) { Progress = Mathf.Lerp(Progress, asyncOperation.progress / 9f * 10f, Time.fixedDeltaTime * 2); - EventManager.Invoke(OnSceneChanged, Progress); + ProgressEvent?.Invoke(Progress); - if (GlobalManager.Instance.IsDebugScene) + if (GlobalManager.IsDebugScene) { Debug.Log($"{Name.Sky()} 加载进度 => {Progress.ToString("P").Green()}"); } @@ -140,7 +141,7 @@ private static IEnumerator LoadSceneCompleted(string name, Action action) action?.Invoke(); - if (GlobalManager.Instance.IsDebugScene) + if (GlobalManager.IsDebugScene) { currentTime = Time.time - currentTime; Debug.Log($"{Name.Sky()} 加载 => {name.Green()} 场景完成, 耗时 {currentTime.ToString("F").Yellow()} 秒"); diff --git a/Runtime/Singleton/AssetSingleton.cs b/Runtime/Singleton/AssetSingleton.cs index 5fa7f8c7..0ed8b9f7 100644 --- a/Runtime/Singleton/AssetSingleton.cs +++ b/Runtime/Singleton/AssetSingleton.cs @@ -1,17 +1,15 @@ using System.IO; using UnityEngine; using JFramework.Core; -#if UNITY_EDITOR -using UnityEditor; -#endif +using Sirenix.Utilities; namespace JFramework { /// - /// 单例模式对象 + /// 基于ScriptableObject的单例对象 /// /// 所属的单例对象 - public abstract class AssetSingleton : ScriptableObject where T : AssetSingleton + public class AssetSingleton : ScriptableObject where T : AssetSingleton { /// /// 所属单例对象 @@ -28,7 +26,7 @@ public static T Instance if (instance != null) return instance; #if UNITY_EDITOR var name = $"Assets/Editor/{typeof(T).Name}.asset"; - instance = AssetDatabase.LoadAssetAtPath(name); + instance = UnityEditor.AssetDatabase.LoadAssetAtPath(name); if (instance != null) return instance; instance = CreateInstance(); if (!Directory.Exists("Assets/Editor")) @@ -36,8 +34,8 @@ public static T Instance Directory.CreateDirectory("Assets/Editor"); } - AssetDatabase.CreateAsset(instance, name); - AssetDatabase.Refresh(); + UnityEditor.AssetDatabase.CreateAsset(instance, name); + UnityEditor.AssetDatabase.Refresh(); #else instance = AssetManager.Load("Settings/"+typeof(T).Name); if (instance == null) diff --git a/Runtime/Singleton/MonoSingleton.cs b/Runtime/Singleton/MonoSingleton.cs index 9c0cb87f..26371447 100644 --- a/Runtime/Singleton/MonoSingleton.cs +++ b/Runtime/Singleton/MonoSingleton.cs @@ -1,3 +1,5 @@ +using JFramework.Interface; + namespace JFramework { /// @@ -34,13 +36,13 @@ protected virtual void Awake() instance = (T)this; } } - + + /// /// 释放时将单例置空 /// - protected override void OnDestroy() + public override void Despawn() { - base.OnDestroy(); instance = null; } } diff --git a/Runtime/Timer/Timer.cs b/Runtime/Timer/Timer.cs index bac5757b..ad046aca 100644 --- a/Runtime/Timer/Timer.cs +++ b/Runtime/Timer/Timer.cs @@ -26,21 +26,26 @@ internal class Timer : ITimer /// private float keepTime; + /// + /// 当前时间+持续时间 + /// + private float waitTime; + /// /// 是否受TimeScale影响 /// - [ShowInInspector] private bool unscaled; - + private bool unscaled; + /// - /// 当前时间+持续时间 + /// 计时器的所有者 /// - [ShowInInspector] private float waitTime; + [ShowInInspector] private object target => OnFinish.Target; /// /// 计时器的状态 /// [ShowInInspector] private TimerState state; - + /// /// 循环时执行的事件 /// @@ -85,9 +90,9 @@ private void OnUpdate(float time) OnFinish?.Invoke(); TimerManager.Push(this); } - catch (Exception) + catch (Exception e) { - Debug.Log($"{nameof(TimerManager).Sky()} => 停止正在运行的计时器"); + Debug.Log($"{nameof(TimerManager).Sky()} => 停止计时器\n" + e); TimerManager.Push(this); } } diff --git a/Runtime/Timer/TimerManager.cs b/Runtime/Timer/TimerManager.cs index e55819c5..7f6eb5af 100644 --- a/Runtime/Timer/TimerManager.cs +++ b/Runtime/Timer/TimerManager.cs @@ -19,7 +19,7 @@ public static class TimerManager /// 存储正在执行的计时器 /// internal static List timerList; - + /// /// 计时器管理名称 /// @@ -32,7 +32,7 @@ internal static void Awake() { timerQueue = new Queue(); timerList = new List(); - GlobalManager.Instance.UpdateAction += OnUpdate; + GlobalManager.Instance.UpdateEvent += OnUpdate; } /// diff --git a/Runtime/Timer/TimerState.cs b/Runtime/Timer/TimerState.cs index a42eaf83..feb552ca 100644 --- a/Runtime/Timer/TimerState.cs +++ b/Runtime/Timer/TimerState.cs @@ -1,3 +1,5 @@ +using Sirenix.OdinInspector; + namespace JFramework { /// @@ -8,16 +10,16 @@ internal enum TimerState /// /// 运行状态 /// - Run = 0, + [LabelText("运行")] Run = 0, /// /// 暂停状态 /// - Stop = 1, + [LabelText("停止")] Stop = 1, /// /// 完成状态 /// - Finish = 2, + [LabelText("完成")] Finish = 2, } } \ No newline at end of file diff --git a/Runtime/UI/UIHideType.cs b/Runtime/UI/UIHideType.cs index 2376f48f..3c2ca565 100644 --- a/Runtime/UI/UIHideType.cs +++ b/Runtime/UI/UIHideType.cs @@ -5,18 +5,21 @@ namespace JFramework public enum UIHideType { /// - /// 移除并销毁 + /// HidePanel => 移除并销毁 + /// Clear => 移除并销毁 /// - [LabelText("移除并销毁")] Destroy, + [LabelText("移除并销毁")] Destroy = 0, /// - /// 移除不销毁 + /// HidePanel => 移除不销毁 + /// Clear => 移除并销毁 /// - [LabelText("移除不销毁")] Remove, + [LabelText("仅隐藏")] Remove = 1, /// - /// 无视移除操作 + /// HidePanel => 不移除不销毁 + /// Clear => 不移除不销毁 /// - [LabelText("忽视移除")] Ignore, + [LabelText("忽视移除")] Ignore = 2, } } \ No newline at end of file diff --git a/Runtime/UI/UIManager.cs b/Runtime/UI/UIManager.cs index d1bc0164..336aa4c9 100644 --- a/Runtime/UI/UIManager.cs +++ b/Runtime/UI/UIManager.cs @@ -6,6 +6,7 @@ using UnityEngine.EventSystems; using Object = UnityEngine.Object; +// ReSharper disable All namespace JFramework.Core { /// @@ -93,11 +94,11 @@ public static void ShowPanel(Action action = null) where T : UIPanel LoadPanel(key.Name, action); } + /// /// UI管理器隐藏UI面板 /// - /// 可以使用所有继承IPanel的对象 public static void HidePanel() where T : UIPanel { if (panelDict == null) @@ -128,29 +129,20 @@ public static void HidePanel() where T : UIPanel /// /// 可以使用所有继承IPanel的对象 /// 返回获取到的UI面板 - public static T GetPanel() where T : UIPanel - { - if (panelDict == null) - { - Debug.Log($"{Name.Red()} 没有初始化"); - return null; - } + public static T GetPanel() where T : UIPanel => (T)GetPanel(typeof(T)); - var key = typeof(T); - if (panelDict.ContainsKey(key)) - { - return (T)panelDict?[key]; - } - - return null; - } + /// + /// UI管理器得到UI面板 + /// + /// 返回获取到的UI面板 + public static UIPanel GetPanel(Type key) => panelDict.ContainsKey(key) ? panelDict?[key] : null; /// /// UI管理器得到层级 /// /// 层级的类型 /// 返回得到的层级 - public static Transform GetLayer(UILayerType layer) => panelDict != null ? layerGroup[layer.As()] : null; + public static Transform GetLayer(UILayerType layer) => panelDict != null ? layerGroup[(int)layer] : null; /// /// UI管理器侦听UI面板事件 @@ -158,21 +150,17 @@ public static T GetPanel() where T : UIPanel /// 传入的UI对象 /// 事件触发类型 /// 事件触发后的回调 - public static void Listen(Component target, EventTriggerType type, UnityAction action) + public static void Listen(Component target, EventTriggerType type, UnityAction action) where T : BaseEventData { var trigger = target.GetComponent(); - if (trigger == null) - { - trigger = target.gameObject.AddComponent(); - } - + if (trigger == null) trigger = target.gameObject.AddComponent(); var entry = new EventTrigger.Entry { eventID = type }; - entry.callback.AddListener(action); + entry.callback.AddListener(eventData => action?.Invoke((T)eventData)); trigger.triggers.Add(entry); } /// - /// UI管理器清除所有面板 + /// UI管理器清除可销毁的面板 /// public static void Clear() { @@ -182,7 +170,7 @@ public static void Clear() return; } - foreach (var key in panelDict.Keys.ToList().Where(key => panelDict.ContainsKey(key) && panelDict[key].hideType != UIHideType.Ignore)) + foreach (var key in panelDict.Keys.Where(key => panelDict.ContainsKey(key) && panelDict[key].hideType != UIHideType.Ignore)) { Object.Destroy(panelDict[key].gameObject); panelDict.Remove(key); diff --git a/Runtime/UI/UIPanel.cs b/Runtime/UI/UIPanel.cs index 64d0cd42..8d5e5e29 100644 --- a/Runtime/UI/UIPanel.cs +++ b/Runtime/UI/UIPanel.cs @@ -7,7 +7,7 @@ namespace JFramework { - using Container = Dictionary; + using Component = Dictionary; /// /// UI面板的抽象类 @@ -17,7 +17,7 @@ public abstract class UIPanel : Entity /// /// 视觉容器字典 /// - [ShowInInspector, LabelText("视觉元素")] private Dictionary containerDict; + [ShowInInspector, LabelText("视觉元素")] private Dictionary componentDict; /// /// UI隐藏类型 @@ -29,7 +29,7 @@ public abstract class UIPanel : Entity /// protected virtual void Awake() { - containerDict = new Dictionary(); + componentDict = new Dictionary(); FindComponent(); FindComponent(); FindComponent