static void St() { var gameObjs = EditorUtil.GetAllGameObjects(); var toF = RoFile.Join(EditorEnv.pj, "tmp/game_objects.json"); var data = new Hashtable(); gameObjs.Each(obj => { data[obj.name] = GetPropsHash(obj); }); RoFile.Write(toF, JSON.PrettyDump(data)); if (!EditorUtil.OpenWithRider(toF)) { Kernel.ToClip(toF); Kernel.Notify($"game objects json file path has cp to clip: {toF}"); } }
static void St() { if (ReceiveRiderCmd.serverIsStarted) { EditorUtil.SendCmdToRider("show_log"); } else { var toF = RoFile.Join(EditorEnv.pj, "tmp/err.log"); RoFile.Write(toF, errs.Map(err => { return(err.ToString()); }).Join("\n")); if (!EditorUtil.OpenWithRider(toF)) { Kernel.ToClip(toF); Kernel.Notify($"cp err.log path to clip: {toF}"); } } }
public static void St() { Thr(() => { var gitattrsPath = RoFile.Join(EditorEnv.pj, ".gitattributes"); if (!RoFile.IsFile(gitattrsPath)) { RoFile.Write(gitattrsPath, gitattributes); } var gitignorePath = RoFile.Join(EditorEnv.pj, ".gitignore"); if (!RoFile.IsFile(gitignorePath)) { RoFile.Write(gitignorePath, gitignore); } }); }
public static void St() { Thr(() => { var editorScriptsDir = RoFile.Join(EditorEnv.assetsPath, "EditorScript/Ro"); if (RoFile.IsDir(editorScriptsDir)) { var shouldMarkIf_UNITY_EDITOR_scripts = new List <string>(); RoFile.FF(editorScriptsDir).Each((path) => { if (path.IsMatch("\\.cs$") && !RoFile.Read(path).IsMatch("#if\\s+UNITY_EDITOR")) { Notify($"wrap with #if UNITY_EDITOR, script: {path}"); RoFile.Write(path, $"#if UNITY_EDITOR\n{RoFile.Read(path)}\n#endif"); } }); } // var shouldMarkStr = shouldMarkIf_UNITY_EDITOR_scripts.Map((script) => { return $" {script}"; }) // .Join("\n"); // throw new SystemException( // $"following scripts should mark #if UNITY_EDITOR\n{shouldMarkStr}"); }); }