void StartPlay(string classname) { try { _playData = new UiData() { Fonts = Project.UiData.Fonts, Infocards = Project.UiData.Infocards, DataPath = Project.UiData.DataPath, FileSystem = Project.UiData.FileSystem, FlDirectory = Project.UiData.FlDirectory, ResourceManager = Project.UiData.ResourceManager, NavbarIcons = Project.UiData.NavbarIcons, NavmapIcons = Project.UiData.NavmapIcons, Resources = Project.UiData.Resources }; _playData.SetBundle(Compiler.Compile(Project.XmlFolder, Project.XmlLoader)); _playContext = new UiContext(_playData) { RenderContext = RenderContext }; _playContext.CommandBuffer = CommandBuffer; _playContext.GameApi = TestApi; _playContext.LoadCode(); _playContext.OpenScene(classname); playing = true; } catch (Exception e) { var detail = new StringBuilder(); BuildExceptionString(e, detail); CrashWindow.Run("Interface Edit", "Compile Error", detail.ToString()); } }