public bool Inspect() { bool changed = false; if (dataExplorer.inspectedTag == -1) { this.inspect_Name(); if (Cfg != null && dataExplorer.tag.Length > 0 && icon.Save.Click("Save To Assets", ref changed)) { FileSaveUtils.SaveBytesToAssetsByRelativePath(Mgmt.fileFolderHolder, dataExplorer.tag, dataExplorer.data); UnityUtils.RefreshAssetDatabase(); } pegi.nl(); if (Cfg != null) { if (dataExplorer.tag.Length == 0) { dataExplorer.tag = Cfg.ToPegiString() + " config"; } "Save To:".edit(50, ref Mgmt.fileFolderHolder).changes(ref changed); var uObj = Cfg as UnityEngine.Object; if (uObj && icon.Done.Click("Use the same directory as current object.", ref changed)) { Mgmt.fileFolderHolder = uObj.GetAssetFolder(); } uObj.ClickHighlight().nl(ref changed); } "Comment:".editBig(ref comment).nl(ref changed); } dataExplorer.Nested_Inspect().changes(ref changed); return(changed); }
public static ICfg SaveToAssets(this ICfg s, string path, string filename) { FileSaveUtils.SaveBytesToAssetsByRelativePath(path, filename, s.Encode().ToString()); return(s); }