Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity3d plugin for embedding webpages on WINDOWS is ready!

Discussion in 'Made With Unity' started by lubo3d, Mar 24, 2011.

  1. Jenson

    Jenson

    Joined:
    Sep 19, 2011
    Posts:
    5
    The pictures in my reply above is invalid.


    I have some problems:
    1.run UnityWebCoreDemo.bat and it's like this:

    the words are unnormal and fhe fps is low

    2.run UnityWebCoreDemo.exe ,it's like this:

    a black plane ,but the words and the fps are normal

    3.Set the "BForce OpenGL" to false in UnityWebCoreView.cs in the project of the demo,rebuild it and run,picture is below:
    http://hi.csdn.net/attachment/201109/19/0_1316417236E2br.gif

    a black background and only has a gray

    4.In Unity Editor,no matter the BForce OpenGL is true or false, there is no effect:
    http://hi.csdn.net/attachment/201109/19/0_13164173193icy.gif

    but it has color ,not only gray


    My os is windows 7 and the Unity is not a pro version.
     
  2. Jenson

    Jenson

    Joined:
    Sep 19, 2011
    Posts:
    5
    the pictures is invalid too.....
    copy the url and re-open it can be work
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The Editor can't be forced into OpenGL mode its always in DX, so 4 is to be expected.

    The only way to performantly draw on a texture is forcing opengl which out of any halfway professional view is a big no go as it works badly and has a plentitude of problems.

    you might actually want to look into the Awesonium thread where a solution for Unity is provided, it works independent of force opengl
     
  4. Jenson

    Jenson

    Joined:
    Sep 19, 2011
    Posts:
    5
    Does Aweronium works better than the WebCore Plugin?

    If I update my Unity to a professional ,can this problem be solved?
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The problem of it not working in the editor is not changeable at all. The editor is always in DX mode and in DX mode you can't draw on a render textuer from a plugin which is the root behind the issue you see here.
    The same would happen on old intels or crappy ati drivers.

    The Awesonium does not use render texture drawing from the plugin so yes it works better (and awesonium out of the box is already a game engine focused browser with some years of track record on that end)
     
  6. Jenson

    Jenson

    Joined:
    Sep 19, 2011
    Posts:
    5
    Got it
    Thanks a lot
     
  7. unitydevist

    unitydevist

    Joined:
    Feb 3, 2009
    Posts:
    45
    +1 for wanting Mac support, Awesomium 1.6.2 has a strange bug for me and crashes on Mac but works on Windows. HTMLTexture isn't 3 compatible and that leaves me only FormattedLabel for doing rich text at all. Any ideas for doing his on Mac at this time?
     
  8. Krodil

    Krodil

    Joined:
    Jun 30, 2010
    Posts:
    141
    hey Lubo,
    Is it possible to communicate with the browser code thorugh variables in unity?
    Lets say I want to change the browser content/window when certain things occur?
     
  9. lubo3d

    lubo3d

    Joined:
    Mar 23, 2011
    Posts:
    75
    Unity code(C#) of course can communicate with the embedded browser(javascript). See the local html demo of the UnityWebcore project.


     
  10. Krodil

    Krodil

    Joined:
    Jun 30, 2010
    Posts:
    141
    lubo3d: I will probably figure it out. Do you have some pointers for assigning different urls upon variables?
    another thing: my mouse icon is really not showing up in the viewport.. this is weird, last time (spring) I looked at this tool it worked perfectly.
     
  11. nafonso

    nafonso

    Joined:
    Aug 10, 2006
    Posts:
    377
    Can anybody tell me if there's a mac version coming too?

    Regards,
    Afonso
     
  12. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,051
    This is incorrect, its perfectly possible to run the windows editor in opengl I do it quite often.
    Simply make a shortcut to Unity.exe (place it on your desktop) and in its properties add ' -force-opengl' to the target.
    Now to run the editor in opengl mode simply double click the shortcut.

    It will even say 'opengl' in the editors windowbar.
     
  13. Rendang1963

    Rendang1963

    Joined:
    Oct 19, 2009
    Posts:
    8
    I have been trying out the UnityWebCoreDemo.bat, and the fact that I can load flash movies from a local destination onto a texture with a much higher quality than the OGG Theora format is exciting. However I am experiencing a staggering playback even though the FPS is showing me a refresh rate of around 1700 fps. The .flv file is fine as it plays smooth in the adobe flashplayer. I could not have a look at the project itself as I am not running UnityPro. I am actualy making an upgrade depending on being able to playback movies at a satisfying Quality in Unity.

    Is it possible to improve the movie playback framrate, as right now it oviously is not playing back at the original 30fps I encoded it with?

    regards,
    Martin
     
  14. fastcall.81

    fastcall.81

    Joined:
    May 24, 2012
    Posts:
    3
  15. lubo3d

    lubo3d

    Joined:
    Mar 23, 2011
    Posts:
    75
    fastcall,

    Please try to change the default resolution in ControlWindow.cs to 1024x576 and run it in OpenGL mode, will this problem still exist?
     
  16. fastcall.81

    fastcall.81

    Joined:
    May 24, 2012
    Posts:
    3
    Result:
    i use UnityWebCoreDemo.bat. OpenGL mode.
    https://www.dropbox.com/s/mf1919m692114yi/same.png

    Result the same.
     
  17. lubo3d

    lubo3d

    Joined:
    Mar 23, 2011
    Posts:
    75
    fastcall,

    If OpenGL runs on some graphics like "Intel integrated", lower version of OpenGL driver will only allow 2power(n) as the width/height of one texture. So 576 will be enlarged into 1024.

    There are two ways as the workaround:
    (1)Specify the size of the texture to 2power(n), and change the size of the plan.
    (2)Specify the size of the texture to the size needed, and render the affected part to the destination.

    Method (1) loses some performance and Method(2) needs to do some display card related switch if needed.

    Anyway this problem might gone in some discrete graphics like Nvidia or ATI or higher version of graphic driver.

    Hope it helps.
     
  18. fastcall.81

    fastcall.81

    Joined:
    May 24, 2012
    Posts:
    3
    Thank you for answer. Method 2 is good, but i don't understand how i can render part to destination.
    I have only:

    void Update()
    {
    if (m_bInitialized)
    {
    UnityWebCore.Update();
    if (UnityWebCore.IsDirty(m_TextureID))
    {
    m_texture.SetPixels(m_pixels, 0);
    m_texture.Apply();
    }

    }

    And my card is NVidia GeForce GTX 560 Ti with the latest drivers.
    Thanks anyway for your help.
     
  19. lubo3d

    lubo3d

    Joined:
    Mar 23, 2011
    Posts:
    75
    Method 2 can only be implemented in UnityWebCore plugin. The latest Unity can support using OpenGL directly in Unity scripts. You can try it.
     
  20. skina

    skina

    Joined:
    Jun 2, 2012
    Posts:
    2
    Hi there!
    First of all: Great Work! Had lots of fun playing with it.

    Now I'm having a small problem.. even thought I can send commands to a playing flash app I cant receive any...
    Considering your example where do I have to put this?
    public static extern void AddJSCallback(int webViewId, string funcName, JSCallbackDelFunc func);

    I currently have in WebView:
    public void registerCallBacks()
    {
    UnityWebCore.AddJSCallback(m_TextureID,"ResizePlayer",testGet);
    Debug.Log("registered");
    }

    public void testGet(string args)
    {
    Debug.Log("GotSom");
    }

    Should it be? "document['FlashOject'].ResizePlayer" it does not work either..

    Any help would be great!
    Sorry for my English.
    skina
     
  21. lubo3d

    lubo3d

    Joined:
    Mar 23, 2011
    Posts:
    75

    "document['FlashOject'].ResizePlayer" is used to call the API defined in flash AS script from the javascript in webpage.

    You can learn the example for how to communicate from javascript in webpage to Unity scripts. If that works, just send the message from flash to javascript in webpage. javascript only play the delegate. Flash can even communicate with Unity scripts directly.
     
  22. skina

    skina

    Joined:
    Jun 2, 2012
    Posts:
    2
    Thanks I think I understood your answer but I still have some doubts,
    In the flash file when I say ExternalInterface.call("UnityWebCore.FuncInUnity", arguments) is the UnityWebCore prefix mandatory?
     
  23. gaojinjing

    gaojinjing

    Joined:
    Jun 28, 2012
    Posts:
    10
    I want to know webCore open web content on there?
    3Q!
     
  24. HsmBoy

    HsmBoy

    Joined:
    Aug 1, 2012
    Posts:
    3
    hello ,it's really cool,I tried it ,but when you have two cameras in one scene ,it didn't work ?
    how can i solve it ?
     
  25. desperado1022

    desperado1022

    Joined:
    Aug 16, 2012
    Posts:
    1
    Grayscale...

    Hey I build a new .exe from UnityWebCoreDemoProject.7z and force run it in OpenGL mode but only get a grayscale view.

    Can anyone help? I didn't change any code in this project. My Unity3D version is 3.5.3.

    Here is the screenshot.
    www.oottimo.netai.net/public/2012-08-17_012534.png
     
  26. DrShimizu

    DrShimizu

    Joined:
    Apr 13, 2011
    Posts:
    30
    You need pay money to register it.
     
  27. forall02

    forall02

    Joined:
    Nov 29, 2012
    Posts:
    5
    DllNotFoundException: UnityWebCore

    It work , but website not show
     
  28. CasualT

    CasualT

    Joined:
    Dec 11, 2012
    Posts:
    3
    I'm trying to connect to a GAE server from within Unity and I need a web javascript engine to process channel messages sent from the server. I started using unity-webview https://github.com/gree/unity-webview which works fine for its supported OSes. However I need a solution for Windows.

    So that lead me to your plugin. It navigates to and displays most pages correctly, although Google shows up with a black background. However, it isn't processing my javascript correctly, even though it works in a Chrome browser window.

    The main command that isn't running looks like this:
    var socket = new goog.appengine.Channel('<Big GUID String>').open(handler);

    Any idea why this wouldn't work?
     
  29. sheshupag

    sheshupag

    Joined:
    Nov 26, 2012
    Posts:
    1
    Yes, its awesome, but

    iam not able load the page; it shows blank image for any website;

    Please help me; its very important for me;

    Thank you
     
  30. ykdoubles

    ykdoubles

    Joined:
    Feb 7, 2013
    Posts:
    1
    You might need to read Readme-force-opengl.txt before running the demo.

     
  31. unityareality1

    unityareality1

    Joined:
    Mar 19, 2013
    Posts:
    2
    Sorry guys, I'm quite new to all stuff. And I need some UnityWebCore.InjectKeyboard example. Could anyone give me some?
     
  32. unityareality1

    unityareality1

    Joined:
    Mar 19, 2013
    Posts:
    2
    Great! So how much and where?
     
  33. quickerqu

    quickerqu

    Joined:
    Oct 21, 2013
    Posts:
    1
    Could the webCore plugin can run on the Web player platform?
     
  34. rame16

    rame16

    Joined:
    Nov 21, 2012
    Posts:
    29
    It's a great feature. Too bad it does not work for the web player! @quickerqu : you should read the whole forum thread
     
  35. kristoof

    kristoof

    Joined:
    Aug 26, 2013
    Posts:
    89
    please help! it isnt work, i tried in forced opengl, without forced opengl, i maked a custom .bat for start, compatible mode, and it shows only blank page
    but the downloaded demo works fine, and works inside the editor too
    my unity version is 4.3
    os: win7 32bit with sp1

    $notwork.png
     
    Last edited: Jan 9, 2014
  36. Wollan

    Wollan

    Joined:
    Feb 13, 2014
    Posts:
    6
    Excellent plugin. Any plans for implementing HTML5 support?
     
  37. omidj

    omidj

    Joined:
    Apr 24, 2014
    Posts:
    3
    I cant use it!
    DllNotFoundException: htmlTexture
    htmlButton.Update () (at Assets/htmlButton.cs:109)
    Why?
     
  38. msmartins

    msmartins

    Joined:
    May 7, 2014
    Posts:
    3
    Where can I download UnityWebCoreDemo.7z?

    Thanks
     
  39. SunnyChow

    SunnyChow

    Joined:
    Jun 6, 2013
    Posts:
    360
    does it support transparency?
     
  40. spyketherobot

    spyketherobot

    Joined:
    Sep 25, 2012
    Posts:
    15
    link is dead
    pls reupload ;D
    thanks
    spk
     
  41. hassanayoub1985

    hassanayoub1985

    Joined:
    Oct 10, 2012
    Posts:
    30
    Hello sir,
    Are you going to support mobiles?
    And the download links are dead
     
    Stranger-Games likes this.
  42. BradOZman

    BradOZman

    Joined:
    Mar 10, 2016
    Posts:
    4
    The download links dont work :(
     
  43. BeyondTemptation

    BeyondTemptation

    Joined:
    Dec 18, 2016
    Posts:
    4
    Does somebody still have the working copy of this files?
     
  44. awesomeamyg

    awesomeamyg

    Joined:
    Dec 24, 2016
    Posts:
    1
    I am also interested in this plugin, but the provided source links don't work anymore
     
  45. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,663
    Please don't resurrect old threads. Besides, even if someone still has the files: chances are high that it won't work. The thread is from 2011 and the Unity Editor changed a lot in the last years.
     
  46. midnightcrawler1

    midnightcrawler1

    Joined:
    Jan 17, 2017
    Posts:
    15
    I really need this, if it's still supported please provide a link.
     
  47. Nour_Anwar1992

    Nour_Anwar1992

    Joined:
    Oct 22, 2017
    Posts:
    2
    where is the download link for this plugin ?