Inheritance: MonoBehaviour
コード例 #1
0
    // Use this for initialization
    void Start()
    {
        browserEventHandler = GetComponent <BrowserGUIEvents>();
        controlWindow       = GameObject.Find("ControlWindow").GetComponent <ControlWindow>();
        Debug.Log(width);
        InitAwesomium(width, height);

        //// Create texture in ARGB32 format
        //m_texture = new Texture2D(width, height, TextureFormat.ARGB32, true);
        ////Get Color[] (pixels) from texture
        //m_pixels = m_texture.GetPixels(0);
        //// Create window handle id - future usage
        //m_TextureID = m_texture.GetInstanceID();
        //// assign m_texture to this GUITexture texture
        //gameObject.renderer.material.mainTexture = m_texture;
        //// Create GCHandle - Allocation of m_pixels in memory.
        //m_pixelsHandler = GCHandle.Alloc(m_pixels, GCHandleType.Pinned);

        ////Map delegates
        ////m_setPixelsFunction = this.SetPixels;
        ////m_applyPixelsFunction = this.ApplyPixels;
        ////AwesomiumWrapper.SetDelegates(m_setPixelsFunction, m_applyPixelsFunction);

        //isAwesomiumInit = true;
        //AwesomiumWrapper.init(m_pixelsHandler.AddrOfPinnedObject(), width, height);
    }
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        browserEventHandler = GetComponent<BrowserGUIEvents>();
        controlWindow = GameObject.Find("ControlWindow").GetComponent<ControlWindow>();
        Debug.Log(width);
        InitAwesomium(width,height);

        //// Create texture in ARGB32 format
        //m_texture = new Texture2D(width, height, TextureFormat.ARGB32, true);
        ////Get Color[] (pixels) from texture
        //m_pixels = m_texture.GetPixels(0);
        //// Create window handle id - future usage
        //m_TextureID = m_texture.GetInstanceID();
        //// assign m_texture to this GUITexture texture
        //gameObject.renderer.material.mainTexture = m_texture;
        //// Create GCHandle - Allocation of m_pixels in memory.
        //m_pixelsHandler = GCHandle.Alloc(m_pixels, GCHandleType.Pinned);

        ////Map delegates
        ////m_setPixelsFunction = this.SetPixels;
        ////m_applyPixelsFunction = this.ApplyPixels;
        ////AwesomiumWrapper.SetDelegates(m_setPixelsFunction, m_applyPixelsFunction);

        //isAwesomiumInit = true;
        //AwesomiumWrapper.init(m_pixelsHandler.AddrOfPinnedObject(), width, height);
    }