Beispiel #1
0
        private void DoLoadListFile()
        {
            if (null == ListFile || !ListFile)
            {
                return;
            }

            Data = ShaderGenData.FromJson(ListFile.text);
        }
Beispiel #2
0
 public override void OnEnable()
 {
     try
     {
         Data = ShaderGenData.FromJson(LoadSettings());
     }
     catch (Exception)
     {
     }
 }
Beispiel #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);
        }
Beispiel #4
0
        void DoLoadListFile()
        {
            if (null == ListFile || !ListFile)
                return;

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

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