示例#1
0
    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
    }
示例#2
0
 public ZfBrowserImpl(ZenFulcrum.EmbeddedBrowser.Browser browser)
 {
     this.browser = browser;
     browserUI    = browser.GetComponentInChildren <ZenFulcrum.EmbeddedBrowser.PointerUIGUI>();
 }
 public void Start()
 {
     browser = GetComponent <Browser>();
 }