Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

Now displays a SabreCSG icon in the hierarchy on CSG Models. #203

Merged
merged 2 commits into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Gizmos/SabreCSG16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions Gizmos/SabreCSG16.png.meta

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

8 changes: 8 additions & 0 deletions Scripts/CSGModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,14 @@ private void OnHierarchyItemGUI(int instanceID, Rect drawRect)
Graphics.DrawTexture(drawRect, SabreCSGResources.SubtractIconTexture, iconMaterial);
}
}
else if(gameObject.HasComponent<CSGModel>())
{
drawRect.xMax -= 2;
drawRect.xMin = drawRect.xMax - 16;
drawRect.height = 16;

Graphics.DrawTexture(drawRect, SabreCSGResources.SabreCSG16IconTexture);
}

if (EditMode)
{
Expand Down
8 changes: 8 additions & 0 deletions Scripts/UI/SabreCSGResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,14 @@ public static Texture2D CollisionIconTexture
}
}

public static Texture2D SabreCSG16IconTexture
{
get
{
return (Texture2D)LoadObject("Gizmos/SabreCSG16.png");
}
}

public static Texture2D DialogOverlayTexture
{
get
Expand Down