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,234 @@
|
|
|
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.Linq;
|
|
28
|
+
using UnityEditor;
|
|
29
|
+
using UnityEngine;
|
|
30
|
+
|
|
31
|
+
namespace JCMG.EntitasRedux.VisualDebugging.Editor
|
|
32
|
+
{
|
|
33
|
+
internal sealed class Graph
|
|
34
|
+
{
|
|
35
|
+
private const float ANCHOR_RADIUS = 1f;
|
|
36
|
+
private const string AXIS_FORMAT = "{0:0.0}";
|
|
37
|
+
private const float AXIS_ROUNDING = 1f;
|
|
38
|
+
private const int GRID_LINES = 1;
|
|
39
|
+
private const string LABEL_FORMAT = "{0:0.0}";
|
|
40
|
+
private const int RIGHT_LINE_PADDING = -15;
|
|
41
|
+
private const float X_BORDER = 48f;
|
|
42
|
+
private const float Y_BORDER = 12f;
|
|
43
|
+
|
|
44
|
+
private readonly Vector3[] _cachedLinePointVertices;
|
|
45
|
+
private readonly GUIStyle _centeredStyle;
|
|
46
|
+
private readonly GUIStyle _labelTextStyle;
|
|
47
|
+
private readonly Vector3[] _linePoints;
|
|
48
|
+
|
|
49
|
+
public Graph(int dataLength)
|
|
50
|
+
{
|
|
51
|
+
_labelTextStyle = new GUIStyle(GUI.skin.label);
|
|
52
|
+
_labelTextStyle.alignment = TextAnchor.UpperRight;
|
|
53
|
+
|
|
54
|
+
_centeredStyle = new GUIStyle();
|
|
55
|
+
_centeredStyle.alignment = TextAnchor.UpperCenter;
|
|
56
|
+
_centeredStyle.normal.textColor = Color.white;
|
|
57
|
+
|
|
58
|
+
_linePoints = new Vector3[dataLength];
|
|
59
|
+
_cachedLinePointVertices = new []
|
|
60
|
+
{
|
|
61
|
+
new Vector3(-1f, 1f, 0.0f) * ANCHOR_RADIUS,
|
|
62
|
+
new Vector3(1f, 1f, 0.0f) * ANCHOR_RADIUS,
|
|
63
|
+
new Vector3(1f, -1f, 0.0f) * ANCHOR_RADIUS,
|
|
64
|
+
new Vector3(-1f, -1f, 0.0f) * ANCHOR_RADIUS
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public void Draw(float[] data, float height, Color lineColor)
|
|
69
|
+
{
|
|
70
|
+
var controlRect = EditorGUILayout.GetControlRect();
|
|
71
|
+
var rect = GUILayoutUtility.GetRect(controlRect.width, height);
|
|
72
|
+
var top = rect.y + Y_BORDER;
|
|
73
|
+
var floor = rect.y + rect.height - Y_BORDER;
|
|
74
|
+
var availableHeight = floor - top;
|
|
75
|
+
var max = data.Length != 0 ? data.Max() : 0.0f;
|
|
76
|
+
if (Math.Abs(max % (double)AXIS_ROUNDING) > 0.001)
|
|
77
|
+
{
|
|
78
|
+
max = (float)(max + (double)AXIS_ROUNDING - max % (double)AXIS_ROUNDING);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
DrawGridLines(
|
|
82
|
+
top,
|
|
83
|
+
rect.width,
|
|
84
|
+
availableHeight,
|
|
85
|
+
max);
|
|
86
|
+
|
|
87
|
+
DrawAverage(
|
|
88
|
+
data,
|
|
89
|
+
top,
|
|
90
|
+
floor,
|
|
91
|
+
rect.width,
|
|
92
|
+
availableHeight,
|
|
93
|
+
max);
|
|
94
|
+
|
|
95
|
+
DrawLine(
|
|
96
|
+
data,
|
|
97
|
+
floor,
|
|
98
|
+
rect.width,
|
|
99
|
+
availableHeight,
|
|
100
|
+
max,
|
|
101
|
+
lineColor);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
public void Draw(float[][] data, float width, float height, Color[] lineColors)
|
|
105
|
+
{
|
|
106
|
+
var rect = GUILayoutUtility.GetRect(width, height);
|
|
107
|
+
var top = rect.y + Y_BORDER;
|
|
108
|
+
var floor = rect.y + rect.height - Y_BORDER;
|
|
109
|
+
var availableHeight = floor - top;
|
|
110
|
+
var max = Mathf.Max(0.0f, data.Select(x => x.Max()).Max());
|
|
111
|
+
if (Math.Abs(max % (double)AXIS_ROUNDING) > 0.001)
|
|
112
|
+
{
|
|
113
|
+
max = (float)(max + (double)AXIS_ROUNDING - max % (double)AXIS_ROUNDING);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
DrawGridLines(
|
|
117
|
+
top,
|
|
118
|
+
rect.width,
|
|
119
|
+
availableHeight,
|
|
120
|
+
max);
|
|
121
|
+
|
|
122
|
+
for (var i = 0; i < data.Length; i++)
|
|
123
|
+
{
|
|
124
|
+
var newData = data[i];
|
|
125
|
+
|
|
126
|
+
DrawLine(
|
|
127
|
+
newData,
|
|
128
|
+
floor,
|
|
129
|
+
rect.width,
|
|
130
|
+
availableHeight,
|
|
131
|
+
max,
|
|
132
|
+
lineColors[i]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
private void DrawGridLines(float top, float width, float availableHeight, float max)
|
|
137
|
+
{
|
|
138
|
+
var color = Handles.color;
|
|
139
|
+
Handles.color = Color.grey;
|
|
140
|
+
var num1 = GRID_LINES + 1;
|
|
141
|
+
var num2 = availableHeight / num1;
|
|
142
|
+
for (var index = 0; index <= num1; ++index)
|
|
143
|
+
{
|
|
144
|
+
var num3 = top + num2 * index;
|
|
145
|
+
Handles.DrawLine(new Vector2(X_BORDER, num3), new Vector2(width - RIGHT_LINE_PADDING, num3));
|
|
146
|
+
GUI.Label(
|
|
147
|
+
new Rect(
|
|
148
|
+
0.0f,
|
|
149
|
+
num3 - 8f,
|
|
150
|
+
X_BORDER - 2f,
|
|
151
|
+
50f),
|
|
152
|
+
string.Format(AXIS_FORMAT, (float)(max * (1.0 - index / (double)num1))),
|
|
153
|
+
_labelTextStyle);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
Handles.color = color;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
private void DrawAverage(
|
|
160
|
+
float[] data,
|
|
161
|
+
float top,
|
|
162
|
+
float floor,
|
|
163
|
+
float width,
|
|
164
|
+
float availableHeight,
|
|
165
|
+
float max)
|
|
166
|
+
{
|
|
167
|
+
var color = Handles.color;
|
|
168
|
+
Handles.color = Color.yellow;
|
|
169
|
+
var num1 = data.Average();
|
|
170
|
+
var num2 = floor - availableHeight * (num1 / max);
|
|
171
|
+
Handles.DrawLine(new Vector2(X_BORDER, num2), new Vector2(width - RIGHT_LINE_PADDING, num2));
|
|
172
|
+
Handles.color = color;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
private void DrawLine(
|
|
176
|
+
float[] data,
|
|
177
|
+
float floor,
|
|
178
|
+
float width,
|
|
179
|
+
float availableHeight,
|
|
180
|
+
float max,
|
|
181
|
+
Color lineColor)
|
|
182
|
+
{
|
|
183
|
+
var num1 = (width - X_BORDER - RIGHT_LINE_PADDING) / data.Length;
|
|
184
|
+
var color = Handles.color;
|
|
185
|
+
var rect = new Rect();
|
|
186
|
+
var flag = false;
|
|
187
|
+
var num2 = 0.0f;
|
|
188
|
+
Handles.color = lineColor;
|
|
189
|
+
Handles.matrix = Matrix4x4.identity;
|
|
190
|
+
HandleUtility.handleMaterial.SetPass(0);
|
|
191
|
+
for (var index = 0; index < data.Length; ++index)
|
|
192
|
+
{
|
|
193
|
+
var num3 = data[index];
|
|
194
|
+
var num4 = floor - availableHeight * (num3 / max);
|
|
195
|
+
var vector21 = new Vector2(X_BORDER + num1 * index, num4);
|
|
196
|
+
_linePoints[index] = new Vector3(vector21.x, vector21.y, 0.0f);
|
|
197
|
+
if (!flag)
|
|
198
|
+
{
|
|
199
|
+
var num6 = ANCHOR_RADIUS * 3f;
|
|
200
|
+
var num7 = ANCHOR_RADIUS * 6f;
|
|
201
|
+
var vector22 = vector21 - Vector2.up * 0.5f;
|
|
202
|
+
rect = new Rect(
|
|
203
|
+
vector22.x - num6,
|
|
204
|
+
vector22.y - num6,
|
|
205
|
+
num7,
|
|
206
|
+
num7);
|
|
207
|
+
if (rect.Contains(Event.current.mousePosition))
|
|
208
|
+
{
|
|
209
|
+
flag = true;
|
|
210
|
+
num2 = num3;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
Handles.matrix = Matrix4x4.TRS(_linePoints[index], Quaternion.identity, Vector3.one);
|
|
215
|
+
Handles.DrawAAConvexPolygon(_cachedLinePointVertices);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
Handles.matrix = Matrix4x4.identity;
|
|
219
|
+
Handles.DrawAAPolyLine(2f, data.Length, _linePoints);
|
|
220
|
+
if (flag)
|
|
221
|
+
{
|
|
222
|
+
ref var local1 = ref rect;
|
|
223
|
+
local1.y = local1.y - 16f;
|
|
224
|
+
ref var local2 = ref rect;
|
|
225
|
+
local2.width = local2.width + 50f;
|
|
226
|
+
ref var local3 = ref rect;
|
|
227
|
+
local3.x = local3.x - 25f;
|
|
228
|
+
GUI.Label(rect, string.Format(LABEL_FORMAT, num2), _centeredStyle);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
Handles.color = color;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 JCMG.EntitasRedux.Editor;
|
|
27
|
+
using UnityEngine;
|
|
28
|
+
|
|
29
|
+
namespace JCMG.EntitasRedux.VisualDebugging.Editor
|
|
30
|
+
{
|
|
31
|
+
/// <summary>
|
|
32
|
+
/// Editor styles for Visual Debugging
|
|
33
|
+
/// </summary>
|
|
34
|
+
internal static class VisualDebugStyles
|
|
35
|
+
{
|
|
36
|
+
public static GUIStyle SectionContent
|
|
37
|
+
{
|
|
38
|
+
get
|
|
39
|
+
{
|
|
40
|
+
if (_sectionContent == null)
|
|
41
|
+
{
|
|
42
|
+
_sectionContent = new GUIStyle(EntitasReduxStyles.GROUP_BOX_STYLE);
|
|
43
|
+
_sectionContent.padding = new RectOffset(0, 0, 0, 0);
|
|
44
|
+
_sectionContent.margin = new RectOffset(0, 0, 0, 0);
|
|
45
|
+
_sectionContent.contentOffset = Vector2.zero;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return _sectionContent;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Cache
|
|
53
|
+
private static GUIStyle _sectionContent;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -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
|
+
namespace JCMG.EntitasRedux.VisualDebugging.Editor
|
|
27
|
+
{
|
|
28
|
+
internal static class VisualDebuggingEntitasExtension
|
|
29
|
+
{
|
|
30
|
+
public static IEntity CreateEntity(this IContext context)
|
|
31
|
+
{
|
|
32
|
+
return (IEntity)context.GetType().GetMethod("CreateEntity").Invoke(context, null);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
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 JCMG.EntitasRedux.Editor;
|
|
27
|
+
using UnityEditor;
|
|
28
|
+
using UnityEngine;
|
|
29
|
+
|
|
30
|
+
namespace JCMG.EntitasRedux.VisualDebugging.Editor
|
|
31
|
+
{
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// User preferences for visual debugging
|
|
34
|
+
/// </summary>
|
|
35
|
+
public static class VisualDebuggingPreferences
|
|
36
|
+
{
|
|
37
|
+
/// <summary>
|
|
38
|
+
/// The threshold of time in milliseconds that system performance must meet or exceed to warrant appearing as
|
|
39
|
+
/// a warning.
|
|
40
|
+
/// </summary>
|
|
41
|
+
public static int SystemWarningThreshold
|
|
42
|
+
{
|
|
43
|
+
get
|
|
44
|
+
{
|
|
45
|
+
if (!_systemWarningThreshold.HasValue)
|
|
46
|
+
{
|
|
47
|
+
_systemWarningThreshold = PreferenceTools.GetIntPref(SYSTEM_WARNING_THRESHOLD_PREF_KEY, DEFAULT_VALUE);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return Mathf.Max(0, _systemWarningThreshold.Value);
|
|
51
|
+
}
|
|
52
|
+
set
|
|
53
|
+
{
|
|
54
|
+
_systemWarningThreshold = Mathf.Max(0, value);
|
|
55
|
+
EditorPrefs.SetInt(SYSTEM_WARNING_THRESHOLD_PREF_KEY, _systemWarningThreshold.Value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// <summary>
|
|
60
|
+
/// The color shown for visual debug editor UX for <see cref="IFixedUpdateSystem"/>.
|
|
61
|
+
/// </summary>
|
|
62
|
+
public static Color FixedUpdateColor
|
|
63
|
+
{
|
|
64
|
+
get
|
|
65
|
+
{
|
|
66
|
+
if (!_fixedUpdateColor.HasValue)
|
|
67
|
+
{
|
|
68
|
+
_fixedUpdateColor = PreferenceTools.GetColorPref(FIXED_UPDATE_COLOR_PREF_KEY, DEFAULT_FIXED_UPDATE_COLOR);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return _fixedUpdateColor.Value;
|
|
72
|
+
}
|
|
73
|
+
set
|
|
74
|
+
{
|
|
75
|
+
_fixedUpdateColor = value;
|
|
76
|
+
EditorPrefs.SetString(FIXED_UPDATE_COLOR_PREF_KEY, value.ToHexWithAlpha());
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/// <summary>
|
|
81
|
+
/// The color shown for visual debug editor UX for <see cref="IUpdateSystem"/>.
|
|
82
|
+
/// </summary>
|
|
83
|
+
public static Color UpdateColor
|
|
84
|
+
{
|
|
85
|
+
get
|
|
86
|
+
{
|
|
87
|
+
if (!_updateColor.HasValue)
|
|
88
|
+
{
|
|
89
|
+
_updateColor = PreferenceTools.GetColorPref(UPDATE_COLOR_PREF_KEY, DEFAULT_UPDATE_COLOR);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return _updateColor.Value;
|
|
93
|
+
}
|
|
94
|
+
set
|
|
95
|
+
{
|
|
96
|
+
_updateColor = value;
|
|
97
|
+
EditorPrefs.SetString(UPDATE_COLOR_PREF_KEY, value.ToHexWithAlpha());
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/// <summary>
|
|
102
|
+
/// The color shown for visual debug editor UX for <see cref="IUpdateSystem"/>.
|
|
103
|
+
/// </summary>
|
|
104
|
+
public static Color LateUpdateColor
|
|
105
|
+
{
|
|
106
|
+
get
|
|
107
|
+
{
|
|
108
|
+
if (!_lateUpdateColor.HasValue)
|
|
109
|
+
{
|
|
110
|
+
_lateUpdateColor = PreferenceTools.GetColorPref(LATE_UPDATE_COLOR_PREF_KEY, DEFAULT_LATE_UPDATE_COLOR);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return _lateUpdateColor.Value;
|
|
114
|
+
}
|
|
115
|
+
set
|
|
116
|
+
{
|
|
117
|
+
_lateUpdateColor = value;
|
|
118
|
+
EditorPrefs.SetString(LATE_UPDATE_COLOR_PREF_KEY, value.ToHexWithAlpha());
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/// <summary>
|
|
123
|
+
/// The color shown for visual debug editor UX for <see cref="IReactiveSystem"/>.
|
|
124
|
+
/// </summary>
|
|
125
|
+
public static Color ReactiveColor
|
|
126
|
+
{
|
|
127
|
+
get
|
|
128
|
+
{
|
|
129
|
+
if (!_reactiveColor.HasValue)
|
|
130
|
+
{
|
|
131
|
+
_reactiveColor = PreferenceTools.GetColorPref(REACTIVE_COLOR_PREF_KEY, DEFAULT_REACTIVE_COLOR);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return _reactiveColor.Value;
|
|
135
|
+
}
|
|
136
|
+
set
|
|
137
|
+
{
|
|
138
|
+
_reactiveColor = value;
|
|
139
|
+
EditorPrefs.SetString(REACTIVE_COLOR_PREF_KEY, value.ToHexWithAlpha());
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// <summary>
|
|
144
|
+
/// The color shown for visual debug editor UX for average.
|
|
145
|
+
/// </summary>
|
|
146
|
+
public static Color AverageColor
|
|
147
|
+
{
|
|
148
|
+
get
|
|
149
|
+
{
|
|
150
|
+
if (!_averageColor.HasValue)
|
|
151
|
+
{
|
|
152
|
+
_averageColor = PreferenceTools.GetColorPref(AVERAGE_COLOR_PREF_KEY, DEFAULT_AVERAGE_COLOR);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return _averageColor.Value;
|
|
156
|
+
}
|
|
157
|
+
set
|
|
158
|
+
{
|
|
159
|
+
_lateUpdateColor = value;
|
|
160
|
+
EditorPrefs.SetString(AVERAGE_COLOR_PREF_KEY, value.ToHexWithAlpha());
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// Cache
|
|
165
|
+
private static int? _systemWarningThreshold;
|
|
166
|
+
private static Color? _fixedUpdateColor;
|
|
167
|
+
private static Color? _updateColor;
|
|
168
|
+
private static Color? _lateUpdateColor;
|
|
169
|
+
private static Color? _reactiveColor;
|
|
170
|
+
private static Color? _averageColor;
|
|
171
|
+
|
|
172
|
+
// Defaults
|
|
173
|
+
private const int DEFAULT_VALUE = 5;
|
|
174
|
+
private static readonly Color DEFAULT_UPDATE_COLOR = new Color(0.407f, 0f, 1f); // Purple
|
|
175
|
+
private static readonly Color DEFAULT_FIXED_UPDATE_COLOR = Color.cyan;
|
|
176
|
+
private static readonly Color DEFAULT_LATE_UPDATE_COLOR = Color.green;
|
|
177
|
+
private static readonly Color DEFAULT_REACTIVE_COLOR = Color.white;
|
|
178
|
+
private static readonly Color DEFAULT_AVERAGE_COLOR = Color.yellow;
|
|
179
|
+
|
|
180
|
+
// Pref Keys
|
|
181
|
+
private const string SYSTEM_WARNING_THRESHOLD_PREF_KEY = "EntitasRedux.VisualDebugging.SystemWarningThreshold";
|
|
182
|
+
private const string FIXED_UPDATE_COLOR_PREF_KEY = "EntitasRedux.VisualDebugging.FixedUpdateColor";
|
|
183
|
+
private const string UPDATE_COLOR_PREF_KEY = "EntitasRedux.VisualDebugging.UpdateColor";
|
|
184
|
+
private const string LATE_UPDATE_COLOR_PREF_KEY = "EntitasRedux.VisualDebugging.LateUpdateColor";
|
|
185
|
+
private const string REACTIVE_COLOR_PREF_KEY = "EntitasRedux.VisualDebugging.ReactiveColor";
|
|
186
|
+
private const string AVERAGE_COLOR_PREF_KEY = "EntitasRedux.VisualDebugging.AverageColor";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "EntitasRedux.VisualDebugging",
|
|
3
|
+
"rootNamespace": "",
|
|
4
|
+
"references": [
|
|
5
|
+
"GUID:53bc2da9556d30547913e5a8aa819794"
|
|
6
|
+
],
|
|
7
|
+
"includePlatforms": [],
|
|
8
|
+
"excludePlatforms": [],
|
|
9
|
+
"allowUnsafeCode": false,
|
|
10
|
+
"overrideReferences": false,
|
|
11
|
+
"precompiledReferences": [
|
|
12
|
+
"EntitasRedux.Core.dll"
|
|
13
|
+
],
|
|
14
|
+
"autoReferenced": true,
|
|
15
|
+
"defineConstraints": [],
|
|
16
|
+
"versionDefines": [],
|
|
17
|
+
"noEngineReferences": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 UnityEngine;
|
|
27
|
+
|
|
28
|
+
namespace JCMG.EntitasRedux.VisualDebugging
|
|
29
|
+
{
|
|
30
|
+
internal static class GameObjectDestroyExtensions
|
|
31
|
+
{
|
|
32
|
+
public static void DestroyGameObject(this GameObject gameObject)
|
|
33
|
+
{
|
|
34
|
+
if (Application.isPlaying)
|
|
35
|
+
{
|
|
36
|
+
Object.Destroy(gameObject);
|
|
37
|
+
}
|
|
38
|
+
else
|
|
39
|
+
{
|
|
40
|
+
Object.DestroyImmediate(gameObject);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|