Skip to content

Instantly share code, notes, and snippets.

@prehnRA
Created September 28, 2016 13:34
Show Gist options
  • Save prehnRA/5302153e92d322fe5893af4db408dfb8 to your computer and use it in GitHub Desktop.
Save prehnRA/5302153e92d322fe5893af4db408dfb8 to your computer and use it in GitHub Desktop.
Unity editor script for running test every time code changes
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class StatsTest : MonoBehaviour {
[UnityEditor.Callbacks.DidReloadScripts]
private static void OnScriptsReloaded() {
Statistics stats = new Statistics();
stats.Run();
stats.Log();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment