mirror of
https://github.com/DCFApixels/DragonECS-Unity.git
synced 2025-09-18 01:44:33 +08:00
Update PipelineMonitorEditor.cs
This commit is contained in:
parent
2adba2877d
commit
e79b75c81e
@ -19,13 +19,32 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
|
|
||||||
private void CopyToClipboard()
|
private void CopyToClipboard()
|
||||||
{
|
{
|
||||||
var names = Target.Pipeline.AllSystems.Select(o => {
|
var all = Target.Pipeline.AllSystems;
|
||||||
if(o is SystemsLayerMarkerSystem l)
|
string[] names = new string[all.Length];
|
||||||
|
for (int i = 0; i < all.Length; i++)
|
||||||
{
|
{
|
||||||
return $"[ {l.name} ]";
|
var system = all[i];
|
||||||
|
string name;
|
||||||
|
if (system is SystemsLayerMarkerSystem l)
|
||||||
|
{
|
||||||
|
name = $"[ {l.name} ]";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var meta = system.GetMeta();
|
||||||
|
MetaColor color;
|
||||||
|
if (meta.IsCustomColor)
|
||||||
|
{
|
||||||
|
color = meta.Color;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
color = EcsGUI.SelectPanelColor(meta, i, -1).ToMetaColor();
|
||||||
|
}
|
||||||
|
name = $"{meta.Name} : {meta.TypeName} : {meta.MetaID} : {color.colorCode:X8}";
|
||||||
|
}
|
||||||
|
names[i] = name;
|
||||||
}
|
}
|
||||||
return o.GetMeta().Name;
|
|
||||||
});
|
|
||||||
GUIUtility.systemCopyBuffer = string.Join("\r\n", names);
|
GUIUtility.systemCopyBuffer = string.Join("\r\n", names);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +72,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
|
|||||||
using (EcsGUI.Layout.BeginHorizontal())
|
using (EcsGUI.Layout.BeginHorizontal())
|
||||||
{
|
{
|
||||||
GUILayout.Label("[Systems]", _headerStyle, GUILayout.ExpandWidth(true));
|
GUILayout.Label("[Systems]", _headerStyle, GUILayout.ExpandWidth(true));
|
||||||
if(GUILayout.Button("Copy to Clipboard", GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
if (GUILayout.Button("Copy to Clipboard", GUILayout.ExpandWidth(false), GUILayout.ExpandHeight(true)))
|
||||||
{
|
{
|
||||||
CopyToClipboard();
|
CopyToClipboard();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user