Пример #1
0
        private void DoLoadListFile()
        {
            if (null == ListFile || !ListFile)
            {
                return;
            }

            Data = ShaderGenData.FromJson(ListFile.text);
        }
Пример #2
0
 public override void OnEnable()
 {
     try
     {
         Data = ShaderGenData.FromJson(LoadSettings());
     }
     catch (Exception)
     {
     }
 }
Пример #3
0
        private void DoSaveListFile()
        {
            string _js = ShaderGenData.ToJson(Data);

            if (null == ListFile || !ListFile)
            {
                string _assetPath = System.IO.Path.GetDirectoryName(Data.Templates[0]) + "/ListFile.txt";
                ListFile = CreateAsset <TextAsset>(_assetPath);
            }

            WriteAsset(ListFile, _js);
        }
Пример #4
0
        void DoLoadListFile()
        {
            if (null == ListFile || !ListFile)
                return;

            Data = ShaderGenData.FromJson(ListFile.text);
        }
Пример #5
0
 public static string ToJson(ShaderGenData _io)
 {
     return JsonUtility.ToJson(_io);
 }
Пример #6
0
        public override void OnEnable()
        {
            try
            {
                Data = ShaderGenData.FromJson(LoadSettings());
            }
            catch(Exception)
            {

            }
        }
Пример #7
0
 public void CopyTo(ref ShaderGenData _data)
 {
     _data.SetTemplates(this.LastAssets);
 }
Пример #8
0
 public void CopyFrom(ref ShaderGenData _data)
 {
     this.LastAssets = _data.GetTemplates();
 }
Пример #9
0
 public override void OnDisable()
 {
     SaveSettings(ShaderGenData.ToJson(Data));
 }
Пример #10
0
 public void CopyTo(ref ShaderGenData _data)
 {
     _data.SetTemplates(this.LastAssets);
 }
Пример #11
0
 public void CopyFrom(ref ShaderGenData _data)
 {
     this.LastAssets = _data.GetTemplates();
 }
Пример #12
0
 public static string ToJson(ShaderGenData _io)
 {
     return(JsonUtility.ToJson(_io));
 }