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,347 @@
|
|
|
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
|
+
|
|
28
|
+
namespace JCMG.EntitasRedux.VisualDebugging
|
|
29
|
+
{
|
|
30
|
+
[Flags]
|
|
31
|
+
public enum SystemInterfaceFlags
|
|
32
|
+
{
|
|
33
|
+
None = 0,
|
|
34
|
+
InitializeSystem = 1 << 1,
|
|
35
|
+
FixedUpdateSystem = 1 << 6,
|
|
36
|
+
UpdateSystem = 1 << 2,
|
|
37
|
+
LateUpdateSystem = 1 << 7,
|
|
38
|
+
ReactiveSystem = 1 << 5,
|
|
39
|
+
CleanupSystem = 1 << 3,
|
|
40
|
+
TearDownSystem = 1 << 4
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public class SystemInfo
|
|
44
|
+
{
|
|
45
|
+
public ISystem System { get; }
|
|
46
|
+
|
|
47
|
+
public string SystemName { get; }
|
|
48
|
+
|
|
49
|
+
public bool AreAllParentsActive =>
|
|
50
|
+
parentSystemInfo == null || parentSystemInfo.isActive && parentSystemInfo.AreAllParentsActive;
|
|
51
|
+
|
|
52
|
+
#region SystemInterfaceFlag Properties
|
|
53
|
+
|
|
54
|
+
public bool IsInitializeSystems =>
|
|
55
|
+
(_interfaceFlags & SystemInterfaceFlags.InitializeSystem) == SystemInterfaceFlags.InitializeSystem;
|
|
56
|
+
|
|
57
|
+
public bool IsUpdateSystems =>
|
|
58
|
+
(_interfaceFlags & SystemInterfaceFlags.UpdateSystem) == SystemInterfaceFlags.UpdateSystem;
|
|
59
|
+
|
|
60
|
+
public bool IsFixedUpdateSystems =>
|
|
61
|
+
(_interfaceFlags & SystemInterfaceFlags.FixedUpdateSystem) == SystemInterfaceFlags.FixedUpdateSystem;
|
|
62
|
+
|
|
63
|
+
public bool IsLateUpdateSystems =>
|
|
64
|
+
(_interfaceFlags & SystemInterfaceFlags.LateUpdateSystem) == SystemInterfaceFlags.LateUpdateSystem;
|
|
65
|
+
|
|
66
|
+
public bool IsCleanupSystems =>
|
|
67
|
+
(_interfaceFlags & SystemInterfaceFlags.CleanupSystem) == SystemInterfaceFlags.CleanupSystem;
|
|
68
|
+
|
|
69
|
+
public bool IsTearDownSystems =>
|
|
70
|
+
(_interfaceFlags & SystemInterfaceFlags.TearDownSystem) == SystemInterfaceFlags.TearDownSystem;
|
|
71
|
+
|
|
72
|
+
public bool IsReactiveSystems =>
|
|
73
|
+
(_interfaceFlags & SystemInterfaceFlags.ReactiveSystem) == SystemInterfaceFlags.ReactiveSystem;
|
|
74
|
+
|
|
75
|
+
#endregion
|
|
76
|
+
|
|
77
|
+
#region FixedUpdate System Properties
|
|
78
|
+
|
|
79
|
+
public double MinFixedUpdateDuration => _minFixedUpdateDuration;
|
|
80
|
+
|
|
81
|
+
public double MaxFixedUpdateDuration => _maxFixedUpdateDuration;
|
|
82
|
+
|
|
83
|
+
public double AccumulatedFixedUpdateDuration => _accumulatedFixedUpdateDuration;
|
|
84
|
+
|
|
85
|
+
public double AverageFixedUpdateDuration =>
|
|
86
|
+
_fixedUpdateDurationsCount == 0 ? 0 : _accumulatedFixedUpdateDuration / _fixedUpdateDurationsCount;
|
|
87
|
+
|
|
88
|
+
#endregion
|
|
89
|
+
|
|
90
|
+
#region Update System Properties
|
|
91
|
+
|
|
92
|
+
public double MinUpdateDuration => _minUpdateDuration;
|
|
93
|
+
|
|
94
|
+
public double MaxUpdateDuration => _maxUpdateDuration;
|
|
95
|
+
|
|
96
|
+
public double AccumulatedUpdateDuration => _accumulatedUpdateDuration;
|
|
97
|
+
|
|
98
|
+
public double AverageUpdateDuration =>
|
|
99
|
+
_updateDurationsCount == 0 ? 0 : _accumulatedUpdateDuration / _updateDurationsCount;
|
|
100
|
+
|
|
101
|
+
#endregion
|
|
102
|
+
|
|
103
|
+
#region LateUpdate System Properties
|
|
104
|
+
|
|
105
|
+
public double MinLateUpdateDuration => _minLateUpdateDuration;
|
|
106
|
+
|
|
107
|
+
public double MaxLateUpdateDuration => _maxLateUpdateDuration;
|
|
108
|
+
|
|
109
|
+
public double AccumulatedLateUpdateDuration => _accumulatedLateUpdateDuration;
|
|
110
|
+
|
|
111
|
+
public double AverageLateUpdateDuration =>
|
|
112
|
+
_lateUpdateDurationsCount == 0 ? 0 : _accumulatedLateUpdateDuration / _lateUpdateDurationsCount;
|
|
113
|
+
|
|
114
|
+
#endregion
|
|
115
|
+
|
|
116
|
+
#region Reactive System Properties
|
|
117
|
+
|
|
118
|
+
public double MinReactiveDuration => _minReactiveDuration;
|
|
119
|
+
|
|
120
|
+
public double MaxReactiveDuration => _maxReactiveDuration;
|
|
121
|
+
|
|
122
|
+
public double AccumulatedReactiveDuration => _accumulatedReactiveDuration;
|
|
123
|
+
|
|
124
|
+
public double AverageReactiveDuration =>
|
|
125
|
+
_reactiveDurationsCount == 0 ? 0 : _accumulatedReactiveDuration / _reactiveDurationsCount;
|
|
126
|
+
|
|
127
|
+
#endregion
|
|
128
|
+
|
|
129
|
+
#region Cleanup System Properties
|
|
130
|
+
|
|
131
|
+
public double CleanupDuration { get; set; }
|
|
132
|
+
|
|
133
|
+
public double MinCleanupDuration => _minCleanupDuration;
|
|
134
|
+
|
|
135
|
+
public double MaxCleanupDuration => _maxCleanupDuration;
|
|
136
|
+
|
|
137
|
+
public double AccumulatedCleanupDuration => _accumulatedCleanupDuration;
|
|
138
|
+
|
|
139
|
+
public double AverageCleanupDuration =>
|
|
140
|
+
_cleanupDurationsCount == 0 ? 0 : _accumulatedCleanupDuration / _cleanupDurationsCount;
|
|
141
|
+
|
|
142
|
+
#endregion
|
|
143
|
+
|
|
144
|
+
#region Initialization and Teardown Properties
|
|
145
|
+
|
|
146
|
+
public double InitializationDuration { get; set; }
|
|
147
|
+
|
|
148
|
+
public double TeardownDuration { get; set; }
|
|
149
|
+
|
|
150
|
+
#endregion
|
|
151
|
+
|
|
152
|
+
public bool isActive;
|
|
153
|
+
|
|
154
|
+
public SystemInfo parentSystemInfo;
|
|
155
|
+
|
|
156
|
+
// Update
|
|
157
|
+
private double _maxUpdateDuration;
|
|
158
|
+
private double _minUpdateDuration;
|
|
159
|
+
private double _accumulatedUpdateDuration;
|
|
160
|
+
private int _updateDurationsCount;
|
|
161
|
+
|
|
162
|
+
// Fixed Update
|
|
163
|
+
private double _minFixedUpdateDuration;
|
|
164
|
+
private double _maxFixedUpdateDuration;
|
|
165
|
+
private double _accumulatedFixedUpdateDuration;
|
|
166
|
+
private int _fixedUpdateDurationsCount;
|
|
167
|
+
|
|
168
|
+
// Late Update
|
|
169
|
+
private double _minLateUpdateDuration;
|
|
170
|
+
private double _maxLateUpdateDuration;
|
|
171
|
+
private double _accumulatedLateUpdateDuration;
|
|
172
|
+
private int _lateUpdateDurationsCount;
|
|
173
|
+
|
|
174
|
+
// Reactive
|
|
175
|
+
private double _maxReactiveDuration;
|
|
176
|
+
private double _minReactiveDuration;
|
|
177
|
+
private double _accumulatedReactiveDuration;
|
|
178
|
+
private int _reactiveDurationsCount;
|
|
179
|
+
|
|
180
|
+
// Cleanup
|
|
181
|
+
private int _cleanupDurationsCount;
|
|
182
|
+
private double _maxCleanupDuration;
|
|
183
|
+
private double _minCleanupDuration;
|
|
184
|
+
private double _accumulatedCleanupDuration;
|
|
185
|
+
|
|
186
|
+
private readonly SystemInterfaceFlags _interfaceFlags;
|
|
187
|
+
|
|
188
|
+
public SystemInfo(ISystem system)
|
|
189
|
+
{
|
|
190
|
+
System = system;
|
|
191
|
+
_interfaceFlags = GetInterfaceFlags(system);
|
|
192
|
+
|
|
193
|
+
SystemName = system is DebugSystems debugSystem
|
|
194
|
+
? debugSystem.Name
|
|
195
|
+
: system.GetType().Name.RemoveSystemSuffix();
|
|
196
|
+
|
|
197
|
+
isActive = true;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
public void AddFixedUpdateDuration(double duration)
|
|
201
|
+
{
|
|
202
|
+
if (duration < _minFixedUpdateDuration || Math.Abs(_minFixedUpdateDuration) < 0.001)
|
|
203
|
+
{
|
|
204
|
+
_minFixedUpdateDuration = duration;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (duration > _maxFixedUpdateDuration)
|
|
208
|
+
{
|
|
209
|
+
_maxFixedUpdateDuration = duration;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
_accumulatedFixedUpdateDuration += duration;
|
|
213
|
+
_fixedUpdateDurationsCount += 1;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
public void AddUpdateDuration(double duration)
|
|
217
|
+
{
|
|
218
|
+
if (duration < _minUpdateDuration || Math.Abs(_minUpdateDuration) < 0.001)
|
|
219
|
+
{
|
|
220
|
+
_minUpdateDuration = duration;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (duration > _maxUpdateDuration)
|
|
224
|
+
{
|
|
225
|
+
_maxUpdateDuration = duration;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
_accumulatedUpdateDuration += duration;
|
|
229
|
+
_updateDurationsCount += 1;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
public void AddLateUpdateDuration(double duration)
|
|
233
|
+
{
|
|
234
|
+
if (duration < _minLateUpdateDuration || Math.Abs(_minLateUpdateDuration) < 0.001)
|
|
235
|
+
{
|
|
236
|
+
_minLateUpdateDuration = duration;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (duration > _maxLateUpdateDuration)
|
|
240
|
+
{
|
|
241
|
+
_maxLateUpdateDuration = duration;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
_accumulatedLateUpdateDuration += duration;
|
|
245
|
+
_lateUpdateDurationsCount += 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
public void AddReactiveDuration(double duration)
|
|
249
|
+
{
|
|
250
|
+
if (duration < _minReactiveDuration || Math.Abs(_minReactiveDuration) < 0.001)
|
|
251
|
+
{
|
|
252
|
+
_minReactiveDuration = duration;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
if (duration > _maxReactiveDuration)
|
|
256
|
+
{
|
|
257
|
+
_maxReactiveDuration = duration;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
_accumulatedReactiveDuration += duration;
|
|
261
|
+
_reactiveDurationsCount += 1;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
public void AddCleanupDuration(double cleanupDuration)
|
|
265
|
+
{
|
|
266
|
+
if (cleanupDuration < _minCleanupDuration || Math.Abs(_minCleanupDuration) < 0.001)
|
|
267
|
+
{
|
|
268
|
+
_minCleanupDuration = cleanupDuration;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (cleanupDuration > _maxCleanupDuration)
|
|
272
|
+
{
|
|
273
|
+
_maxCleanupDuration = cleanupDuration;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
_accumulatedCleanupDuration += cleanupDuration;
|
|
277
|
+
_cleanupDurationsCount += 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/// <summary>
|
|
281
|
+
/// Resets the duration times and counts for all relevant render frame system metrics.
|
|
282
|
+
/// </summary>
|
|
283
|
+
public void ResetFrameDurations()
|
|
284
|
+
{
|
|
285
|
+
// Fixed Update
|
|
286
|
+
_accumulatedFixedUpdateDuration = 0;
|
|
287
|
+
_fixedUpdateDurationsCount = 0;
|
|
288
|
+
|
|
289
|
+
// Update
|
|
290
|
+
_accumulatedUpdateDuration = 0;
|
|
291
|
+
_updateDurationsCount = 0;
|
|
292
|
+
|
|
293
|
+
// Late Update
|
|
294
|
+
_accumulatedLateUpdateDuration = 0;
|
|
295
|
+
_lateUpdateDurationsCount = 0;
|
|
296
|
+
|
|
297
|
+
// Execute
|
|
298
|
+
_accumulatedReactiveDuration = 0;
|
|
299
|
+
_reactiveDurationsCount = 0;
|
|
300
|
+
|
|
301
|
+
// Cleanup
|
|
302
|
+
_accumulatedCleanupDuration = 0;
|
|
303
|
+
_cleanupDurationsCount = 0;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
private static SystemInterfaceFlags GetInterfaceFlags(ISystem system)
|
|
307
|
+
{
|
|
308
|
+
var flags = SystemInterfaceFlags.None;
|
|
309
|
+
if (system is IInitializeSystem)
|
|
310
|
+
{
|
|
311
|
+
flags |= SystemInterfaceFlags.InitializeSystem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (system is IFixedUpdateSystem)
|
|
315
|
+
{
|
|
316
|
+
flags |= SystemInterfaceFlags.FixedUpdateSystem;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
if (system is IUpdateSystem)
|
|
320
|
+
{
|
|
321
|
+
flags |= SystemInterfaceFlags.UpdateSystem;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (system is ILateUpdateSystem)
|
|
325
|
+
{
|
|
326
|
+
flags |= SystemInterfaceFlags.LateUpdateSystem;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
if (system is IReactiveSystem)
|
|
330
|
+
{
|
|
331
|
+
flags |= SystemInterfaceFlags.ReactiveSystem;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (system is ICleanupSystem)
|
|
335
|
+
{
|
|
336
|
+
flags |= SystemInterfaceFlags.CleanupSystem;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
if (system is ITearDownSystem)
|
|
340
|
+
{
|
|
341
|
+
flags |= SystemInterfaceFlags.TearDownSystem;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return flags;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -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.VisualDebugging.Editor")]
|
|
32
|
+
[assembly: AssemblyTitle("EntitasRedux.VisualDebugging.Editor")]
|
|
33
|
+
[assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/jeffcampbellmakesgames/Entitas-Redux.git")]
|
|
34
|
+
|
|
35
|
+
[assembly: AssemblyVersion("2.1.0")]
|
|
@@ -0,0 +1,104 @@
|
|
|
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.Linq;
|
|
27
|
+
using JCMG.EntitasRedux.Editor;
|
|
28
|
+
using UnityEditor;
|
|
29
|
+
using UnityEngine;
|
|
30
|
+
|
|
31
|
+
namespace JCMG.EntitasRedux.VisualDebugging.Editor
|
|
32
|
+
{
|
|
33
|
+
[CustomEditor(typeof(ContextObserverBehaviour))]
|
|
34
|
+
internal sealed class ContextObserverInspector : UnityEditor.Editor
|
|
35
|
+
{
|
|
36
|
+
public override void OnInspectorGUI()
|
|
37
|
+
{
|
|
38
|
+
var contextObserver = ((ContextObserverBehaviour)target).ContextObserver;
|
|
39
|
+
|
|
40
|
+
EditorGUILayoutTools.BeginSectionContent();
|
|
41
|
+
{
|
|
42
|
+
EditorGUILayout.LabelField(contextObserver.Context.ContextInfo.name, EditorStyles.boldLabel);
|
|
43
|
+
EditorGUILayout.LabelField("Entities", contextObserver.Context.Count.ToString());
|
|
44
|
+
EditorGUILayout.LabelField("Reusable entities", contextObserver.Context.ReusableEntitiesCount.ToString());
|
|
45
|
+
|
|
46
|
+
var retainedEntitiesCount = contextObserver.Context.RetainedEntitiesCount;
|
|
47
|
+
if (retainedEntitiesCount != 0)
|
|
48
|
+
{
|
|
49
|
+
var c = GUI.color;
|
|
50
|
+
GUI.color = Color.red;
|
|
51
|
+
EditorGUILayout.LabelField("Retained entities", retainedEntitiesCount.ToString());
|
|
52
|
+
GUI.color = c;
|
|
53
|
+
EditorGUILayout.HelpBox(
|
|
54
|
+
"WARNING: There are retained entities.\nDid you call entity.Retain(owner) and forgot to call entity.Release(owner)?",
|
|
55
|
+
MessageType.Warning);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
EditorGUILayout.BeginHorizontal();
|
|
59
|
+
{
|
|
60
|
+
if (GUILayout.Button("Create Entity"))
|
|
61
|
+
{
|
|
62
|
+
var entity = contextObserver.Context.CreateEntity();
|
|
63
|
+
var entityBehaviour = FindObjectsOfType<EntityBehaviour>()
|
|
64
|
+
.Single(eb => eb.Entity == entity);
|
|
65
|
+
|
|
66
|
+
Selection.activeGameObject = entityBehaviour.gameObject;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var bgColor = GUI.backgroundColor;
|
|
70
|
+
GUI.backgroundColor = Color.red;
|
|
71
|
+
if (GUILayout.Button("Destroy All Entities"))
|
|
72
|
+
{
|
|
73
|
+
contextObserver.Context.DestroyAllEntities();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
GUI.backgroundColor = bgColor;
|
|
77
|
+
}
|
|
78
|
+
EditorGUILayout.EndHorizontal();
|
|
79
|
+
}
|
|
80
|
+
EditorGUILayoutTools.EndSectionContent();
|
|
81
|
+
|
|
82
|
+
var groups = contextObserver.Groups;
|
|
83
|
+
if (groups.Length != 0)
|
|
84
|
+
{
|
|
85
|
+
EditorGUILayoutTools.BeginSectionContent();
|
|
86
|
+
{
|
|
87
|
+
EditorGUILayout.LabelField("Groups (" + groups.Length + ")", EditorStyles.boldLabel);
|
|
88
|
+
foreach (var group in groups.OrderByDescending(g => g.Count))
|
|
89
|
+
{
|
|
90
|
+
EditorGUILayout.BeginHorizontal();
|
|
91
|
+
{
|
|
92
|
+
EditorGUILayout.LabelField(group.ToString());
|
|
93
|
+
EditorGUILayout.LabelField(group.Count.ToString(), GUILayout.Width(48));
|
|
94
|
+
}
|
|
95
|
+
EditorGUILayout.EndHorizontal();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
EditorGUILayoutTools.EndSectionContent();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
EditorUtility.SetDirty(target);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|