This commit is contained in:
Mikhail 2023-06-06 17:52:12 +08:00
parent ac61817307
commit 45cbf45d13
2 changed files with 10 additions and 1 deletions

View File

@ -83,7 +83,9 @@ namespace DCFApixels.DragonECS
namespace Editors namespace Editors
{ {
using System.Collections.Generic;
using UnityEditor; using UnityEditor;
[CustomEditor(typeof(EcsEntityConnect))] [CustomEditor(typeof(EcsEntityConnect))]
public class EcsEntityEditor : Editor public class EcsEntityEditor : Editor
{ {
@ -136,6 +138,13 @@ namespace DCFApixels.DragonECS
EditorUtility.SetDirty(item); EditorUtility.SetDirty(item);
} }
} }
if (Target.IsAlive)
{
List<object> comps = new List<object>();
Target.World.GetComponents(Target.Entity.ID, comps);
GUILayout.TextArea(string.Join("\r\n", comps));
}
} }
} }
} }

View File

@ -6,7 +6,7 @@ namespace DCFApixels.DragonECS
{ {
public static Color GetUnityColor(this DebugColorAttribute self) public static Color GetUnityColor(this DebugColorAttribute self)
{ {
return new Color(self.rn, self.gn, self.bn); return new Color(self.r / 255f, self.g / 255f, self.b / 255f);
} }
public static Color32 GetUnityColor32(this DebugColorAttribute self) public static Color32 GetUnityColor32(this DebugColorAttribute self)
{ {