コード例 #1
0
        DirectorNamedColor LoadColorSkin(string path)
        {
            var asset = EditorGUIUtility.LoadRequired(path) as TextAsset;

            if (asset != null && !string.IsNullOrEmpty(asset.text))
            {
                return(DirectorNamedColor.CreateAndLoadFromText(asset.text));
            }

            return(m_DefaultSkinColors);
        }
コード例 #2
0
        private DirectorNamedColor LoadColorSkin(string path)
        {
            TextAsset          textAsset = EditorGUIUtility.LoadRequired(path) as TextAsset;
            DirectorNamedColor result;

            if (textAsset != null && !string.IsNullOrEmpty(textAsset.get_text()))
            {
                result = DirectorNamedColor.CreateAndLoadFromText(textAsset.get_text());
            }
            else
            {
                result = this.m_DefaultSkinColors;
            }
            return(result);
        }