From 3ebed1c11369fea85baebe0107a725ecdb097189 Mon Sep 17 00:00:00 2001 From: NoahLan <6995syu@163.com> Date: Wed, 24 Jan 2024 16:01:05 +0800 Subject: [PATCH] first commit --- .gitignore | 12 + Editor Resources.meta | 3 + Editor Resources/icon_cube.png | Bin 0 -> 302 bytes Editor Resources/icon_cube.png.meta | 140 +++ Editor Resources/icon_delete.png | Bin 0 -> 352 bytes Editor Resources/icon_delete.png.meta | 140 +++ Editor Resources/icon_pencil.png | Bin 0 -> 307 bytes Editor Resources/icon_pencil.png.meta | 140 +++ Samples.meta | 3 + Samples/EventManager.meta | 3 + Samples/EventManager/TestSubscribeEvent.cs | 28 + .../EventManager/TestSubscribeEvent.cs.meta | 3 + Samples/EventManager/TestTriggerEvent.cs | 13 + Samples/EventManager/TestTriggerEvent.cs.meta | 3 + Samples/Singleton.meta | 3 + Samples/Singleton/TestInvokeSingleton.cs | 12 + Samples/Singleton/TestInvokeSingleton.cs.meta | 3 + Samples/Singleton/TestSingleton.cs | 12 + Samples/Singleton/TestSingleton.cs.meta | 3 + Samples/UpdateManager.meta | 3 + Samples/UpdateManager/TestFollowTarget.cs | 33 + .../UpdateManager/TestFollowTarget.cs.meta | 3 + Scenes.meta | 8 + Scenes/SampleScene.unity | 998 ++++++++++++++++++ Scenes/SampleScene.unity.meta | 7 + Scripts.meta | 8 + Scripts/Editor.meta | 8 + Scripts/Editor/Singleton.meta | 3 + .../Singleton/LanLib.Singleton.Editor.asmdef | 18 + .../LanLib.Singleton.Editor.asmdef.meta | 3 + .../Singleton/SingletonEditorManager.cs | 147 +++ .../Singleton/SingletonEditorManager.cs.meta | 3 + Scripts/Editor/Singleton/SingletonWindow.cs | 103 ++ .../Editor/Singleton/SingletonWindow.cs.meta | 3 + Scripts/Editor/Singleton/UI.meta | 3 + .../Editor/Singleton/UI/SingletonElement.uxml | 10 + .../Singleton/UI/SingletonElement.uxml.meta | 10 + .../Editor/Singleton/UI/SingletonStyles.uss | 3 + .../Singleton/UI/SingletonStyles.uss.meta | 11 + .../Editor/Singleton/UI/SingletonWindow.uxml | 3 + .../Singleton/UI/SingletonWindow.uxml.meta | 10 + Scripts/Runtime.meta | 8 + Scripts/Runtime/EventManager.meta | 3 + Scripts/Runtime/EventManager/ErrorMessages.cs | 17 + .../EventManager/ErrorMessages.cs.meta | 3 + Scripts/Runtime/EventManager/EventManager.cs | 66 ++ .../Runtime/EventManager/EventManager.cs.meta | 3 + .../EventManager/IClearableEventManager.cs | 11 + .../IClearableEventManager.cs.meta | 3 + Scripts/Runtime/EventManager/IEventManager.cs | 11 + .../EventManager/IEventManager.cs.meta | 3 + .../EventManager/IResettableEventManager.cs | 10 + .../IResettableEventManager.cs.meta | 3 + .../EventManager/ISubscribableEventManager.cs | 21 + .../ISubscribableEventManager.cs.meta | 3 + .../EventManager/ITriggerableEventManager.cs | 12 + .../ITriggerableEventManager.cs.meta | 3 + .../EventManager/LanLib.EventManager.asmdef | 16 + .../LanLib.EventManager.asmdef.meta | 3 + Scripts/Runtime/Singleton.meta | 3 + .../Runtime/Singleton/LanLib.Singleton.asmdef | 14 + .../Singleton/LanLib.Singleton.asmdef.meta | 3 + Scripts/Runtime/Singleton/README.md | 83 ++ Scripts/Runtime/Singleton/README.md.meta | 7 + Scripts/Runtime/Singleton/Singleton.cs | 118 +++ Scripts/Runtime/Singleton/Singleton.cs.meta | 3 + .../Singleton/SingletonAutoLoadAttribute.cs | 18 + .../SingletonAutoLoadAttribute.cs.meta | 3 + Scripts/Runtime/Singleton/SingletonModes.cs | 61 ++ .../Runtime/Singleton/SingletonModes.cs.meta | 3 + Scripts/Runtime/UpdateManager.meta | 3 + .../UpdateManager/AManagedBehaviour.cs | 26 + .../UpdateManager/AManagedBehaviour.cs.meta | 3 + .../UpdateManager/AUpdateManagerBehaviour.cs | 32 + .../AUpdateManagerBehaviour.cs.meta | 3 + .../Runtime/UpdateManager/ApplicationUtils.cs | 22 + .../UpdateManager/ApplicationUtils.cs.meta | 3 + Scripts/Runtime/UpdateManager/Extensions.meta | 3 + .../Extensions/ListExtensions.cs | 29 + .../Extensions/ListExtensions.cs.meta | 3 + .../Extensions/NativeArrayExtensions.cs | 16 + .../Extensions/NativeArrayExtensions.cs.meta | 3 + .../TransformAccessArrayExtensions.cs | 15 + .../TransformAccessArrayExtensions.cs.meta | 3 + .../Extensions/TypeExtensions.cs | 24 + .../Extensions/TypeExtensions.cs.meta | 3 + .../Runtime/UpdateManager/IFixedUpdatable.cs | 14 + .../UpdateManager/IFixedUpdatable.cs.meta | 3 + .../Runtime/UpdateManager/ILateUpdatable.cs | 14 + .../UpdateManager/ILateUpdatable.cs.meta | 3 + .../Runtime/UpdateManager/IManagedObject.cs | 28 + .../UpdateManager/IManagedObject.cs.meta | 3 + Scripts/Runtime/UpdateManager/IUpdatable.cs | 14 + .../Runtime/UpdateManager/IUpdatable.cs.meta | 3 + Scripts/Runtime/UpdateManager/Internal.meta | 3 + .../UpdateManager/Internal/FastRemoveList.cs | 144 +++ .../Internal/FastRemoveList.cs.meta | 3 + .../Internal/ProfilerMarkerMap.cs | 35 + .../Internal/ProfilerMarkerMap.cs.meta | 3 + .../UpdateManager/Internal/SortedList.cs | 81 ++ .../UpdateManager/Internal/SortedList.cs.meta | 3 + Scripts/Runtime/UpdateManager/Jobs.meta | 3 + .../UpdateManager/Jobs/DependsOnAttribute.cs | 45 + .../Jobs/DependsOnAttribute.cs.meta | 3 + .../Jobs/IJobDataSynchronizer.cs | 20 + .../Jobs/IJobDataSynchronizer.cs.meta | 3 + .../UpdateManager/Jobs/IJobUpdatable.cs | 100 ++ .../UpdateManager/Jobs/IJobUpdatable.cs.meta | 3 + .../Jobs/ITransformJobUpdatable.cs | 100 ++ .../Jobs/ITransformJobUpdatable.cs.meta | 3 + .../Runtime/UpdateManager/Jobs/IUpdateJob.cs | 24 + .../UpdateManager/Jobs/IUpdateJob.cs.meta | 3 + .../UpdateManager/Jobs/IUpdateTransformJob.cs | 25 + .../Jobs/IUpdateTransformJob.cs.meta | 3 + .../Runtime/UpdateManager/Jobs/Internal.meta | 3 + .../Jobs/Internal/AUpdateJobManager.cs | 364 +++++++ .../Jobs/Internal/AUpdateJobManager.cs.meta | 3 + .../Jobs/Internal/IInitialJobDataProvider.cs | 7 + .../Internal/IInitialJobDataProvider.cs.meta | 3 + .../IInitialTransformJobDataProvider.cs | 9 + .../IInitialTransformJobDataProvider.cs.meta | 3 + .../Jobs/Internal/IInternalUpdateJob.cs | 14 + .../Jobs/Internal/IInternalUpdateJob.cs.meta | 3 + .../Internal/IInternalUpdateTransformJob.cs | 14 + .../IInternalUpdateTransformJob.cs.meta | 3 + .../Jobs/Internal/IJobManager.cs | 10 + .../Jobs/Internal/IJobManager.cs.meta | 3 + .../Jobs/Internal/UnsafeNativeList.cs | 127 +++ .../Jobs/Internal/UnsafeNativeList.cs.meta | 3 + .../Jobs/Internal/UpdateJobData.cs | 53 + .../Jobs/Internal/UpdateJobData.cs.meta | 3 + .../Jobs/Internal/UpdateJobOptions.cs | 91 ++ .../Jobs/Internal/UpdateJobOptions.cs.meta | 3 + .../Jobs/Internal/UpdateTransformJobData.cs | 41 + .../Internal/UpdateTransformJobData.cs.meta | 3 + .../Jobs/JobBatchSizeAttribute.cs | 24 + .../Jobs/JobBatchSizeAttribute.cs.meta | 3 + .../Jobs/ReadOnlyTransformAccessAttribute.cs | 16 + .../ReadOnlyTransformAccessAttribute.cs.meta | 3 + .../Runtime/UpdateManager/Jobs/UpdateJob.cs | 29 + .../UpdateManager/Jobs/UpdateJob.cs.meta | 3 + .../UpdateManager/Jobs/UpdateJobManager.cs | 47 + .../Jobs/UpdateJobManager.cs.meta | 3 + .../Jobs/UpdateJobOptionsAttribute.cs | 12 + .../Jobs/UpdateJobOptionsAttribute.cs.meta | 3 + .../UpdateManager/Jobs/UpdateJobTime.cs | 63 ++ .../UpdateManager/Jobs/UpdateJobTime.cs.meta | 3 + .../UpdateManager/Jobs/UpdateTransformJob.cs | 30 + .../Jobs/UpdateTransformJob.cs.meta | 3 + .../Jobs/UpdateTransformJobManager.cs | 53 + .../Jobs/UpdateTransformJobManager.cs.meta | 3 + .../UpdateManager/LanLib.UpdateManager.asmdef | 22 + .../LanLib.UpdateManager.asmdef.meta | 3 + .../Runtime/UpdateManager/UpdateManager.cs | 194 ++++ .../UpdateManager/UpdateManager.cs.meta | 3 + UnityDefaultRuntimeTheme.tss.meta | 11 + package.json | 20 + package.json.meta | 3 + 158 files changed, 4631 insertions(+) create mode 100644 .gitignore create mode 100644 Editor Resources.meta create mode 100644 Editor Resources/icon_cube.png create mode 100644 Editor Resources/icon_cube.png.meta create mode 100644 Editor Resources/icon_delete.png create mode 100644 Editor Resources/icon_delete.png.meta create mode 100644 Editor Resources/icon_pencil.png create mode 100644 Editor Resources/icon_pencil.png.meta create mode 100644 Samples.meta create mode 100644 Samples/EventManager.meta create mode 100644 Samples/EventManager/TestSubscribeEvent.cs create mode 100644 Samples/EventManager/TestSubscribeEvent.cs.meta create mode 100644 Samples/EventManager/TestTriggerEvent.cs create mode 100644 Samples/EventManager/TestTriggerEvent.cs.meta create mode 100644 Samples/Singleton.meta create mode 100644 Samples/Singleton/TestInvokeSingleton.cs create mode 100644 Samples/Singleton/TestInvokeSingleton.cs.meta create mode 100644 Samples/Singleton/TestSingleton.cs create mode 100644 Samples/Singleton/TestSingleton.cs.meta create mode 100644 Samples/UpdateManager.meta create mode 100644 Samples/UpdateManager/TestFollowTarget.cs create mode 100644 Samples/UpdateManager/TestFollowTarget.cs.meta create mode 100644 Scenes.meta create mode 100644 Scenes/SampleScene.unity create mode 100644 Scenes/SampleScene.unity.meta create mode 100644 Scripts.meta create mode 100644 Scripts/Editor.meta create mode 100644 Scripts/Editor/Singleton.meta create mode 100644 Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef create mode 100644 Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef.meta create mode 100644 Scripts/Editor/Singleton/SingletonEditorManager.cs create mode 100644 Scripts/Editor/Singleton/SingletonEditorManager.cs.meta create mode 100644 Scripts/Editor/Singleton/SingletonWindow.cs create mode 100644 Scripts/Editor/Singleton/SingletonWindow.cs.meta create mode 100644 Scripts/Editor/Singleton/UI.meta create mode 100644 Scripts/Editor/Singleton/UI/SingletonElement.uxml create mode 100644 Scripts/Editor/Singleton/UI/SingletonElement.uxml.meta create mode 100644 Scripts/Editor/Singleton/UI/SingletonStyles.uss create mode 100644 Scripts/Editor/Singleton/UI/SingletonStyles.uss.meta create mode 100644 Scripts/Editor/Singleton/UI/SingletonWindow.uxml create mode 100644 Scripts/Editor/Singleton/UI/SingletonWindow.uxml.meta create mode 100644 Scripts/Runtime.meta create mode 100644 Scripts/Runtime/EventManager.meta create mode 100644 Scripts/Runtime/EventManager/ErrorMessages.cs create mode 100644 Scripts/Runtime/EventManager/ErrorMessages.cs.meta create mode 100644 Scripts/Runtime/EventManager/EventManager.cs create mode 100644 Scripts/Runtime/EventManager/EventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/IClearableEventManager.cs create mode 100644 Scripts/Runtime/EventManager/IClearableEventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/IEventManager.cs create mode 100644 Scripts/Runtime/EventManager/IEventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/IResettableEventManager.cs create mode 100644 Scripts/Runtime/EventManager/IResettableEventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/ISubscribableEventManager.cs create mode 100644 Scripts/Runtime/EventManager/ISubscribableEventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/ITriggerableEventManager.cs create mode 100644 Scripts/Runtime/EventManager/ITriggerableEventManager.cs.meta create mode 100644 Scripts/Runtime/EventManager/LanLib.EventManager.asmdef create mode 100644 Scripts/Runtime/EventManager/LanLib.EventManager.asmdef.meta create mode 100644 Scripts/Runtime/Singleton.meta create mode 100644 Scripts/Runtime/Singleton/LanLib.Singleton.asmdef create mode 100644 Scripts/Runtime/Singleton/LanLib.Singleton.asmdef.meta create mode 100644 Scripts/Runtime/Singleton/README.md create mode 100644 Scripts/Runtime/Singleton/README.md.meta create mode 100644 Scripts/Runtime/Singleton/Singleton.cs create mode 100644 Scripts/Runtime/Singleton/Singleton.cs.meta create mode 100644 Scripts/Runtime/Singleton/SingletonAutoLoadAttribute.cs create mode 100644 Scripts/Runtime/Singleton/SingletonAutoLoadAttribute.cs.meta create mode 100644 Scripts/Runtime/Singleton/SingletonModes.cs create mode 100644 Scripts/Runtime/Singleton/SingletonModes.cs.meta create mode 100644 Scripts/Runtime/UpdateManager.meta create mode 100644 Scripts/Runtime/UpdateManager/AManagedBehaviour.cs create mode 100644 Scripts/Runtime/UpdateManager/AManagedBehaviour.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/AUpdateManagerBehaviour.cs create mode 100644 Scripts/Runtime/UpdateManager/AUpdateManagerBehaviour.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/ApplicationUtils.cs create mode 100644 Scripts/Runtime/UpdateManager/ApplicationUtils.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Extensions.meta create mode 100644 Scripts/Runtime/UpdateManager/Extensions/ListExtensions.cs create mode 100644 Scripts/Runtime/UpdateManager/Extensions/ListExtensions.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Extensions/NativeArrayExtensions.cs create mode 100644 Scripts/Runtime/UpdateManager/Extensions/NativeArrayExtensions.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Extensions/TransformAccessArrayExtensions.cs create mode 100644 Scripts/Runtime/UpdateManager/Extensions/TransformAccessArrayExtensions.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Extensions/TypeExtensions.cs create mode 100644 Scripts/Runtime/UpdateManager/Extensions/TypeExtensions.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/IFixedUpdatable.cs create mode 100644 Scripts/Runtime/UpdateManager/IFixedUpdatable.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/ILateUpdatable.cs create mode 100644 Scripts/Runtime/UpdateManager/ILateUpdatable.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/IManagedObject.cs create mode 100644 Scripts/Runtime/UpdateManager/IManagedObject.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/IUpdatable.cs create mode 100644 Scripts/Runtime/UpdateManager/IUpdatable.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Internal.meta create mode 100644 Scripts/Runtime/UpdateManager/Internal/FastRemoveList.cs create mode 100644 Scripts/Runtime/UpdateManager/Internal/FastRemoveList.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Internal/ProfilerMarkerMap.cs create mode 100644 Scripts/Runtime/UpdateManager/Internal/ProfilerMarkerMap.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Internal/SortedList.cs create mode 100644 Scripts/Runtime/UpdateManager/Internal/SortedList.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/DependsOnAttribute.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/DependsOnAttribute.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IJobDataSynchronizer.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IJobDataSynchronizer.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IJobUpdatable.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IJobUpdatable.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/ITransformJobUpdatable.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/ITransformJobUpdatable.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IUpdateJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IUpdateJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IUpdateTransformJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/IUpdateTransformJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/AUpdateJobManager.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/AUpdateJobManager.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInitialJobDataProvider.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInitialJobDataProvider.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInitialTransformJobDataProvider.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInitialTransformJobDataProvider.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInternalUpdateJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInternalUpdateJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInternalUpdateTransformJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IInternalUpdateTransformJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IJobManager.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/IJobManager.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UnsafeNativeList.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UnsafeNativeList.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateJobData.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateJobData.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateJobOptions.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateJobOptions.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateTransformJobData.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/Internal/UpdateTransformJobData.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/JobBatchSizeAttribute.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/JobBatchSizeAttribute.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/ReadOnlyTransformAccessAttribute.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/ReadOnlyTransformAccessAttribute.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobManager.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobManager.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobOptionsAttribute.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobOptionsAttribute.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobTime.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateJobTime.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateTransformJob.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateTransformJob.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateTransformJobManager.cs create mode 100644 Scripts/Runtime/UpdateManager/Jobs/UpdateTransformJobManager.cs.meta create mode 100644 Scripts/Runtime/UpdateManager/LanLib.UpdateManager.asmdef create mode 100644 Scripts/Runtime/UpdateManager/LanLib.UpdateManager.asmdef.meta create mode 100644 Scripts/Runtime/UpdateManager/UpdateManager.cs create mode 100644 Scripts/Runtime/UpdateManager/UpdateManager.cs.meta create mode 100644 UnityDefaultRuntimeTheme.tss.meta create mode 100644 package.json create mode 100644 package.json.meta diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d0a9a8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +TextMesh Pro.meta +TextMesh Pro + +*.tss + +Library +Logs +obj + +ProjectSettings +Temp +UserSettings diff --git a/Editor Resources.meta b/Editor Resources.meta new file mode 100644 index 0000000..f6416af --- /dev/null +++ b/Editor Resources.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: be73703fd634493a802aa566748c4ad7 +timeCreated: 1706068125 \ No newline at end of file diff --git a/Editor Resources/icon_cube.png b/Editor Resources/icon_cube.png new file mode 100644 index 0000000000000000000000000000000000000000..846af869165354f53a1c59990032da7dc51df79c GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp@K+Mm<1|;p3UCV(KV{wqX6T`Z5GB1G~mSQK*5Dp-y z;YjHK@^5&$IEH9U?47ii_mF`=>-k2N{*2fs v=S1A(s`q_SQWyJq=Z<8-ws^bFm`Qet@AWiYv{TD~eq``;^>bP0l+XkKzsPP7 literal 0 HcmV?d00001 diff --git a/Editor Resources/icon_cube.png.meta b/Editor Resources/icon_cube.png.meta new file mode 100644 index 0000000..5a5f241 --- /dev/null +++ b/Editor Resources/icon_cube.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: fcda1fbb0f0fbc34fbdeb59390ceab77 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor Resources/icon_delete.png b/Editor Resources/icon_delete.png new file mode 100644 index 0000000000000000000000000000000000000000..20af62988742a00ab1f978530284c3f0a247ea63 GIT binary patch literal 352 zcmV-m0iXVfP)Px#1am@3R0s$N2z&@+hyVZq3Q0skR5*>blrc`jKoCXWSfNV^61f2fpx_7;DJXIP zu0TOWOTiH+IY1~lN6IvGDF7)F=_rCkq(^~cIU75~HvDF_fBrnpuC0X~Qb+34A5GQK zuKaJHDqXaJP4ebj^;o^j_mjGwo_YqHRMbxM^#wQwW@}%)tjIry`T_JCkG`$X47diy z9YJH@Dge|&;JpLvC?XcI-l<lluPR}Szl5cC)(Q635?1v6+cDdIfMSU9PnyDp>Z)w0H^8uNvPi-<9V;RVMwZl? y-rL4$QrKfd*i&sq?W+&!vgXNNYnkUZ-obB_3%6-8rUdE$0000|)&9fWE9gCa0FSu^l z?G$^&aUpxb4{H-v(P*Dn56t(r?2*@3nUvn3If0q;!uL|IoO9WF_cRP172gS5z|C@C z8b?+0LCQk-RA1kx@EL22WQ%mvv4FO#pHL BbvXb4 literal 0 HcmV?d00001 diff --git a/Editor Resources/icon_pencil.png.meta b/Editor Resources/icon_pencil.png.meta new file mode 100644 index 0000000..9e2e5b9 --- /dev/null +++ b/Editor Resources/icon_pencil.png.meta @@ -0,0 +1,140 @@ +fileFormatVersion: 2 +guid: 3782841ccd5a3c74daa021cca43aeb5e +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 12 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Server + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Samples.meta b/Samples.meta new file mode 100644 index 0000000..1788265 --- /dev/null +++ b/Samples.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 6dea77c2a1ae4f8191bb160dedae9698 +timeCreated: 1706072392 \ No newline at end of file diff --git a/Samples/EventManager.meta b/Samples/EventManager.meta new file mode 100644 index 0000000..e0521ce --- /dev/null +++ b/Samples/EventManager.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 999c9af62a23403d8fa73c48186331eb +timeCreated: 1706078264 \ No newline at end of file diff --git a/Samples/EventManager/TestSubscribeEvent.cs b/Samples/EventManager/TestSubscribeEvent.cs new file mode 100644 index 0000000..5bda25a --- /dev/null +++ b/Samples/EventManager/TestSubscribeEvent.cs @@ -0,0 +1,28 @@ +using System; +using UnityEngine; +using EVM = LanLib.EventManager; + +namespace Samples.EventManager +{ + public struct TestEvent + { + } + + public class TestSubscribeEvent : MonoBehaviour + { + private void Awake() + { + EVM.EventManager.Instance.Subscribe(OnTest); + } + + private void OnDestroy() + { + EVM.EventManager.Instance.Unsubscribe(OnTest); + } + + private void OnTest(TestEvent evt) + { + print("TestEvent trigger!!!"); + } + } +} \ No newline at end of file diff --git a/Samples/EventManager/TestSubscribeEvent.cs.meta b/Samples/EventManager/TestSubscribeEvent.cs.meta new file mode 100644 index 0000000..a5ddb1d --- /dev/null +++ b/Samples/EventManager/TestSubscribeEvent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b05de2395e1c417999ed736f88328f7e +timeCreated: 1706078287 \ No newline at end of file diff --git a/Samples/EventManager/TestTriggerEvent.cs b/Samples/EventManager/TestTriggerEvent.cs new file mode 100644 index 0000000..3ca92d7 --- /dev/null +++ b/Samples/EventManager/TestTriggerEvent.cs @@ -0,0 +1,13 @@ +using UnityEngine; +using EVM = LanLib.EventManager; + +namespace Samples.EventManager +{ + public class TestTriggerEvent : MonoBehaviour + { + public void TriggerTestEvent() + { + EVM.EventManager.Instance.TriggerEvent(new TestEvent()); + } + } +} \ No newline at end of file diff --git a/Samples/EventManager/TestTriggerEvent.cs.meta b/Samples/EventManager/TestTriggerEvent.cs.meta new file mode 100644 index 0000000..95911c2 --- /dev/null +++ b/Samples/EventManager/TestTriggerEvent.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7d0eaab3f34c46f99c55ceb0ac3a5a10 +timeCreated: 1706078443 \ No newline at end of file diff --git a/Samples/Singleton.meta b/Samples/Singleton.meta new file mode 100644 index 0000000..c236494 --- /dev/null +++ b/Samples/Singleton.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0fa287cc7edd40bfaf62f5b2c85f7ab4 +timeCreated: 1706078223 \ No newline at end of file diff --git a/Samples/Singleton/TestInvokeSingleton.cs b/Samples/Singleton/TestInvokeSingleton.cs new file mode 100644 index 0000000..2d49199 --- /dev/null +++ b/Samples/Singleton/TestInvokeSingleton.cs @@ -0,0 +1,12 @@ +using UnityEngine; + +namespace Samples.Singleton +{ + public class TestInvokeSingleton : MonoBehaviour + { + private void Start() + { + Test.Instance.SayHello(); + } + } +} \ No newline at end of file diff --git a/Samples/Singleton/TestInvokeSingleton.cs.meta b/Samples/Singleton/TestInvokeSingleton.cs.meta new file mode 100644 index 0000000..b5b7361 --- /dev/null +++ b/Samples/Singleton/TestInvokeSingleton.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: cf4ef1e6e942495abea0a35afe666d29 +timeCreated: 1706077670 \ No newline at end of file diff --git a/Samples/Singleton/TestSingleton.cs b/Samples/Singleton/TestSingleton.cs new file mode 100644 index 0000000..ae69221 --- /dev/null +++ b/Samples/Singleton/TestSingleton.cs @@ -0,0 +1,12 @@ +using LanLib.Singleton; + +namespace Samples.Singleton +{ + public class Test : Singleton + { + public void SayHello() + { + print("hello world"); + } + } +} \ No newline at end of file diff --git a/Samples/Singleton/TestSingleton.cs.meta b/Samples/Singleton/TestSingleton.cs.meta new file mode 100644 index 0000000..117174c --- /dev/null +++ b/Samples/Singleton/TestSingleton.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: c92b5e87a29a478fb5e5cbd1392995b3 +timeCreated: 1706072406 \ No newline at end of file diff --git a/Samples/UpdateManager.meta b/Samples/UpdateManager.meta new file mode 100644 index 0000000..7b4781e --- /dev/null +++ b/Samples/UpdateManager.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a3a9e9657ac442bbb6b9d7344cd5548d +timeCreated: 1706081266 \ No newline at end of file diff --git a/Samples/UpdateManager/TestFollowTarget.cs b/Samples/UpdateManager/TestFollowTarget.cs new file mode 100644 index 0000000..a09a17f --- /dev/null +++ b/Samples/UpdateManager/TestFollowTarget.cs @@ -0,0 +1,33 @@ +using LanLib.UpdateManager; +using UnityEngine; + +namespace Samples.UpdateManager +{ + public class TestFollowTarget : AManagedBehaviour, IUpdatable + { + [SerializeField] private Camera camera; + + private void Awake() + { + if (!camera) + { + camera = Camera.main; + } + } + + public void ManagedUpdate() + { + if (!Input.GetMouseButton(0)) + { + return; + } + + var ray = camera.ScreenPointToRay(Input.mousePosition); + var xz = new Plane(transform.up * 10, transform.position); + if (xz.Raycast(ray, out float z)) + { + transform.position = ray.GetPoint(z); + } + } + } +} \ No newline at end of file diff --git a/Samples/UpdateManager/TestFollowTarget.cs.meta b/Samples/UpdateManager/TestFollowTarget.cs.meta new file mode 100644 index 0000000..a7823b7 --- /dev/null +++ b/Samples/UpdateManager/TestFollowTarget.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4d371b37033144c0a654d2d4de3409b4 +timeCreated: 1706081361 \ No newline at end of file diff --git a/Scenes.meta b/Scenes.meta new file mode 100644 index 0000000..9b4a1a0 --- /dev/null +++ b/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: daed5a3ce25c0a04e99b527f5f96ff92 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scenes/SampleScene.unity b/Scenes/SampleScene.unity new file mode 100644 index 0000000..4c73aeb --- /dev/null +++ b/Scenes/SampleScene.unity @@ -0,0 +1,998 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 705507994} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 500 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 2 + m_PVRDenoiserTypeDirect: 0 + m_PVRDenoiserTypeIndirect: 0 + m_PVRDenoiserTypeAO: 0 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 3 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + buildHeightMesh: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &120179636 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 120179637} + - component: {fileID: 120179639} + - component: {fileID: 120179638} + m_Layer: 5 + m_Name: Text (TMP) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &120179637 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 120179636} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1288773903} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &120179638 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 120179636} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: Trigger Test Event + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4281479730 + m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 24 + m_fontSizeBase: 24 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 0 + m_fontSizeMax: 0 + m_fontStyle: 0 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 512 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 0 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 0 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!222 &120179639 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 120179636} + m_CullTransparentMesh: 1 +--- !u!1 &705507993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705507995} + - component: {fileID: 705507994} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &705507994 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 1 + m_Shape: 0 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &705507995 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705507993} + serializedVersion: 2 + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &870642445 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 870642447} + - component: {fileID: 870642446} + m_Layer: 0 + m_Name: InvokeSingleton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &870642446 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 870642445} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cf4ef1e6e942495abea0a35afe666d29, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &870642447 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 870642445} + serializedVersion: 2 + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1604846115} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &963194225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 963194228} + - component: {fileID: 963194227} + - component: {fileID: 963194226} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &963194226 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 +--- !u!20 &963194227 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_GateFitMode: 2 + m_FOVAxisMode: 0 + m_Iso: 200 + m_ShutterSpeed: 0.005 + m_Aperture: 16 + m_FocusDistance: 10 + m_FocalLength: 50 + m_BladeCount: 5 + m_Curvature: {x: 2, y: 11} + m_BarrelClipping: 0.25 + m_Anamorphism: 0 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &963194228 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 963194225} + serializedVersion: 2 + m_LocalRotation: {x: 0.38268343, y: 0, z: 0, w: 0.92387956} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!1 &1288773902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1288773903} + - component: {fileID: 1288773907} + - component: {fileID: 1288773906} + - component: {fileID: 1288773905} + - component: {fileID: 1288773904} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1288773903 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1288773902} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 120179637} + m_Father: {fileID: 1307116728} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 24.7505, y: 0} + m_SizeDelta: {x: 209.5011, y: 30} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1288773904 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1288773902} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7d0eaab3f34c46f99c55ceb0ac3a5a10, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &1288773905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1288773902} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1288773906} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1288773904} + m_TargetAssemblyTypeName: Samples.EventManager.TestTriggerEvent, Assembly-CSharp + m_MethodName: TriggerTestEvent + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1288773906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1288773902} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1288773907 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1288773902} + m_CullTransparentMesh: 1 +--- !u!1 &1307116724 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1307116728} + - component: {fileID: 1307116727} + - component: {fileID: 1307116726} + - component: {fileID: 1307116725} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1307116725 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307116724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &1307116726 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307116724} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 0 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 800, y: 600} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &1307116727 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307116724} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 0 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!224 &1307116728 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1307116724} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1288773903} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} +--- !u!1 &1344531107 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1344531110} + - component: {fileID: 1344531109} + - component: {fileID: 1344531108} + m_Layer: 0 + m_Name: EventSystem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1344531108 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1344531107} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} + m_Name: + m_EditorClassIdentifier: + m_SendPointerHoverToParent: 1 + m_HorizontalAxis: Horizontal + m_VerticalAxis: Vertical + m_SubmitButton: Submit + m_CancelButton: Cancel + m_InputActionsPerSecond: 10 + m_RepeatDelay: 0.5 + m_ForceModuleActive: 0 +--- !u!114 &1344531109 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1344531107} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} + m_Name: + m_EditorClassIdentifier: + m_FirstSelected: {fileID: 0} + m_sendNavigationEvents: 1 + m_DragThreshold: 10 +--- !u!4 &1344531110 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1344531107} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1476468604 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1476468605} + - component: {fileID: 1476468609} + - component: {fileID: 1476468608} + - component: {fileID: 1476468607} + - component: {fileID: 1476468606} + m_Layer: 0 + m_Name: TestFollowTarget + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1476468605 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476468604} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1990798249} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &1476468606 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476468604} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4d371b37033144c0a654d2d4de3409b4, type: 3} + m_Name: + m_EditorClassIdentifier: + camera: {fileID: 963194227} +--- !u!65 &1476468607 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476468604} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1476468608 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476468604} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!33 &1476468609 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1476468604} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1604846114 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1604846115} + m_Layer: 0 + m_Name: Singleton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1604846115 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1604846114} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 870642447} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1990798248 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1990798249} + m_Layer: 0 + m_Name: UpdateManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1990798249 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1990798248} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 1476468605} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1660057539 &9223372036854775807 +SceneRoots: + m_ObjectHideFlags: 0 + m_Roots: + - {fileID: 963194228} + - {fileID: 705507995} + - {fileID: 1307116728} + - {fileID: 1344531110} + - {fileID: 1604846115} + - {fileID: 1990798249} diff --git a/Scenes/SampleScene.unity.meta b/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000..952bd1e --- /dev/null +++ b/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9fc0d4010bbf28b4594072e72b8655ab +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts.meta b/Scripts.meta new file mode 100644 index 0000000..ad1a5b4 --- /dev/null +++ b/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 799f75a2cbfb8194a8876015b0294ab7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Editor.meta b/Scripts/Editor.meta new file mode 100644 index 0000000..cdbb8bc --- /dev/null +++ b/Scripts/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0548a9c043447784ab1f8d22c1de045a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/Editor/Singleton.meta b/Scripts/Editor/Singleton.meta new file mode 100644 index 0000000..5faa192 --- /dev/null +++ b/Scripts/Editor/Singleton.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: d176007cce4b49e89161b849ea495afe +timeCreated: 1706066595 \ No newline at end of file diff --git a/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef b/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef new file mode 100644 index 0000000..7d433df --- /dev/null +++ b/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef @@ -0,0 +1,18 @@ +{ + "name": "LanLib.Singleton.Editor", + "rootNamespace": "", + "references": [ + "LanLib.Singleton" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef.meta b/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef.meta new file mode 100644 index 0000000..b9239cb --- /dev/null +++ b/Scripts/Editor/Singleton/LanLib.Singleton.Editor.asmdef.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 33a22ae5db3b4773b599a297794f9b82 +timeCreated: 1706067071 \ No newline at end of file diff --git a/Scripts/Editor/Singleton/SingletonEditorManager.cs b/Scripts/Editor/Singleton/SingletonEditorManager.cs new file mode 100644 index 0000000..c3f6cb7 --- /dev/null +++ b/Scripts/Editor/Singleton/SingletonEditorManager.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using UnityEditor; +using UnityEngine; +using Object = UnityEngine.Object; + +namespace LanLib.Singleton.EditorUtilities +{ + static class SingletonManager + { + private static Dictionary _lutSingletonCreation = null; + + static void DestroyGameObject(GameObject go) + { + if (Application.isPlaying) + { + Object.Destroy(go); + } + else + { + Object.DestroyImmediate(go); + } + } + + static void RemoveAllSingletons(Func predicate) + { + if (Selection.activeGameObject?.GetComponent()) + { + Selection.activeGameObject = null; + } + + var instances = Resources + .FindObjectsOfTypeAll() + .Where(predicate) + .ToArray(); + foreach (var inst in instances) + { + DestroyGameObject(inst.gameObject); + } + } + + static Dictionary GetSingletonTypes() + { + if (_lutSingletonCreation != null) return _lutSingletonCreation; + var baseType = typeof(SingletonAutoLoadAttribute); + var thisAssemblyName = baseType.Assembly.GetName().ToString(); + return _lutSingletonCreation = AppDomain.CurrentDomain.GetAssemblies() + .Where(assembly + => assembly.GetReferencedAssemblies().Any(r => r.ToString() == thisAssemblyName) + && assembly.GetName().ToString() != thisAssemblyName) + .SelectMany(assembly + => assembly.GetCustomAttributes(false).OfType()) + .Select(att => (att.type, att.createCondition)) + .ToDictionary(d => d.type, d => d.createCondition); + } + + [InitializeOnLoadMethod] +#if !UNITY_EDITOR + [RuntimeInitializeOnLoadMethod] +#endif + static void AutoCreateOnDomainReload() + { + foreach (var (t, con) in GetSingletonTypes()) + { + if (con.Contains(SingletonCreateCondition.ReloadDomain)) + { + t.BaseType.GetProperty("Instance", bindingFlags).GetValue(null); + } + } + } + + [InitializeOnLoadMethod] + static void AutoCreateOnEnterPlayMode() + { + EditorApplication.playModeStateChanged += e => + { + if (e == PlayModeStateChange.EnteredPlayMode) + { + foreach (var (t, con) in GetSingletonTypes()) + { + if (con.Contains(SingletonCreateCondition.EnterPlay)) + { + t.BaseType.GetProperty("Instance", bindingFlags).GetValue(null); + } + } + } + }; + } + + [InitializeOnLoadMethod] + static void CleanOnRecompileIfNeeded() + { + RemoveAllSingletons(inst => inst.shouldDestroyOnReloadDomain()); + } + + [InitializeOnLoadMethod] + static void CleanOnPlayModeChangeIfNeeded() + { + EditorApplication.playModeStateChanged += e => + { + if (e == PlayModeStateChange.ExitingPlayMode) + { + RemoveAllSingletons(inst => inst.shouldDestroyOnExitPlayMode()); + } + else if (e == PlayModeStateChange.ExitingEditMode) + { + RemoveAllSingletons(inst => inst.shouldDestroyOnExitEditMode()); + } + else if (e == PlayModeStateChange.EnteredPlayMode) + { + var instances = Resources + .FindObjectsOfTypeAll() + .ToArray(); + foreach (var inst in instances) + { + inst.DestroyOnSceneUnload = inst.DestroyOnSceneUnload; + } + } + }; + } + + + static bool shouldDestroyOnReloadDomain(this SingletonBase singleton) + { + var t = singleton.GetType(); + var isAutoCreate = GetSingletonTypes().ContainsKey(t) + && GetSingletonTypes()[t].Contains(SingletonCreateCondition.ReloadDomain); + return singleton.DestroyCondition.Contains(SingletonDestroyCondition.ReloadDomain) + && !isAutoCreate; + } + + static bool shouldDestroyOnExitPlayMode(this SingletonBase singleton) + => singleton.DestroyCondition.Contains(SingletonDestroyCondition.ExitPlay); + + static bool shouldDestroyOnExitEditMode(this SingletonBase singleton) + => singleton.DestroyCondition.Contains(SingletonDestroyCondition.ExitEdit); + + static BindingFlags bindingFlags = 0 + | BindingFlags.Static + // | BindingFlags.Instance + | BindingFlags.Public + // | BindingFlags.NonPublic + ; + } +} \ No newline at end of file diff --git a/Scripts/Editor/Singleton/SingletonEditorManager.cs.meta b/Scripts/Editor/Singleton/SingletonEditorManager.cs.meta new file mode 100644 index 0000000..291e8c4 --- /dev/null +++ b/Scripts/Editor/Singleton/SingletonEditorManager.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 50a964d0c08146eb886818b2a76c1adc +timeCreated: 1706066898 \ No newline at end of file diff --git a/Scripts/Editor/Singleton/SingletonWindow.cs b/Scripts/Editor/Singleton/SingletonWindow.cs new file mode 100644 index 0000000..2bdd349 --- /dev/null +++ b/Scripts/Editor/Singleton/SingletonWindow.cs @@ -0,0 +1,103 @@ +using System; +using System.Linq; +using UnityEditor; +using UnityEditor.UIElements; +using UnityEngine; +using UnityEngine.UIElements; + +namespace LanLib.Singleton.EditorUtilities +{ + public class SingletonWindow : EditorWindow + { + const int SourceUpdateInterval = 100; + const string UIRootGuid = "f019694f4240ea24281a93f5aab2f756"; + const string UIElementGuid = "a33c335b67caf3e41af9c2753dcbb734"; + + [MenuItem("Tools/LanLib/Singletons")] + private static void ShowWindow() + { + var window = GetWindow(); + window.titleContent = new GUIContent("Singletons"); + window.Show(); + } + + private void CreateGUI() + { + var uiRootAsset = GetVisualTreeAssetByGUID(UIRootGuid); + var uiElementAsset = GetVisualTreeAssetByGUID(UIElementGuid); + uiRootAsset.CloneTree(rootVisualElement); + var lst = rootVisualElement.Q("lst"); + (lst.makeItem, lst.bindItem) = BindItem(); + rootVisualElement.schedule.Execute(UpdateSource).Every(SourceUpdateInterval); + + (Func, Action) BindItem() + { + // GameObject gameObject = null; + // Label txtName = null; + // VisualElement btnInspect = null; + // VisualElement btnDestroy = null; + // MaskField mask = null; + return (OnCreate, OnBind); + + VisualElement OnCreate() + { + var ele = uiElementAsset.CloneTree(); + var txtName = ele.Q