private void DoLoadListFile() { if (null == ListFile || !ListFile) { return; } Data = ShaderGenData.FromJson(ListFile.text); }
public override void OnEnable() { try { Data = ShaderGenData.FromJson(LoadSettings()); } catch (Exception) { } }
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); }
void DoLoadListFile() { if (null == ListFile || !ListFile) return; Data = ShaderGenData.FromJson(ListFile.text); }
public static string ToJson(ShaderGenData _io) { return JsonUtility.ToJson(_io); }
public override void OnEnable() { try { Data = ShaderGenData.FromJson(LoadSettings()); } catch(Exception) { } }
public void CopyTo(ref ShaderGenData _data) { _data.SetTemplates(this.LastAssets); }
public void CopyFrom(ref ShaderGenData _data) { this.LastAssets = _data.GetTemplates(); }
public override void OnDisable() { SaveSettings(ShaderGenData.ToJson(Data)); }
public static string ToJson(ShaderGenData _io) { return(JsonUtility.ToJson(_io)); }