Files
Cielonos/Packages/com.lunawolfstudios.scriptablesheets/Editor/Modules/Layout/Content/Content.cs
SoulliesOfficial 7ee2894a63 整合SLSUtilities
2026-01-17 11:35:49 -05:00

22 lines
620 B
C#

using UnityEditor;
using UnityEngine;
namespace LunaWolfStudiosEditor.ScriptableSheets.Layout
{
public class Content
{
// Workaround because Unity's default implementation for IconContent with a tooltip does not work.
public static GUIContent GetIconContent(string iconName, string tooltip)
{
var image = EditorGUIUtility.IconContent(iconName).image;
return new GUIContent(image, tooltip);
}
public static GUIContent GetIconContent(string iconName, string text, string tooltip)
{
var image = EditorGUIUtility.IconContent(iconName).image;
return new GUIContent(text, image, tooltip);
}
}
}