{"action":"created","issue":{"url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/6","labels_url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/6/comments","events_url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/6/events","html_url":"https://github.com/bkeiren/AwesomiumUnity/issues/6","id":92601235,"number":6,"title":"Webtexture with Canvas Renderer & AwesomiumUnity.DLL","user":{"login":"TheMajorO","id":13148907,"avatar_url":"https://avatars.githubusercontent.com/u/13148907?v=3","gravatar_id":"","url":"https://api.github.com/users/TheMajorO","html_url":"https://github.com/TheMajorO","followers_url":"https://api.github.com/users/TheMajorO/followers","following_url":"https://api.github.com/users/TheMajorO/following{/other_user}","gists_url":"https://api.github.com/users/TheMajorO/gists{/gist_id}","starred_url":"https://api.github.com/users/TheMajorO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheMajorO/subscriptions","organizations_url":"https://api.github.com/users/TheMajorO/orgs","repos_url":"https://api.github.com/users/TheMajorO/repos","events_url":"https://api.github.com/users/TheMajorO/events{/privacy}","received_events_url":"https://api.github.com/users/TheMajorO/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-07-02T10:07:38Z","updated_at":"2015-07-14T15:40:40Z","closed_at":null,"body":"Hey @bkeiren , thank you so much for this awesome refactored wrapper and for the decent features you implemented. Your instructions in README.MD led to a successful attempt of integrating Awesomium with Unity using your awesome wrapper on my 64-bit windows 7 and 32-bit Unity 5.1.\r\n\r\nThough I would like to ask you the following things:\r\n 1. Would kindly allow integration of AwesomiumUnityWebTexture.CS component with Canvas Renderer? I can only use either two methods: (Plane or any object with mesh renderer, material and collider OR deprecated GUITexture) I tried changing AwesomiumUnityWebTexture.CS, namely \"void Initalize()\", by creating a sprite using Texture2D attribute \"m_texture\" and assigning that sprite to Image component in a Canvas-child-object but that didn't work properly; image was uninteractive(it did view the page though). Perhaps I should also change OnMouseDown()?\r\n\r\nEDIT: webpage is indeed loadable after making changes to both \"Initialize()\" and \"OnMouseDown()\", but uninteractive.\r\nHere's the code for AwesomiumUnityWebTexture.Initialize() & AwesomiumUnityWebTexture.OnMouseDown()\r\n\r\n        public void Initialize()\r\n        {\r\n        m_HasBeenInitialized = true;\r\n\r\n        AwesomiumUnityWebCore.EnsureInitialized();\r\n\r\n        // Call resize which will create a texture and a webview for us if they do not exist yet at this point.\r\n        Resize(m_Width, m_Height);\r\n        var h = GetComponent<Image>();\r\n\r\n        if (h)\r\n        {\r\n            var piv = GetComponent<RectTransform>().pivot;\r\n            var myRect = new Rect();//GetComponent<RectTransform>().rect; produces a an error (current bug in unity 5.1.1f1)\r\n            myRect.x = myRect.y = 0;\r\n            myRect.width = m_Texture.width;\r\n            myRect.height = m_Texture.height;\r\n            var img = GetComponent<Image>();\r\n            img.sprite = Sprite.Create(m_Texture, myRect, piv);\r\n        }\r\n        }\r\n        //------------------------------------------OnMouseOver()------------------------------------------\r\n        void OnMouseOver()\r\n        {\r\n        if (!m_Interactive) return;\r\n\r\n        if (m_WebView != null /*&& !m_WebView.IsLoading*/)\r\n        {\r\n            //!--Maj\r\n            var img = GetComponent<Image>();\r\n            if (img)\r\n            {\r\n                float rectWidth =  img.rectTransform.rect.width;\r\n                float rectHeight =  img.rectTransform.rect.height;\r\n                float rectX =  img.rectTransform.rect.x;\r\n                float rectY =  img.rectTransform.rect.y;\r\n\r\n                int MouseX = (int)Input.mousePosition.x;\r\n                int MouseY = Screen.height - (int)Input.mousePosition.y;\r\n\r\n                MouseX = (int)(((MouseX - rectX) / rectWidth) * m_Width);\r\n                MouseY = (int)(((MouseY - rectY) / rectHeight) * m_Height);\r\n\r\n                m_WebView.InjectMouseMove(MouseX, MouseY);\r\n\r\n            }\r\n        }\r\n        }\r\n\r\n  2. Is it possible we view AwesomiumUnity.DLL? I couldn't decompile it since it's unmanaged C++ code. If it's a no then that is totally fine.\r\n\r\nAgain thank you so much for the hard work! I really hope you see this. I know you are really preoccupied but I believe in the potential of Awesomium and delighted with the easily understandable wrapper you wrote."},"comment":{"url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/comments/121285003","html_url":"https://github.com/bkeiren/AwesomiumUnity/issues/6#issuecomment-121285003","issue_url":"https://api.github.com/repos/bkeiren/AwesomiumUnity/issues/6","id":121285003,"user":{"login":"HodgsonSDAS","id":13334553,"avatar_url":"https://avatars.githubusercontent.com/u/13334553?v=3","gravatar_id":"","url":"https://api.github.com/users/HodgsonSDAS","html_url":"https://github.com/HodgsonSDAS","followers_url":"https://api.github.com/users/HodgsonSDAS/followers","following_url":"https://api.github.com/users/HodgsonSDAS/following{/other_user}","gists_url":"https://api.github.com/users/HodgsonSDAS/gists{/gist_id}","starred_url":"https://api.github.com/users/HodgsonSDAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HodgsonSDAS/subscriptions","organizations_url":"https://api.github.com/users/HodgsonSDAS/orgs","repos_url":"https://api.github.com/users/HodgsonSDAS/repos","events_url":"https://api.github.com/users/HodgsonSDAS/events{/privacy}","received_events_url":"https://api.github.com/users/HodgsonSDAS/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T15:40:40Z","updated_at":"2015-07-14T15:40:40Z","body":"Yes, I'm very much looking forward to @TheMajorO 's pull.  I've also been working on this same problem, but I'm guessing we're the only two with this need at the moment.  I'd like to also contribute, where I can.  Another interesting thing is I've implemented a custom Input Module for the Oculus, and I can get the interactions from it using Unity's `EventSystem`, but can't get the updated web page to render! haha.\r\n\r\nI did utilize that line of code you referenced, and it calls the method on each frame the `webView.isDirty` flag is changed, but it doesn't seem to update the `Texture2D`.\r\n"}}