void CompileTypeTest() { _engine.Reset(); //Setup string typeCode = @" public class DynamicType { public void CreateGameObject(){GameObject gob = new GameObject(""DynamicallyCreatedGO"");} } "; _engine.AddUsings("using UnityEngine;"); //Action _engine.CompileType("TestType", typeCode); _engine.CompileCode(@"DynamicType dt = new DynamicType();dt.CreateGameObject();"); _engine.ExecuteLastCompiledCode(); //Assert GameObject go = GameObject.Find("DynamicallyCreatedGO"); Assert.IsTrue(go != null); //TearDown Destroy(go); }