コード例 #1
0
ファイル: EditorIconGUIContent.cs プロジェクト: uiopsczc/Test
        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);
        }
コード例 #2
0
ファイル: EditorIconGUIContent.cs プロジェクト: uiopsczc/Test
        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);
        }