Skip to content

Commit 732251f

Browse files
committed
Fix EntityLinkHierarchyIcon #843
1 parent da2ce12 commit 732251f

11 files changed

+512
-89
lines changed

Addons/Entitas.Unity.Editor/Entitas.Unity.Editor/Images/EntitasHeader.png.meta

Lines changed: 54 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Addons/Entitas.VisualDebugging.Unity.Editor/Entitas.VisualDebugging.Unity.Editor/EntitasHierarchyIcon.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ static Texture2D entityLinkHierarchyIcon {
6060
}
6161
}
6262

63+
static Texture2D entityLinkWarnHierarchyIcon {
64+
get {
65+
if (_entityLinkWarnHierarchyIcon == null)
66+
{
67+
_entityLinkWarnHierarchyIcon = EditorLayout.LoadTexture("l:EntitasEntityLinkWarnHierarchyIcon");
68+
}
69+
return _entityLinkWarnHierarchyIcon;
70+
}
71+
}
72+
6373
static Texture2D systemsHierarchyIcon {
6474
get {
6575
if (_systemsHierarchyIcon == null)
@@ -85,6 +95,7 @@ static Texture2D systemsErrorHierarchyIcon {
8595
static Texture2D _entityHierarchyIcon;
8696
static Texture2D _entityErrorHierarchyIcon;
8797
static Texture2D _entityLinkHierarchyIcon;
98+
static Texture2D _entityLinkWarnHierarchyIcon;
8899
static Texture2D _systemsHierarchyIcon;
89100
static Texture2D _systemsErrorHierarchyIcon;
90101

@@ -148,13 +159,13 @@ static void onHierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
148159
var entityLink = gameObject.GetComponent<EntityLink>();
149160
if (entityLink != null)
150161
{
151-
if (entityLink.entity.isEnabled)
162+
if (entityLink.entity != null)
152163
{
153164
GUI.DrawTexture(rect, entityLinkHierarchyIcon);
154165
}
155166
else
156167
{
157-
GUI.DrawTexture(rect, entityLinkHierarchyIcon);
168+
GUI.DrawTexture(rect, entityLinkWarnHierarchyIcon);
158169
}
159170

160171
return;

Addons/Entitas.VisualDebugging.Unity.Editor/Entitas.VisualDebugging.Unity.Editor/Images/EntitasContextErrorHierarchyIcon.png.meta

Lines changed: 47 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)