public void OnDeleteTypeButton(DeleteTypeEvent ev) { if (!Remote) { _engine.RemoveTypes(ev.TypeID); } else { _engineRemote.RemoveTypes(ev.TypeID); } }
void RemoveTypeTest() { _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.RemoveTypes("TestType"); _engine.CompileCode("DynamicType dt = new DynamicType(); dt.CreateGameObject();"); //Assert Assert.IsTrue(!_lastCompilationSucceeded); }