void Awake() { CodeBrowserWrapper codeBrowserWrapper = null; Util.FindIfNotSet(this, ref codeBrowserWrapper); Util.FindIfNotSet(this, ref voosEngine); Util.FindIfNotSet(this, ref cursorManager); Util.FindIfNotSet(this, ref behaviorSystem); browser = codeBrowserWrapper.GetCodeBrowser(); isEditorReady = false; InitializeJsEditor(); }
private void LazyInitialize() { Debug.Assert(basicCodeBrowser != null, "basicCodeBrowser property not set in CodeBrowserWrapper"); initialized = true; #if USE_ZFBROWSER basicCodeBrowser.gameObject.SetActive(false); ZenFulcrum.EmbeddedBrowser.Browser zfBrowser = gameObject.AddComponent <ZenFulcrum.EmbeddedBrowser.Browser>(); zfBrowser.Url = "localGame://gamebuilder/js-editor.html"; zfBrowser.allowContextMenuOn = ZenFulcrum.EmbeddedBrowser.BrowserNative.ContextMenuOrigin.Editable; ZenFulcrum.EmbeddedBrowser.PointerUIGUI pointerScript = gameObject.AddComponent <ZenFulcrum.EmbeddedBrowser.PointerUIGUI>(); pointerScript.enableMouseInput = true; pointerScript.enableTouchInput = true; pointerScript.enableInput = true; pointerScript.automaticResize = true; codeBrowser = new ZfBrowserImpl(zfBrowser); #else codeBrowser = basicCodeBrowser; // Don't do this: // basicCodeBrowser.gameObject.SetActive(true); // Because this causes the code browser to appear onscreen during init, // which we don't want. #endif }