1.8.3: Added HideLabel attribute
This commit is contained in:
parent
61c7356b3a
commit
3259b62387
12 changed files with 97 additions and 8 deletions
39
Editor/Utilities/EditorIcons.cs
Normal file
39
Editor/Utilities/EditorIcons.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Module.Inspector.Editor.Utilities
|
||||
{
|
||||
internal static class EditorIcons
|
||||
{
|
||||
private static GUIContent CONTENT_WARNING;
|
||||
private static GUIContent CONTENT_ERROR;
|
||||
|
||||
private static GUIContent GetWarningIconContent()
|
||||
{
|
||||
if (CONTENT_WARNING == null)
|
||||
CONTENT_WARNING = EditorGUIUtility.IconContent("Warning");
|
||||
|
||||
return CONTENT_WARNING;
|
||||
}
|
||||
|
||||
private static GUIContent GetErrorIconContent()
|
||||
{
|
||||
if (CONTENT_ERROR == null)
|
||||
CONTENT_ERROR = EditorGUIUtility.IconContent("Error");
|
||||
|
||||
return CONTENT_ERROR;
|
||||
}
|
||||
|
||||
public static void SetWarningIcon(GUIContent content)
|
||||
{
|
||||
GUIContent errorContent = GetWarningIconContent();
|
||||
content.image = errorContent.image;
|
||||
}
|
||||
|
||||
public static void SetErrorIcon(GUIContent content)
|
||||
{
|
||||
GUIContent errorContent = GetErrorIconContent();
|
||||
content.image = errorContent.image;
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Editor/Utilities/EditorIcons.cs.meta
Normal file
3
Editor/Utilities/EditorIcons.cs.meta
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 07b74dac541c43cb8a89bd0a1b577ec1
|
||||
timeCreated: 1699115532
|
||||
Loading…
Add table
Add a link
Reference in a new issue