Skip to content

Instantly share code, notes, and snippets.

@majecty
Created October 25, 2016 05:52
Show Gist options
  • Save majecty/5d795ef878575561519bd5735da1c790 to your computer and use it in GitHub Desktop.
Save majecty/5d795ef878575561519bd5735da1c790 to your computer and use it in GitHub Desktop.
automatically stop editor just after compilation done
using UnityEngine;
using UnityEditor;
namespace Solitaire
{
public static class AppEditor
{
[UnityEditor.Callbacks.DidReloadScripts]
private static void OnScriptsReloaded()
{
if (!Application.isPlaying) return;
Debug.Log("stop playing, script reloaded");
// App.Inst.SkipBackgroundProcedure = true;
EditorApplication.isPlaying = false;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment