bkeiren / awesomiumunity Goto Github PK
View Code? Open in Web Editor NEWThird-party Awesomium wrapper for Unity3D, wrapping Awesomium's C++ API with a custom C# API and accompanying Unity MonoBehaviour components.
Third-party Awesomium wrapper for Unity3D, wrapping Awesomium's C++ API with a custom C# API and accompanying Unity MonoBehaviour components.
Please add to the usage instructions in readme to set the position of the gameobject to (0.5, 0.5, 0) and scale to 1. I have just spend an hour trying to figure out why I can't see anything on the screen.
And add that a 32-bit unity editor is needed and can be downloaded from the dropdown menu on the download page http://i.imgur.com/Z62HjCC.png
Cheers.
Added DownloadListener.h and DownloadListener.cpp, and made appropriate changes in both the exporting (c++ scripts) and importing (c# scripts) sides. I'm so excited about this! Finally seeing a file download almost made me cry! lol I am REALLY looking forward to cleaning my stuff up and adding it to your MASTERPIECE alongside the uGUI implementation (the new Unity UI) here on Github.
Just letting you know of this to remind you that this treasure is VERY FAR from being out-dated/dead! Sorry it had to be in the issues. :P
(Working with your code is SO awesome BTW. It's like one of those special snowflakes you rarely find! I envy your co-workers). :P
my webs with file downloads, I don't know how to set a download path or pop a download file UI!
thanks a lot
Hi all,
What license is this project released under? It's convention to have a LICENSE file, with the MIT/BSD/whatever text in there.
Hello,
i have problems running WebGL. This site tells me it is not supported. Can you elaborate on the state of WebGL?
Thank you.
Has anyone been able to get anything working at all with this recently? I am simply getting black textures and nothing happens (for example WebTextures, with the script component attached).
I am using Unity 5 on Windows 7 64bit.
Hi! We're excited about the prospects of this integration, but we're facing an issue.
Despite putting the AwesomiumUnity.dll file in the Assets/Plugins/ folder -- we've tested both the pre-build dlls provided by this package -- we're getting the following error with the example webtexture script when we try running the game. Any ideas why?
DllNotFoundException: AwesomiumUnity
AwesomiumUnityWebCore.get_IsRunning () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebCore.cs:140)
AwesomiumUnityWebCore.EnsureInitialized () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebCore.cs:146)
AwesomiumUnityWebTexture.Initialize () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebTexture.cs:71)
AwesomiumUnityWebTexture.Start () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebTexture.cs:99)
Awesomium 1.7.5.0
Unity 4.6.2f1 Pro
Windows 7 x64 (Admin acccount)
I just tried your Awesomium wrapper for Unity 4.5. Unfortunately, the Unity is crashing when I try to play.
Can you provide any support of your plugin/package or guide Awesomium-Unity integration.
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.
Though I would like to ask you the following things:
-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()?
EDIT: webpage is indeed loadable after making changes to both "Initialize()" and "OnMouseDown()", but uninteractive.
Here's the code for AwesomiumUnityWebTexture.Initialize() & AwesomiumUnityWebTexture.OnMouseDown()
public void Initialize()
{
m_HasBeenInitialized = true;
AwesomiumUnityWebCore.EnsureInitialized();
// Call resize which will create a texture and a webview for us if they do not exist yet at this point.
Resize(m_Width, m_Height);
var h = GetComponent<Image>();
if (h)
{
var piv = GetComponent<RectTransform>().pivot;
var myRect = new Rect();//GetComponent<RectTransform>().rect; produces a an error (current bug in unity 5.1.1f1)
myRect.x = myRect.y = 0;
myRect.width = m_Texture.width;
myRect.height = m_Texture.height;
var img = GetComponent<Image>();
img.sprite = Sprite.Create(m_Texture, myRect, piv);
}
}
//------------------------------------------OnMouseOver()------------------------------------------
void OnMouseOver()
{
if (!m_Interactive) return;
if (m_WebView != null /*&& !m_WebView.IsLoading*/)
{
//!--Maj
var img = GetComponent<Image>();
if (img)
{
float rectWidth = img.rectTransform.rect.width;
float rectHeight = img.rectTransform.rect.height;
float rectX = img.rectTransform.rect.x;
float rectY = img.rectTransform.rect.y;
int MouseX = (int)Input.mousePosition.x;
int MouseY = Screen.height - (int)Input.mousePosition.y;
MouseX = (int)(((MouseX - rectX) / rectWidth) * m_Width);
MouseY = (int)(((MouseY - rectY) / rectHeight) * m_Height);
m_WebView.InjectMouseMove(MouseX, MouseY);
}
}
}
-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.
Again 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.
Awesomium say in the next build they will support 64-bit operating systems. If you're still maintaining this it would be awesome(ium) if you upgraded this plugin to support 64-bit Unity!
Just a heads up.
Hi,
I'm using Angular.js to manage my game UI, but have not been able to work out how to enable cross-domain XMLHTTP requests for loading in view templates.
I have set WebSecurity = false in my websession settings, which from the code comments looked like it would allow file:// access, but I still get cross domain requests blocked.
Awesomium win-forms has a FileAccessFromFileURL property that can be set to allow this.
Is there something that I need to do in the cpp project and re-compile?
Thanks,
Lars
Using the sample code,i still cannot view page through texture
I have same problem with DllNotFoundException. And please, create example project. Thank you
DllNotFoundException: Assets/Plugins/x86/AwesomiumUnity.dll
AwesomiumUnityWebCore.get_IsRunning () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebCore.cs:140)
AwesomiumUnityWebCore.EnsureInitialized () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebCore.cs:146)
AwesomiumUnityWebTexture.Initialize () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebTexture.cs:71)
AwesomiumUnityWebTexture.Start () (at Assets/AwesomiumUnityScripts/AwesomiumUnityWebTexture.cs:99)
Hi,
this is great tool. However, one thing im trying and did not accomplish is that as you can see, right now the tool is using chrome 18. However, is it possible to initialize webcore with newer version of chrome, or just another browser?
I use Unity 5.4.4 32bits
no error in output log
I put all the dll in the build plugins folder
The exe can't show the texture of the website but it can do all the function of the website
ie: I go to a youtube website, you can hear the sound and pause it but nothing show
I don't even change a word of AwesomiumUnityWebTexture code
Do I miss some requirement of a standalone exe?
It just like I run in editor mode without AwesomiumUnity.dll.
But I put AwesomiumUnity.dll file in plugin folder under asset before I build.
Hey!
As the title says, I am trying to implement new-tab behavior in my application. Until now any new link opens in the same webview. I would like to handle new tabs generated from either: _target=”blank”, _target=”new”, window.open, or by manually triggering new tab behavior just like right clicking and opening a new tab in Chrome or Firefox (perhaps by manually calling TriggerShowCreatedWebView in AwesomiumUnityWebView.cs or maybe executing JS function window.open).
Am I on the right track? Is this the right way to do it? (Awesomium-wise not Unity-wise) Any further details and directions are highly appreciable.
I discovered a Unity specific issue with this implementation. The Shift works as a modifier for keys getting to upper case etc, but does not register on it's own as a Keypress / Keyrelease (i'm using unity 5.0.1f1 & the newest awesomium w/ this plugin).
Solved by adding an input hook on update that registers it's own versions of injected keypress/release for AwesomiumUnityVirtualKey.LSHIFT;
Thanks for your great work on this wrapper!
Hi,
have you tested this with a UWA? I'm seeing Win32 errors occuring when I try and execute and the texture remains blank.
You can test yourself in 5 minutes:
I followed the basic instructions you provided using a basic Plane and attached the WebRenderer and WebCore scripts. This works fine in the Unity Editor.
Change platform to Windows Store and set to Windows Universal 10 / Any Device / D3D / Local Machine.
Build and open generated project in VS2015.
Build works fine but trying to run / debug results in an Unhandled Win32 exception occured.
After manually attaching the UnityPlayer_UAP_x86_debug_dotnet.pdb and rerunning it appears to be dying in win32threads.cpp (Stack trace belpw):
Thank You,
Greg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.