Skip to content

Commit

Permalink
Fix EntityLinkHierarchyIcon #843
Browse files Browse the repository at this point in the history
  • Loading branch information
sschmid committed Dec 15, 2018
1 parent da2ce12 commit 732251f
Show file tree
Hide file tree
Showing 11 changed files with 512 additions and 89 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ static Texture2D entityLinkHierarchyIcon {
}
}

static Texture2D entityLinkWarnHierarchyIcon {
get {
if (_entityLinkWarnHierarchyIcon == null)
{
_entityLinkWarnHierarchyIcon = EditorLayout.LoadTexture("l:EntitasEntityLinkWarnHierarchyIcon");
}
return _entityLinkWarnHierarchyIcon;
}
}

static Texture2D systemsHierarchyIcon {
get {
if (_systemsHierarchyIcon == null)
Expand All @@ -85,6 +95,7 @@ static Texture2D systemsErrorHierarchyIcon {
static Texture2D _entityHierarchyIcon;
static Texture2D _entityErrorHierarchyIcon;
static Texture2D _entityLinkHierarchyIcon;
static Texture2D _entityLinkWarnHierarchyIcon;
static Texture2D _systemsHierarchyIcon;
static Texture2D _systemsErrorHierarchyIcon;

Expand Down Expand Up @@ -148,13 +159,13 @@ static void onHierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
var entityLink = gameObject.GetComponent<EntityLink>();
if (entityLink != null)
{
if (entityLink.entity.isEnabled)
if (entityLink.entity != null)
{
GUI.DrawTexture(rect, entityLinkHierarchyIcon);
}
else
{
GUI.DrawTexture(rect, entityLinkHierarchyIcon);
GUI.DrawTexture(rect, entityLinkWarnHierarchyIcon);
}

return;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 732251f

Please sign in to comment.