コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: ICfg.cs プロジェクト: Hengle/Tools-3
 public static ICfg SaveToAssets(this ICfg s, string path, string filename)
 {
     FileSaveUtils.SaveBytesToAssetsByRelativePath(path, filename, s.Encode().ToString());
     return(s);
 }
コード例 #3
0
ファイル: ICfg.cs プロジェクト: Hengle/Tools-3
 public static ICfg SaveToPersistentPath(this ICfg s, string path, string filename)
 {
     FileSaveUtils.SaveJsonToPersistentPath(path, filename, s.Encode().ToString());
     return(s);
 }
コード例 #4
0
ファイル: ICfg.cs プロジェクト: Hengle/Tools-3
 public static ICfg SaveToResources(this ICfg s, string resFolderPath, string insideResPath, string filename)
 {
     FileSaveUtils.SaveBytesToResources(resFolderPath, insideResPath, filename, s.Encode().ToString());
     return(s);
 }