Ejemplo n.º 1
0
 public void Before()
 {
     TestContainer      = new GameObject();
     buttonHandler      = TestContainer.AddComponent <ButtonHandler>();
     buttonHandler.name = "buttonHandler";
     // Testing MonoBehaviours requires taking manual control. Call a
     // protected method for setup.
     buttonHandler.Call("OnEnable");
 }
Ejemplo n.º 2
0
 public void After()
 {
     // Testing MonoBehaviours requires taking manual control. Call a
     // protected method for cleanup.
     buttonHandler.Call("OnDisable");
     if (TestContainer != null)
     {
         GameObject.DestroyImmediate(TestContainer);
     }
     TestContainer = null;
     buttonHandler = null;
 }