chore: Project Restructuring & Theatre
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#if UNITY_EDITOR
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
[InitializeOnLoad]
|
||||
public static class HierarchySectionHeader
|
||||
{
|
||||
static HierarchySectionHeader()
|
||||
{
|
||||
EditorApplication.hierarchyWindowItemOnGUI += HierarchyWindowItemOnGUI;
|
||||
}
|
||||
|
||||
static void HierarchyWindowItemOnGUI(int instanceID, Rect selectionRect)
|
||||
{
|
||||
var gameObject = EditorUtility.InstanceIDToObject(instanceID) as GameObject;
|
||||
|
||||
if (gameObject != null && gameObject.name.StartsWith("//", System.StringComparison.Ordinal))
|
||||
{
|
||||
EditorGUI.DrawRect(selectionRect, Color.grey);
|
||||
|
||||
EditorGUI.LabelField(selectionRect, gameObject.name.Replace("/", "").ToUpperInvariant(), new GUIStyle(EditorStyles.boldLabel)
|
||||
{
|
||||
fontSize = 12,
|
||||
alignment = TextAnchor.MiddleCenter,
|
||||
normal = { textColor = Color.black }
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user