public static GUIContent Get(string name) { if (iconGUIContentCacheDict.ContainsKey(name)) { return(iconGUIContentCacheDict[name]); } GUIContent guiContent = new GUIContent(EditorIconTexture.GetCustom(name)); iconGUIContentCacheDict.Add(name, guiContent); return(guiContent); }
public static GUIContent Get(string name, string text, string tips) { if (iconGUIContentCacheDict.ContainsKey(name)) { return(iconGUIContentCacheDict[name]); } GUIContent guiContent = new GUIContent(text, EditorIconTexture.GetCustom(name), tips); iconGUIContentCacheDict[name] = guiContent; return(guiContent); }