mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 18:14:35 +08:00
Update systems debug
This commit is contained in:
parent
51df885c61
commit
27ab409a61
@ -52,7 +52,7 @@ namespace DCFApixels.DragonECS.Unity
|
|||||||
{
|
{
|
||||||
if (Target.source == null)
|
if (Target.source == null)
|
||||||
return;
|
return;
|
||||||
if(_headerStyle == null)
|
if (_headerStyle == null)
|
||||||
{
|
{
|
||||||
_headerStyle = new GUIStyle(EditorStyles.boldLabel);
|
_headerStyle = new GUIStyle(EditorStyles.boldLabel);
|
||||||
_interfacesStyle = new GUIStyle(EditorStyles.helpBox);
|
_interfacesStyle = new GUIStyle(EditorStyles.helpBox);
|
||||||
@ -67,10 +67,12 @@ namespace DCFApixels.DragonECS.Unity
|
|||||||
|
|
||||||
Target.showInterfaces = EditorGUILayout.Toggle("Show Interfaces", Target.showInterfaces);
|
Target.showInterfaces = EditorGUILayout.Toggle("Show Interfaces", Target.showInterfaces);
|
||||||
|
|
||||||
|
GUILayout.BeginVertical();
|
||||||
foreach (var item in Target.systems.AllSystems)
|
foreach (var item in Target.systems.AllSystems)
|
||||||
{
|
{
|
||||||
DrawSystem(item);
|
DrawSystem(item);
|
||||||
}
|
}
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
|
||||||
GUILayout.Label("[Runners]", _headerStyle);
|
GUILayout.Label("[Runners]", _headerStyle);
|
||||||
|
|
||||||
@ -82,12 +84,24 @@ namespace DCFApixels.DragonECS.Unity
|
|||||||
|
|
||||||
private void DrawSystem(IEcsSystem system)
|
private void DrawSystem(IEcsSystem system)
|
||||||
{
|
{
|
||||||
|
if(system is SystemsBlockMarkerSystem markerSystem)
|
||||||
|
{
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
GUILayout.BeginVertical(EcsEditor.GetStyle(Color.black));
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
GUILayout.Label("<");
|
||||||
|
GUILayout.Label($"{markerSystem.name}", EditorStyles.boldLabel);
|
||||||
|
GUILayout.Label(">", GUILayout.ExpandWidth(false));
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Type type = system.GetType();
|
Type type = system.GetType();
|
||||||
string name = type.Name;
|
string name = type.Name;
|
||||||
Color color = (GetAttribute<DebugColorAttribute>(type) ?? _fakeDebugColorAttribute).GetUnityColor();
|
Color color = (GetAttribute<DebugColorAttribute>(type) ?? _fakeDebugColorAttribute).GetUnityColor();
|
||||||
|
|
||||||
//Color defaultBackgroundColor = GUI.backgroundColor;
|
//Color defaultBackgroundColor = GUI.backgroundColor;
|
||||||
|
|
||||||
//GUI.backgroundColor = color;
|
//GUI.backgroundColor = color;
|
||||||
GUILayout.BeginVertical(EcsEditor.GetStyle(color));
|
GUILayout.BeginVertical(EcsEditor.GetStyle(color));
|
||||||
if (Target.showInterfaces)
|
if (Target.showInterfaces)
|
||||||
@ -96,7 +110,6 @@ namespace DCFApixels.DragonECS.Unity
|
|||||||
}
|
}
|
||||||
GUILayout.Label(name, EditorStyles.boldLabel);
|
GUILayout.Label(name, EditorStyles.boldLabel);
|
||||||
GUILayout.EndVertical();
|
GUILayout.EndVertical();
|
||||||
|
|
||||||
//GUI.backgroundColor = defaultBackgroundColor;
|
//GUI.backgroundColor = defaultBackgroundColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user