com.elestrago.unity.entitas-redux 3.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +354 -0
- package/CHANGELOG.md.meta +7 -0
- package/Docs/EntitasReduxAPI.chm +0 -0
- package/Docs/EntitasReduxAPI.chm.meta +7 -0
- package/Docs/Images/portrait.png +0 -0
- package/Docs/Images/portrait.png.meta +91 -0
- package/Docs/Images/social_share_image.png +0 -0
- package/Docs/Images/social_share_image.png.meta +91 -0
- package/Docs/Images.meta +8 -0
- package/Docs.meta +8 -0
- package/LICENSE.md +21 -0
- package/LICENSE.md.meta +7 -0
- package/Licenses/LICENSE.txt +21 -0
- package/Licenses/LICENSE.txt.meta +7 -0
- package/Licenses/SCHMID_LICENSE.txt +22 -0
- package/Licenses/SCHMID_LICENSE.txt.meta +7 -0
- package/Licenses.meta +8 -0
- package/Plugins/EntitasRedux.Command.Generator.dll +0 -0
- package/Plugins/EntitasRedux.Command.Generator.dll.meta +89 -0
- package/Plugins/EntitasRedux.Core.Generator.dll +0 -0
- package/Plugins/EntitasRedux.Core.Generator.dll.meta +89 -0
- package/Plugins/EntitasRedux.Core.Libs.dll +0 -0
- package/Plugins/EntitasRedux.Core.Libs.dll.meta +75 -0
- package/Plugins/EntitasRedux.Core.dll +0 -0
- package/Plugins/EntitasRedux.Core.dll.meta +75 -0
- package/Plugins.meta +8 -0
- package/README.md +106 -0
- package/README.md.meta +7 -0
- package/Scripts/AssemblyInfo.cs +39 -0
- package/Scripts/AssemblyInfo.cs.meta +11 -0
- package/Scripts/Blueprints/AssemblyInfo.cs +39 -0
- package/Scripts/Blueprints/AssemblyInfo.cs.meta +11 -0
- package/Scripts/Blueprints/BlueprintBase.cs +66 -0
- package/Scripts/Blueprints/BlueprintBase.cs.meta +11 -0
- package/Scripts/Blueprints/BlueprintBehaviourBase.cs +63 -0
- package/Scripts/Blueprints/BlueprintBehaviourBase.cs.meta +11 -0
- package/Scripts/Blueprints/Editor/AssemblyInfo.cs +35 -0
- package/Scripts/Blueprints/Editor/AssemblyInfo.cs.meta +11 -0
- package/Scripts/Blueprints/Editor/BlueprintBaseInspector.cs +67 -0
- package/Scripts/Blueprints/Editor/BlueprintBaseInspector.cs.meta +11 -0
- package/Scripts/Blueprints/Editor/BlueprintBehaviourBaseInspector.cs +67 -0
- package/Scripts/Blueprints/Editor/BlueprintBehaviourBaseInspector.cs.meta +11 -0
- package/Scripts/Blueprints/Editor/BlueprintInspector.cs +268 -0
- package/Scripts/Blueprints/Editor/BlueprintInspector.cs.meta +11 -0
- package/Scripts/Blueprints/Editor/EntitasRedux.Blueprints.Editor.asmdef +20 -0
- package/Scripts/Blueprints/Editor/EntitasRedux.Blueprints.Editor.asmdef.meta +7 -0
- package/Scripts/Blueprints/Editor.meta +8 -0
- package/Scripts/Blueprints/EntitasRedux.Blueprints.asmdef +15 -0
- package/Scripts/Blueprints/EntitasRedux.Blueprints.asmdef.meta +7 -0
- package/Scripts/Blueprints.meta +8 -0
- package/Scripts/Core/Utils/UnsubscribeEvent.cs +20 -0
- package/Scripts/Core/Utils/UnsubscribeEvent.cs.meta +3 -0
- package/Scripts/Core/Utils/UnsubscribeEventExtensions.cs +13 -0
- package/Scripts/Core/Utils/UnsubscribeEventExtensions.cs.meta +3 -0
- package/Scripts/Core/Utils.meta +3 -0
- package/Scripts/Core/View/IEntityHashHolder.cs +7 -0
- package/Scripts/Core/View/IEntityHashHolder.cs.meta +3 -0
- package/Scripts/Core/View/ILinkable.cs +9 -0
- package/Scripts/Core/View/ILinkable.cs.meta +3 -0
- package/Scripts/Core/View/Impls/EntityHashHolder.cs +11 -0
- package/Scripts/Core/View/Impls/EntityHashHolder.cs.meta +3 -0
- package/Scripts/Core/View/Impls/LinkableView.Editor.cs +41 -0
- package/Scripts/Core/View/Impls/LinkableView.Editor.cs.meta +3 -0
- package/Scripts/Core/View/Impls/LinkableView.cs +99 -0
- package/Scripts/Core/View/Impls/LinkableView.cs.meta +3 -0
- package/Scripts/Core/View/Impls.meta +3 -0
- package/Scripts/Core/View.meta +3 -0
- package/Scripts/Core.meta +8 -0
- package/Scripts/Editor/AssemblyInfo.cs +39 -0
- package/Scripts/Editor/AssemblyInfo.cs.meta +11 -0
- package/Scripts/Editor/CreateScriptMenuItems.cs +89 -0
- package/Scripts/Editor/CreateScriptMenuItems.cs.meta +11 -0
- package/Scripts/Editor/EntitasRedux.Editor.asmdef +18 -0
- package/Scripts/Editor/EntitasRedux.Editor.asmdef.meta +7 -0
- package/Scripts/Editor/EntitasReduxStyles.cs +65 -0
- package/Scripts/Editor/EntitasReduxStyles.cs.meta +11 -0
- package/Scripts/Editor/Extensions/ColorExtensions.cs +50 -0
- package/Scripts/Editor/Extensions/ColorExtensions.cs.meta +11 -0
- package/Scripts/Editor/Extensions/PublicMemberInfoExtensions.cs +60 -0
- package/Scripts/Editor/Extensions/PublicMemberInfoExtensions.cs.meta +11 -0
- package/Scripts/Editor/Extensions/SerializationTypeExtensions.cs +124 -0
- package/Scripts/Editor/Extensions/SerializationTypeExtensions.cs.meta +11 -0
- package/Scripts/Editor/Extensions/StringExtensions.cs +141 -0
- package/Scripts/Editor/Extensions/StringExtensions.cs.meta +11 -0
- package/Scripts/Editor/Extensions/TypeExtensions.cs +216 -0
- package/Scripts/Editor/Extensions/TypeExtensions.cs.meta +11 -0
- package/Scripts/Editor/Extensions.meta +8 -0
- package/Scripts/Editor/Images/EntitasContextErrorHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasContextErrorHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasContextHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasContextHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasEntityErrorHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasEntityErrorHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasEntityHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasEntityHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasEntityLinkHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasEntityLinkHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasEntityLinkWarnHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasEntityLinkWarnHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasHeader.png +0 -0
- package/Scripts/Editor/Images/EntitasHeader.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasSystemsHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasSystemsHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images/EntitasSystemsWarnHierarchyIcon.png +0 -0
- package/Scripts/Editor/Images/EntitasSystemsWarnHierarchyIcon.png.meta +93 -0
- package/Scripts/Editor/Images.meta +8 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/DefaultArrayCreator.cs +43 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/DefaultArrayCreator.cs.meta +11 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/DefaultStringCreator.cs +42 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/DefaultStringCreator.cs.meta +11 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/IDefaultInstanceCreator.cs +36 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator/IDefaultInstanceCreator.cs.meta +11 -0
- package/Scripts/Editor/Inspector/DefaultInstanceCreator.meta +8 -0
- package/Scripts/Editor/Inspector/Entity/EntityDrawer.cs +927 -0
- package/Scripts/Editor/Inspector/Entity/EntityDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/Entity/EntityInspector.cs +57 -0
- package/Scripts/Editor/Inspector/Entity/EntityInspector.cs.meta +11 -0
- package/Scripts/Editor/Inspector/Entity.meta +8 -0
- package/Scripts/Editor/Inspector/IComponentDrawer.cs +36 -0
- package/Scripts/Editor/Inspector/IComponentDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/AnimationCurveTypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/AnimationCurveTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ArrayTypeDrawer.cs +282 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ArrayTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/BoolTypeDrawer.cs +43 -0
- package/Scripts/Editor/Inspector/TypeDrawer/BoolTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/BoundsTypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/BoundsTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/CharTypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/CharTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ColorTypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ColorTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DateTimeTypeDrawer.cs +49 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DateTimeTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DictionaryTypeDrawer.cs +131 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DictionaryTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DoubleTypeDrawer.cs +43 -0
- package/Scripts/Editor/Inspector/TypeDrawer/DoubleTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/EnumTypeDrawer.cs +48 -0
- package/Scripts/Editor/Inspector/TypeDrawer/EnumTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/FloatTypeDrawer.cs +43 -0
- package/Scripts/Editor/Inspector/TypeDrawer/FloatTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/HashSetTypeDrawer.cs +124 -0
- package/Scripts/Editor/Inspector/TypeDrawer/HashSetTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ITypeDrawer.cs +36 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ITypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/IntTypeDrawer.cs +43 -0
- package/Scripts/Editor/Inspector/TypeDrawer/IntTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ListTypeDrawer.cs +163 -0
- package/Scripts/Editor/Inspector/TypeDrawer/ListTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/RectTypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/RectTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/StringTypeDrawer.cs +43 -0
- package/Scripts/Editor/Inspector/TypeDrawer/StringTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/UnityObjectTypeDrawer.cs +49 -0
- package/Scripts/Editor/Inspector/TypeDrawer/UnityObjectTypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector2TypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector2TypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector3TypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector3TypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector4TypeDrawer.cs +44 -0
- package/Scripts/Editor/Inspector/TypeDrawer/Vector4TypeDrawer.cs.meta +11 -0
- package/Scripts/Editor/Inspector/TypeDrawer.meta +8 -0
- package/Scripts/Editor/Inspector.meta +8 -0
- package/Scripts/Editor/MenuItems.cs +84 -0
- package/Scripts/Editor/MenuItems.cs.meta +11 -0
- package/Scripts/Editor/PlayModeHelper.cs +75 -0
- package/Scripts/Editor/PlayModeHelper.cs.meta +11 -0
- package/Scripts/Editor/Reflection/AttributeInfo.cs +44 -0
- package/Scripts/Editor/Reflection/AttributeInfo.cs.meta +11 -0
- package/Scripts/Editor/Reflection/PublicMemberInfo.cs +95 -0
- package/Scripts/Editor/Reflection/PublicMemberInfo.cs.meta +11 -0
- package/Scripts/Editor/Reflection.meta +8 -0
- package/Scripts/Editor/ScriptTemplates/CleanupSystem.txt +15 -0
- package/Scripts/Editor/ScriptTemplates/CleanupSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/Component.txt +9 -0
- package/Scripts/Editor/ScriptTemplates/Component.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/FixedUpdateSystem.txt +15 -0
- package/Scripts/Editor/ScriptTemplates/FixedUpdateSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/InitializeSystem.txt +15 -0
- package/Scripts/Editor/ScriptTemplates/InitializeSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/LateUpdateSystem.txt +15 -0
- package/Scripts/Editor/ScriptTemplates/LateUpdateSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/ReactiveSystem.txt +39 -0
- package/Scripts/Editor/ScriptTemplates/ReactiveSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates/UpdateSystem.txt +15 -0
- package/Scripts/Editor/ScriptTemplates/UpdateSystem.txt.meta +7 -0
- package/Scripts/Editor/ScriptTemplates.meta +8 -0
- package/Scripts/Editor/Tools/ColorTools.cs +59 -0
- package/Scripts/Editor/Tools/ColorTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/EditorGUILayoutTools.cs +242 -0
- package/Scripts/Editor/Tools/EditorGUILayoutTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/PlayerSettingsTools.cs +144 -0
- package/Scripts/Editor/Tools/PlayerSettingsTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/PreferenceTools.cs +116 -0
- package/Scripts/Editor/Tools/PreferenceTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/RefactorModeTools.cs +85 -0
- package/Scripts/Editor/Tools/RefactorModeTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/ReflectionTools.cs +33 -0
- package/Scripts/Editor/Tools/ReflectionTools.cs.meta +3 -0
- package/Scripts/Editor/Tools/ScriptTools.cs +117 -0
- package/Scripts/Editor/Tools/ScriptTools.cs.meta +11 -0
- package/Scripts/Editor/Tools/SerializationTools.cs +91 -0
- package/Scripts/Editor/Tools/SerializationTools.cs.meta +11 -0
- package/Scripts/Editor/Tools.meta +8 -0
- package/Scripts/Editor/Window/AboutWindow.cs +153 -0
- package/Scripts/Editor/Window/AboutWindow.cs.meta +14 -0
- package/Scripts/Editor/Window.meta +8 -0
- package/Scripts/Editor.meta +8 -0
- package/Scripts/EntitasRedux.asmdef +13 -0
- package/Scripts/EntitasRedux.asmdef.meta +7 -0
- package/Scripts/Entity/EntityBehaviour.cs +82 -0
- package/Scripts/Entity/EntityBehaviour.cs.meta +11 -0
- package/Scripts/Entity.meta +8 -0
- package/Scripts/EntityLink.cs +85 -0
- package/Scripts/EntityLink.cs.meta +11 -0
- package/Scripts/Extensions/EntityLinkExtension.cs +52 -0
- package/Scripts/Extensions/EntityLinkExtension.cs.meta +11 -0
- package/Scripts/Extensions.meta +8 -0
- package/Scripts/VersionConstants.cs +58 -0
- package/Scripts/VersionConstants.cs.meta +11 -0
- package/Scripts/VisualDebugging/AssemblyInfo.cs +39 -0
- package/Scripts/VisualDebugging/AssemblyInfo.cs.meta +11 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserver.cs +107 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserver.cs.meta +11 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserverBehaviour.cs +60 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserverBehaviour.cs.meta +11 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserverExtension.cs +47 -0
- package/Scripts/VisualDebugging/ContextObserver/ContextObserverExtension.cs.meta +11 -0
- package/Scripts/VisualDebugging/ContextObserver.meta +8 -0
- package/Scripts/VisualDebugging/DebugSystems/AvgResetInterval.cs +37 -0
- package/Scripts/VisualDebugging/DebugSystems/AvgResetInterval.cs.meta +11 -0
- package/Scripts/VisualDebugging/DebugSystems/DebugSystems.cs +477 -0
- package/Scripts/VisualDebugging/DebugSystems/DebugSystems.cs.meta +11 -0
- package/Scripts/VisualDebugging/DebugSystems/DebugSystemsBehaviour.cs +41 -0
- package/Scripts/VisualDebugging/DebugSystems/DebugSystemsBehaviour.cs.meta +11 -0
- package/Scripts/VisualDebugging/DebugSystems/SystemInfo.cs +347 -0
- package/Scripts/VisualDebugging/DebugSystems/SystemInfo.cs.meta +11 -0
- package/Scripts/VisualDebugging/DebugSystems.meta +8 -0
- package/Scripts/VisualDebugging/Editor/AssemblyInfo.cs +35 -0
- package/Scripts/VisualDebugging/Editor/AssemblyInfo.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/ContextObserver/ContextObserverInspector.cs +104 -0
- package/Scripts/VisualDebugging/Editor/ContextObserver/ContextObserverInspector.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/ContextObserver.meta +8 -0
- package/Scripts/VisualDebugging/Editor/DebugSystems/DebugSystemsBehaviourInspector.cs +709 -0
- package/Scripts/VisualDebugging/Editor/DebugSystems/DebugSystemsBehaviourInspector.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/DebugSystems.meta +8 -0
- package/Scripts/VisualDebugging/Editor/EntitasHierarchyIcon.cs +226 -0
- package/Scripts/VisualDebugging/Editor/EntitasHierarchyIcon.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/EntitasRedux.VisualDebugging.Editor.asmdef +21 -0
- package/Scripts/VisualDebugging/Editor/EntitasRedux.VisualDebugging.Editor.asmdef.meta +7 -0
- package/Scripts/VisualDebugging/Editor/EntitasStats.cs +131 -0
- package/Scripts/VisualDebugging/Editor/EntitasStats.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/EntityLinkInspector.cs +71 -0
- package/Scripts/VisualDebugging/Editor/EntityLinkInspector.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/Graph.cs +234 -0
- package/Scripts/VisualDebugging/Editor/Graph.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/VisualDebugStyles.cs +55 -0
- package/Scripts/VisualDebugging/Editor/VisualDebugStyles.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/VisualDebuggingEntitasExtension.cs +35 -0
- package/Scripts/VisualDebugging/Editor/VisualDebuggingEntitasExtension.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor/VisualDebuggingPreferences.cs +188 -0
- package/Scripts/VisualDebugging/Editor/VisualDebuggingPreferences.cs.meta +11 -0
- package/Scripts/VisualDebugging/Editor.meta +8 -0
- package/Scripts/VisualDebugging/EntitasRedux.VisualDebugging.asmdef +18 -0
- package/Scripts/VisualDebugging/EntitasRedux.VisualDebugging.asmdef.meta +7 -0
- package/Scripts/VisualDebugging/Extensions/GameObjectDestroyExtensions.cs +44 -0
- package/Scripts/VisualDebugging/Extensions/GameObjectDestroyExtensions.cs.meta +11 -0
- package/Scripts/VisualDebugging/Extensions.meta +8 -0
- package/Scripts/VisualDebugging.meta +8 -0
- package/Scripts.meta +8 -0
- package/package.json +30 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2020 Jeff Campbell
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
using System.Reflection;
|
|
27
|
+
|
|
28
|
+
[assembly: AssemblyCompany("Jeff Campbell")]
|
|
29
|
+
[assembly: AssemblyFileVersion("2.1.0")]
|
|
30
|
+
[assembly: AssemblyInformationalVersion("2.1.0+7.Branch.develop.Sha.21ee36e5c2bfc83d5c03aa0da164adbc40f7b20e")]
|
|
31
|
+
[assembly: AssemblyProduct("EntitasRedux.Blueprints.Editor")]
|
|
32
|
+
[assembly: AssemblyTitle("EntitasRedux.Blueprints.Editor")]
|
|
33
|
+
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/jeffcampbellmakesgames/Entitas-Redux.git")]
|
|
34
|
+
|
|
35
|
+
[assembly: AssemblyVersion("2.1.0")]
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2020 Jeff Campbell
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
using UnityEditor;
|
|
27
|
+
|
|
28
|
+
namespace JCMG.EntitasRedux.Blueprints.Editor
|
|
29
|
+
{
|
|
30
|
+
[CustomEditor(typeof(BlueprintBase), editorForChildClasses:true)]
|
|
31
|
+
internal sealed class BlueprintBaseInspector : BlueprintInspector
|
|
32
|
+
{
|
|
33
|
+
private BlueprintBase _blueprintBase;
|
|
34
|
+
|
|
35
|
+
protected override void OnEnable()
|
|
36
|
+
{
|
|
37
|
+
// Get blueprint type info
|
|
38
|
+
_blueprintBase = (BlueprintBase)target;
|
|
39
|
+
|
|
40
|
+
base.OnEnable();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public override void OnInspectorGUI()
|
|
44
|
+
{
|
|
45
|
+
DrawComponentSelectorGUI(_blueprintBase.Components, OnComponentAdded);
|
|
46
|
+
DrawComponentArrayGUI(_blueprintBase.Components);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private void OnComponentAdded()
|
|
50
|
+
{
|
|
51
|
+
_blueprintBase.Validate();
|
|
52
|
+
|
|
53
|
+
EditorUtility.SetDirty(target);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
protected override void OnComponentRemoved(IComponent component)
|
|
57
|
+
{
|
|
58
|
+
// If the component was removed, set the target as dirty.
|
|
59
|
+
if (_blueprintBase.Components.Remove(component))
|
|
60
|
+
{
|
|
61
|
+
_blueprintBase.Validate();
|
|
62
|
+
|
|
63
|
+
EditorUtility.SetDirty(target);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2020 Jeff Campbell
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
using UnityEditor;
|
|
27
|
+
|
|
28
|
+
namespace JCMG.EntitasRedux.Blueprints.Editor
|
|
29
|
+
{
|
|
30
|
+
[CustomEditor(typeof(BlueprintBehaviourBase), editorForChildClasses:true)]
|
|
31
|
+
internal sealed class BlueprintBehaviourBaseInspector : BlueprintInspector
|
|
32
|
+
{
|
|
33
|
+
private BlueprintBehaviourBase _blueprintBehaviourBase;
|
|
34
|
+
|
|
35
|
+
protected override void OnEnable()
|
|
36
|
+
{
|
|
37
|
+
// Get blueprint type info
|
|
38
|
+
_blueprintBehaviourBase = (BlueprintBehaviourBase)target;
|
|
39
|
+
|
|
40
|
+
base.OnEnable();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public override void OnInspectorGUI()
|
|
44
|
+
{
|
|
45
|
+
DrawComponentSelectorGUI(_blueprintBehaviourBase.Components, OnComponentAdded);
|
|
46
|
+
DrawComponentArrayGUI(_blueprintBehaviourBase.Components);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private void OnComponentAdded()
|
|
50
|
+
{
|
|
51
|
+
_blueprintBehaviourBase.Validate();
|
|
52
|
+
|
|
53
|
+
EditorUtility.SetDirty(target);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
protected override void OnComponentRemoved(IComponent component)
|
|
57
|
+
{
|
|
58
|
+
// If the component was removed, set the target as dirty.
|
|
59
|
+
if (_blueprintBehaviourBase.Components.Remove(component))
|
|
60
|
+
{
|
|
61
|
+
_blueprintBehaviourBase.Validate();
|
|
62
|
+
|
|
63
|
+
EditorUtility.SetDirty(target);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2020 Jeff Campbell
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
+
THE SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
using System;
|
|
27
|
+
using System.Collections.Generic;
|
|
28
|
+
using System.Linq;
|
|
29
|
+
using System.Reflection;
|
|
30
|
+
using JCMG.EntitasRedux.Editor;
|
|
31
|
+
using UnityEditor;
|
|
32
|
+
using UnityEngine;
|
|
33
|
+
|
|
34
|
+
namespace JCMG.EntitasRedux.Blueprints.Editor
|
|
35
|
+
{
|
|
36
|
+
public abstract class BlueprintInspector : UnityEditor.Editor
|
|
37
|
+
{
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// Returns true if the context has any valid components that can be selected in the inspector, otherwise false.
|
|
40
|
+
/// </summary>
|
|
41
|
+
protected bool ContextHasSerializableComponents => _componentTypes.Length > 0 ||
|
|
42
|
+
_componentDisplayNames.Length > 0 ||
|
|
43
|
+
_componentInfo.Length > 0;
|
|
44
|
+
|
|
45
|
+
private static readonly IEnumerable<Assembly> ASSEMBLIES;
|
|
46
|
+
|
|
47
|
+
private int _selectedComponentIndex;
|
|
48
|
+
private Type _targetType;
|
|
49
|
+
private string _contextName;
|
|
50
|
+
private Type[] _componentTypes;
|
|
51
|
+
private string[] _componentDisplayNames;
|
|
52
|
+
private int _totalNumberOfComponents;
|
|
53
|
+
private EntityDrawer.ComponentInfo[] _componentInfo;
|
|
54
|
+
|
|
55
|
+
// UI
|
|
56
|
+
private const string ADD_BUTTON_TEXT = "Add";
|
|
57
|
+
private const string NO_VALID_COMPONENTS_WARNING =
|
|
58
|
+
"There are not any serializable components with a default constructor for the context [{0}]. Only components " +
|
|
59
|
+
"that meet that criteria will be available for blueprint usage.";
|
|
60
|
+
|
|
61
|
+
static BlueprintInspector()
|
|
62
|
+
{
|
|
63
|
+
ASSEMBLIES = AppDomain.CurrentDomain.GetAssemblies();
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
protected virtual void OnEnable()
|
|
67
|
+
{
|
|
68
|
+
// Get blueprint type info
|
|
69
|
+
_targetType = target.GetType();
|
|
70
|
+
_contextName = GetContextNameFromBlueprintType(_targetType);
|
|
71
|
+
|
|
72
|
+
// Get all possible serializable components info for the context this blueprint is associated with
|
|
73
|
+
GetComponentInfo(
|
|
74
|
+
_contextName,
|
|
75
|
+
out _componentTypes,
|
|
76
|
+
out _componentDisplayNames,
|
|
77
|
+
out _componentInfo,
|
|
78
|
+
out _totalNumberOfComponents);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
protected void DrawComponentArrayGUI(List<IComponent> components)
|
|
82
|
+
{
|
|
83
|
+
var unfoldedComponents = EntityDrawer.GetUnfoldedComponents(_contextName, _totalNumberOfComponents);
|
|
84
|
+
for (var i = 0; i < components.Count; i++)
|
|
85
|
+
{
|
|
86
|
+
var index = GetComponentIndex(components[i]);
|
|
87
|
+
if (components[i] == null || index == -1)
|
|
88
|
+
{
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
EntityDrawer.DrawComponent(
|
|
93
|
+
unfoldedComponents,
|
|
94
|
+
_contextName,
|
|
95
|
+
_totalNumberOfComponents,
|
|
96
|
+
index,
|
|
97
|
+
components[i],
|
|
98
|
+
OnComponentRemoved,
|
|
99
|
+
OnComponentChanged);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
protected void DrawComponentSelectorGUI(List<IComponent> components, Action onComponentAdded)
|
|
104
|
+
{
|
|
105
|
+
if (!ContextHasSerializableComponents)
|
|
106
|
+
{
|
|
107
|
+
EditorGUILayout.HelpBox(string.Format(NO_VALID_COMPONENTS_WARNING, _contextName), MessageType.Warning);
|
|
108
|
+
}
|
|
109
|
+
else
|
|
110
|
+
{
|
|
111
|
+
using (new EditorGUILayout.HorizontalScope())
|
|
112
|
+
{
|
|
113
|
+
// Select a component type specific to this blueprint's context.
|
|
114
|
+
_selectedComponentIndex = EditorGUILayout.Popup(_selectedComponentIndex, _componentDisplayNames);
|
|
115
|
+
|
|
116
|
+
// Add component if not already present in the blueprint.
|
|
117
|
+
using (new EditorGUI.DisabledScope(
|
|
118
|
+
HasComponentType(
|
|
119
|
+
components,
|
|
120
|
+
_componentTypes[_selectedComponentIndex])))
|
|
121
|
+
{
|
|
122
|
+
if (GUILayout.Button(ADD_BUTTON_TEXT))
|
|
123
|
+
{
|
|
124
|
+
var componentInstance = Activator.CreateInstance(_componentTypes[_selectedComponentIndex]);
|
|
125
|
+
components.Add((IComponent)componentInstance);
|
|
126
|
+
|
|
127
|
+
onComponentAdded?.Invoke();
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/// <summary>
|
|
135
|
+
/// Retrieves the component index for <paramref name="component"/> based on its type and presence in the context's
|
|
136
|
+
/// component lookup. If a valid index cannot be found, an assertion is thrown.
|
|
137
|
+
/// </summary>
|
|
138
|
+
/// <param name="component"></param>
|
|
139
|
+
/// <returns></returns>
|
|
140
|
+
protected int GetComponentIndex(IComponent component)
|
|
141
|
+
{
|
|
142
|
+
var result = -1;
|
|
143
|
+
var componentType = component.GetType();
|
|
144
|
+
for (var i = 0; i < _componentInfo.Length; i++)
|
|
145
|
+
{
|
|
146
|
+
if (componentType != _componentInfo[i].type)
|
|
147
|
+
{
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
result = _componentInfo[i].index;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return result;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/// <summary>
|
|
158
|
+
/// Returns true if a <see cref="IComponent"/> instance of <paramref name="componentType"/> exists in
|
|
159
|
+
/// <paramref name="components"/>, otherwise false.
|
|
160
|
+
/// </summary>
|
|
161
|
+
/// <param name="components"></param>
|
|
162
|
+
/// <param name="componentType"></param>
|
|
163
|
+
/// <returns></returns>
|
|
164
|
+
protected bool HasComponentType(List<IComponent> components, Type componentType)
|
|
165
|
+
{
|
|
166
|
+
var result = false;
|
|
167
|
+
for (var i = 0; i < components.Count; i++)
|
|
168
|
+
{
|
|
169
|
+
if (components[i].GetType() != componentType)
|
|
170
|
+
{
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
result = true;
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
protected void GetComponentInfo(string contextTypeName,
|
|
182
|
+
out Type[] componentTypes,
|
|
183
|
+
out string[] componentDisplayNames,
|
|
184
|
+
out EntityDrawer.ComponentInfo[] componentInfo,
|
|
185
|
+
out int totalNumberOfComponents)
|
|
186
|
+
{
|
|
187
|
+
// Get static component lookup type for the context this blueprint is associated with
|
|
188
|
+
var componentLookupTypeName = GetContextLookupTypeNameFromContextName(contextTypeName);
|
|
189
|
+
var componentLookupType = GetTypeByName(componentLookupTypeName);
|
|
190
|
+
|
|
191
|
+
const string COMPONENT_NAMES_MEMBER_NAME = "ComponentNames";
|
|
192
|
+
const string COMPONENT_TYPES_MEMBER_NAME = "ComponentTypes";
|
|
193
|
+
|
|
194
|
+
// Get component names
|
|
195
|
+
var componentNamesMemberInfo = componentLookupType.GetField(
|
|
196
|
+
COMPONENT_NAMES_MEMBER_NAME,
|
|
197
|
+
BindingFlags.Public | BindingFlags.Static);
|
|
198
|
+
var allComponentDisplayNames = (string[])componentNamesMemberInfo.GetValue(null);
|
|
199
|
+
|
|
200
|
+
// Get component types
|
|
201
|
+
var componentTypesMemberInfo = componentLookupType.GetField(
|
|
202
|
+
COMPONENT_TYPES_MEMBER_NAME,
|
|
203
|
+
BindingFlags.Public | BindingFlags.Static);
|
|
204
|
+
var allComponentTypes = (Type[])componentTypesMemberInfo.GetValue(null);
|
|
205
|
+
|
|
206
|
+
// Regardless of how many components we end up filtering down to for a developer to be able to add
|
|
207
|
+
// the total number of components always reflects the total for the context.
|
|
208
|
+
totalNumberOfComponents = allComponentTypes.Length;
|
|
209
|
+
|
|
210
|
+
// Filter down these lists to only those components that we can instantiate and serialize
|
|
211
|
+
var componentTypesList = new List<Type>();
|
|
212
|
+
var componentDisplayNamesList = new List<string>();
|
|
213
|
+
var componentInfoList = new List<EntityDrawer.ComponentInfo>();
|
|
214
|
+
for (var i = 0; i < allComponentTypes.Length; i++)
|
|
215
|
+
{
|
|
216
|
+
// If our component type is not serializable OR does not provide a default constructor, don't enable
|
|
217
|
+
// selection of it.
|
|
218
|
+
if (!allComponentTypes[i].IsSerializable ||
|
|
219
|
+
allComponentTypes[i].GetConstructor(Type.EmptyTypes) == null)
|
|
220
|
+
{
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
componentTypesList.Add(allComponentTypes[i]);
|
|
225
|
+
componentDisplayNamesList.Add(allComponentDisplayNames[i]);
|
|
226
|
+
componentInfoList.Add(new EntityDrawer.ComponentInfo()
|
|
227
|
+
{
|
|
228
|
+
index = i,
|
|
229
|
+
name = allComponentDisplayNames[i],
|
|
230
|
+
type = allComponentTypes[i]
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
componentTypes = componentTypesList.ToArray();
|
|
235
|
+
componentDisplayNames = componentDisplayNamesList.ToArray();
|
|
236
|
+
componentInfo = componentInfoList.ToArray();
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
protected string GetContextNameFromBlueprintType(Type type)
|
|
240
|
+
{
|
|
241
|
+
const string BLUEPRINT_BEHAVIOR_SUFFIX = "BlueprintBehaviour";
|
|
242
|
+
const string BLUEPRINT_SUFFIX = "Blueprint";
|
|
243
|
+
|
|
244
|
+
return type.Name
|
|
245
|
+
.Replace(BLUEPRINT_BEHAVIOR_SUFFIX, string.Empty)
|
|
246
|
+
.Replace(BLUEPRINT_SUFFIX, string.Empty);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
protected string GetContextLookupTypeNameFromContextName(string contextName)
|
|
250
|
+
{
|
|
251
|
+
const string COMPONENTS_LOOKUP_SUFFIX = "ComponentsLookup";
|
|
252
|
+
|
|
253
|
+
return contextName + COMPONENTS_LOOKUP_SUFFIX;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
protected Type GetTypeByName(string typeName)
|
|
257
|
+
{
|
|
258
|
+
return ASSEMBLIES.SelectMany(x => x.GetTypes()).FirstOrDefault(y => y.Name == typeName);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
protected abstract void OnComponentRemoved(IComponent component);
|
|
262
|
+
|
|
263
|
+
protected void OnComponentChanged()
|
|
264
|
+
{
|
|
265
|
+
EditorUtility.SetDirty(target);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EntitasRedux.Blueprints.Editor",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:e27c5a73d7af115488fbcb097f6442da",
|
|
5
|
+
"GUID:53bc2da9556d30547913e5a8aa819794",
|
|
6
|
+
"GUID:4f86ea35524e99d4fb2177e6a10dfbff",
|
|
7
|
+
"GUID:f362ddc593ff9b646b7b6dedd1c86c91"
|
|
8
|
+
],
|
|
9
|
+
"includePlatforms": [
|
|
10
|
+
"Editor"
|
|
11
|
+
],
|
|
12
|
+
"excludePlatforms": [],
|
|
13
|
+
"allowUnsafeCode": false,
|
|
14
|
+
"overrideReferences": false,
|
|
15
|
+
"precompiledReferences": [],
|
|
16
|
+
"autoReferenced": true,
|
|
17
|
+
"defineConstraints": [],
|
|
18
|
+
"versionDefines": [],
|
|
19
|
+
"noEngineReferences": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EntitasRedux.Blueprints",
|
|
3
|
+
"references": [
|
|
4
|
+
"GUID:53bc2da9556d30547913e5a8aa819794"
|
|
5
|
+
],
|
|
6
|
+
"includePlatforms": [],
|
|
7
|
+
"excludePlatforms": [],
|
|
8
|
+
"allowUnsafeCode": false,
|
|
9
|
+
"overrideReferences": false,
|
|
10
|
+
"precompiledReferences": [],
|
|
11
|
+
"autoReferenced": true,
|
|
12
|
+
"defineConstraints": [],
|
|
13
|
+
"versionDefines": [],
|
|
14
|
+
"noEngineReferences": false
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
|
|
3
|
+
namespace JCMG.EntitasRedux.Core.Utils
|
|
4
|
+
{
|
|
5
|
+
public class UnsubscribeEvent : IUnsubscribeEvent
|
|
6
|
+
{
|
|
7
|
+
public event Action Value;
|
|
8
|
+
|
|
9
|
+
public void Clear()
|
|
10
|
+
{
|
|
11
|
+
Value?.Invoke();
|
|
12
|
+
Value = null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public interface IUnsubscribeEvent
|
|
17
|
+
{
|
|
18
|
+
event Action Value;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
using System;
|
|
2
|
+
|
|
3
|
+
namespace JCMG.EntitasRedux.Core.Utils
|
|
4
|
+
{
|
|
5
|
+
public static class UnsubscribeEventExtensions
|
|
6
|
+
{
|
|
7
|
+
public static IDisposable AddTo(this IDisposable disposable, IUnsubscribeEvent unsubscribe)
|
|
8
|
+
{
|
|
9
|
+
unsubscribe.Value += disposable.Dispose;
|
|
10
|
+
return disposable;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|