GithubHelp home page GithubHelp logo

bkeiren / awesomiumunity Goto Github PK

View Code? Open in Web Editor NEW
108.0 108.0 74.0 214 KB

Third-party Awesomium wrapper for Unity3D, wrapping Awesomium's C++ API with a custom C# API and accompanying Unity MonoBehaviour components.

C# 59.27% CSS 0.46% PHP 1.07% C 0.18% C++ 39.02%

awesomiumunity's People

Contributors

bkeiren avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesomiumunity's Issues

Update the readme.

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.

GOT DOWNLOAD TO WORK!

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

License?

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.

WebGL Support

Hello,

i have problems running WebGL. This site tells me it is not supported. Can you elaborate on the state of WebGL?

Thank you.

Unity3D: Not working at all

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.

DllNotFoundException: AwesomiumUnity

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)

Crashes

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.

Webtexture with Canvas Renderer & AwesomiumUnity.DLL

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.

Move to 64-bit

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.

Cross Domain / Loading from file://

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

Cannot See Page

Using the sample code,i still cannot view page through texture

Can you create example project? Still DllNotFoundException: Assets/Plugins/x86/AwesomiumUnity.dll

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)

Is it possible to change the useragent for webview?

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?

Works perfect in editor, but can't show texture on a plane in standalone exe

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.

Opening new tabs (using ShowCreatedWebView event)

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.

login button and text selection problems

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!

Universal Windows Apps

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):

stacktrace


Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention

Event Log Data:

Faulting application name: WebBrowser.exe, version: 0.0.0.0, time stamp: 0x56c6997e
Faulting module name: UnityPlayer.dll, version: 5.5.0.0, time stamp: 0x58371462
Exception code: 0x4000001f
Fault offset: 0x03d2a65c
Faulting process id: 0x367c
Faulting application start time: 0x01d26c57a96aca07
Faulting application path: C:\Dev\Hololens\Testing\WebBrowser\WindowsUniversalApp\WebBrowser\bin\x86\Debug\AppX\WebBrowser.exe
Faulting module path: C:\Dev\Hololens\Testing\WebBrowser\WindowsUniversalApp\WebBrowser\bin\x86\Debug\AppX\UnityPlayer.dll
Report Id: 04632150-9880-42d8-94c7-8feaaae43de4
Faulting package full name: WebBrowser_1.0.0.0_x86__pzq3xp76mxafg
Faulting package-relative application ID: App

Thank You,

Greg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.