private void OnGUI() { _scriptText = EditorGUILayout.TextArea(_scriptText, GUILayout.ExpandHeight(true)); if (GUILayout.Button("Run")) { var scriptHost = new CustomScriptHost(_rom); try { EditorUtility.DisplayProgressBar("Script execution", "Executing script...", 0f); scriptHost.ExecuteCSharp(_scriptText).Wait(); EditorUtility.DisplayProgressBar("Script execution", "Saving rom...", 0.7f); SkyEditorHelpers.SaveRom(_rom); } finally { EditorUtility.ClearProgressBar(); } } }
private void OnEnable() { _rom = SkyEditorHelpers.GetRom(); }
public static void TestSkyEditor() { Debug.Log(string.Join(",", SkyEditorHelpers.GetRom().GetStarters().Starters.Select(e => e.PokemonName))); }