private void DelayedStart() { AppPath = Application.dataPath; // Init the build engine. Engine.skyMaterial = skyMaterial; Engine.xrRigObject = xrRigObject; Engine.xrPostProcess = xrPostProcess; Engine.Init(); //GlobalMembers.ud.warp_on = 1; //GlobalMembers.boardfilename = "e4l1.map"; //UnityEngine.XR.XRSettings.enabled = true; // This needs to be done in the main thread so we can do sound loading immediatly afterwords. GlobalMembers.conScript = new ConScript(new TrapEngine()); SoundEngine.globalSoundEngine.LoadAllSounds(); // Load in the game data. //Engine.initgroupfile("data.grp"); // // Init the device Engine.setgamemode(0, 320, 200, 8); _texture = new Texture2D(Engine._device._screenbuffer._width, Engine._device._screenbuffer._height, TextureFormat.BGRA32, false); canvasImage.texture = _texture; GlobalMembers.DukeMain(""); // Get everything setup. Engine.palette.UpdatePaletteMainThread(); handle = GCHandle.Alloc(Engine._device._screenbuffer.PresentedPixels, GCHandleType.Pinned); }
static void InitEditor() { GameEngine.AppPath = Application.dataPath; Engine.Init(); GlobalMembers.DukeMain(""); // Get everything setup. Engine.palette.UpdatePaletteMainThread(); }