uWebKit - Web Technology for Unity

Discussion in 'Assets and Asset Store' started by Mythos Labs, Sep 26, 2011.

  1. Dreamora

    Dreamora

    Member

    Joined:
    Apr 5, 2008
    Messages:
    26,586
    If unity ever allows native code, perhaps. But until then no as you can't hook in native code driven technology like webkit without native code ;)
  2. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
  3. achingupta87

    achingupta87

    New Member

    Joined:
    Apr 9, 2012
    Messages:
    145
    Hi Team

    I wants to use your sample browser in our project . But I have one issue in your sample browser. I wants to show alert message on particular condition but when I try to show that this alert is hide from your browser window. How It is possible to show alert message on that window??????????????

    please help
  4. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
    Alert messages are top level modal windows and are not supported (or very good style).

    You can use Javascript to open a popup window which contains whatever HTML you desire... or you can setup a javascript bridge callback and open either a new uWebKit view or show a Unity dialog with the string value passed to the callback method.

    - Mythos Labs
    Check out uWebKit!
  5. achingupta87

    achingupta87

    New Member

    Joined:
    Apr 9, 2012
    Messages:
    145
    Thanks Team for your quick reply

    I wants to know one more thing , actually I wants to show suggestion websites in the bottom of Text field in the sample browser. I wants to use List view here.........but I am not able to find this for your sample browser in unity. my 2nd option is that I try array of textfield for showing different suggestion website but here problem is that when the texfield try to appear on the browser rect it hide it . please help
  6. sleglik

    sleglik

    Member

    Joined:
    Jun 29, 2011
    Messages:
    679
    Are you planning increase width of web view for more than 1024 pixels? Modern devices has much bigger resolution than 1024 x 1024.
  7. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
  8. Yann

    Yann

    Member

    Joined:
    Oct 20, 2007
    Messages:
    423
    Congrats on the new release, it's good to see the product evolve. However, I am experiencing huge problems on a MacBook Pro Corei5 2.5 running a fresh install of Mountain Lion : be it with the Unity editor or with an OSX standalone, I constantly get a pretty frightening 32bit process named "UWKProcess" that eats 40% to 80% of CPU power, in any scene using uWebKit - including the demo scenes... is this normal behavior ?
  9. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
    Hello,

    Modern web browsers, such as Safari, Chrome, and IE, run web content in a separate process. This maintains the integrity of the main application and helps with performance and issues if a page becomes non-responsive.

    uWebKit also has this feature which ensures that your Unity applications memory and processor use are not impacted. If you are running an intensive page or one with video, the CPU may be used. Otherwise, the CPU usage should be modest as shown in the attached pic

    [​IMG]


    - Mythos Labs
    Check out uWebKit!
  10. Yann

    Yann

    Member

    Joined:
    Oct 20, 2007
    Messages:
    423
    @Mythos Labs : I was so astonished by your figures that I have been investigating the whole morning, and found the solution : those weird CPU peaks were caused by the 2010 MacBook Pro's dual graphic cards. CPU consumption doubles (sometimes even much more) when an external monitor is attached, which I had never done before. Now I'm back to much more reasonable performances, and can understand why the very same Unity scene was performing way better on an iPad 2 than on my MB Pro... so thank you very much for your answer.

    Now that I'm fully reassured about the toolset, I take this opportunity to announce that our current project is an iPad-centered social productivity app, 100% made with Unity... and that uWebKit Pro will play an important part in it. Keep on the good work.
    Last edited: Aug 31, 2012
  11. franky303

    franky303

    New Member

    Joined:
    Aug 27, 2012
    Messages:
    10
  12. rudolfwm

    rudolfwm

    New Member

    Joined:
    Apr 17, 2009
    Messages:
    11
    Why is there no roadmap for android? Or has this changed?

    That would make your solution more viable.
  13. dansav

    dansav

    New Member

    Joined:
    Sep 22, 2005
    Messages:
    329
    How do you do a local file for ios?
  14. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
    @rudolfwm: uWebKit currently supports the OSX, Windows, Windows 64 bit, and iOS targets. It is by far most licensed for standalone desktop applications. Android isn't possible for us to support at this time as we're a small indie studio and Android suffers from hardware/OS fragmentation.

    @dansav: Place files into the StreamingAssets folder, these will be transferred to XCode, and on iOS these will be available under Application.dataPath + "/Raw"

    We'll be releasing uWebKit 1.4 shortly after Unity 4 ships. The beta is available now: uWebKit 1.4 Beta

    - Mythos Labs
    Check out uWebKit!
  15. shifty

    shifty

    Member

    Joined:
    Oct 28, 2011
    Messages:
    249
    I've owned uWebKit

    My review:

    Worst support ive ever experienced, i wouldn't buy a product from mythos labs ever again.

    They took it down from the asset store.

    1/5.

    I sincerely apologize if I offended any customers, I'm only trying to warn people with my own experience
    Last edited: Sep 27, 2012
  16. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
  17. dansav

    dansav

    New Member

    Joined:
    Sep 22, 2005
    Messages:
    329
    I was wondering if apple's app store will approve uwebkit products. Are there any current apps there using it.
  18. Mythos Labs

    Mythos Labs

    New Member

    Joined:
    Sep 25, 2011
    Messages:
    66
    @dansav: uWebKit uses the standard UIWebView class on iOS, there should be no issues with approval as we don't use any private API calls, etc. We have not been made aware of any shipped iOS products.

    uWebKit is primarily being used in desktop applications to being social networking, e-commerce, HTML5 gui's, etc. A major strength being that it is seamlessly integrated with the Unity editor for developing/testing web content on the fly.

    -Mythos Labs
    Check out uWebKit!
    Last edited: Oct 3, 2012
  19. siberman

    siberman

    New Member

    Joined:
    Oct 12, 2011
    Messages:
    31
    Hey,

    I've just started playing around with uWebKit and it's coming along nicely.

    I was wondering if the native keyboard pops up when filling in fields on the webGUI when using iOS?

    Cheers.
  20. gamedivision

    gamedivision

    New Member

    Joined:
    Nov 4, 2012
    Messages:
    27
    Is it possible to make to make a phone call button,so a button with a predetermined number and all I have to do is tap it and it calls the number
  21. Merced

    Merced

    New Member

    Joined:
    Jun 4, 2012
    Messages:
    10
    Any advice on launching multiple web textures? Working on a project where I'm replicating a concert stage and I'm trying to put up separate plans with the WebTexture script attached, but I need at least two different youtube urls to launch. I even copied the contents of the WebTexture.cs and created a new script named WebTexture2, attached that separately to the second place and changed the URL in the options, but it seems like no matter what either the URL change happens globally for both textures or it just fails completely and creates two blank textures.

    Thanks!
  22. fffMalzbier

    fffMalzbier

    Member

    Joined:
    Jun 14, 2011
    Messages:
    816
    @ gamedivision:
  23. Yann

    Yann

    Member

    Joined:
    Oct 20, 2007
    Messages:
    423
    Any updates on this product ?
  24. UnityCoder

    UnityCoder

    Member

    Joined:
    Dec 8, 2011
    Messages:
    527
    What about Android support ? Is it in progress?
  25. KJIB

    KJIB

    New Member

    Joined:
    Jul 17, 2012
    Messages:
    7
  26. Yann

    Yann

    Member

    Joined:
    Oct 20, 2007
    Messages:
    423
    Such a promising product, and it hasn't been updated since September 2012. Hope they know what they're (not ?) doing.
  27. huminado

    huminado

    Member

    Joined:
    Sep 18, 2012
    Messages:
    9
    I'm using the WebGUI script from uWebKit to bring up a browser. I've noticed that Unity's multitouch support via Input.touchCount doesn't work unless I disable WebGUI. Is this something that's going to be fixed in uWebKit?

    Thanks,
    Frank
  28. Krileon

    Krileon

    Member

    Joined:
    Oct 30, 2012
    Messages:
    608
    I don't want to be a party pooper for this asset, but those needing/wanting something like this but better, supported, etc.. just get CoherenUI. It's priced pretty similarly and have confirmed is fully functional in Unity. CoherentUI is actually powering my entire ingame UI. That's right, web based UI and it's freaken awesome.

    http://forum.unity3d.com/threads/156665-Coherent-UI-HTML5-based-User-Interface-middleware

    You can see my API posts towards the last few pages. They're very responsive and helpful.
  29. faneric

    faneric

    New Member

    Joined:
    May 15, 2013
    Messages:
    1
    Hi, I'd like to play video in my html file, I used ac_quicktime.js, but the video could not be played in my uWebkit browser, how should I do ?
  30. sebas77

    sebas77

    Member

    Joined:
    Nov 4, 2011
    Messages:
    195
    Hi,

    I am trying to integrate a webview to NGUI, but when I start to use the webview on my own, the editor just crashes when the application starts.
    Did someone try to integrate uwebkit with NGUI already?

    P.S.: it crashes when this line is executed in uwkview.cs

    if (!JSPopup)
    {
    Command cmd = Command.NewCommand ("CRVW", Name, Width, Height, SmartRects ? 1 : 0);
    cmd.Post ().Process += processCRVW; //<--------crashes here
    }

    UWKPlugin.dll caused an Access Violation (0xc0000005)
    in module UWKPlugin.dll at 0023:6c701ec4.
    Last edited: Jun 10, 2013
  31. Nub3h

    Nub3h

    Member

    Joined:
    Aug 23, 2012
    Messages:
    49
    Hi there,
    I'm trying to show a website fullscreen on iPad. I modified the code a bit to not show any tabs but just the title, address bar and back/forward buttons. It works fine in the editor but when I deploy to iPad the browser window goes out of the screen and I can't see the scrollers. I can't find out why it behaves like this only when deployed. Any idea?

    Thanks
  32. huminado

    huminado

    Member

    Joined:
    Sep 18, 2012
    Messages:
    9
    I need to access some URLs which have the '#' character in the URL:

    Code:
    View.LoadURL("http://<website>/imageserve?tileid=java.brain%231%233");

    where <website> is our server...


    Wireshark trace:

    0030 47 45 54 20 2f 69 6d 61 67 65 ...,..GE T /image
    0040 73 65 72 76 65 3f 74 69 6c 65 69 64 3d 6a 61 76 serve?ti leid=jav
    0050 61 2e 62 72 61 69 6e 25 32 35 32 33 31 25 32 35 a.brain% 25231%25
    0060 32 33 33 73 20 48 54 54 50 2f 31 2e 31 0d 0a 55 233s HTT P/1.1..U
    0070 73 65 72 2d 41 67 65 6e 74 3a 20 4d 6f 7a 69 6c ser-Agen t: Mozil
    0080 6c 61 2f 35 2e 30 20 28 57 69 6e 64 6f 77 73 20 la/5.0 ( Windows


    Notice that the UWKCommand.cs function SpanSParams() calls System.Text.UnicodeEncoding() which translates the % character to %25, instead of leaving it alone. I also notice that any " " (space) character in a URL is translated to %20 in LoadURL(), which later doesn't get translated by System.Text.UnicodeEncoding(). The string "%201" (from a string " 1") is translated to "%201", while the string "%231 (from "#1") is translated to "%25231" (apparently by the function GetBytes() ).

    So this seems like a bug (??) in System.Text.UnicodeEncoding(). I have not looked at the output of GetBytes() specifically - so it's possible there's a bug somewhere downstream and not UnicodeEncoding.GetBytes().


    I tried View.LoadURL("http://<website>/imageserve?tileid=java.brain#1#3") which also didn't work (the # character seems to terminate the string altogether).

    Do you have any fixes you can recommend?
    Last edited: Jul 18, 2013
  33. huminado

    huminado

    Member

    Joined:
    Sep 18, 2012
    Messages:
    9
    More info: the bytes in the array in SpanSParams() looks like they are correct (UnicodeEncoding.GetBytes(s) isn't at fault):

    $bytesFromURL.png
  34. Hamesh81

    Hamesh81

    Member

    Joined:
    Mar 9, 2012
    Messages:
    208
    I have a question about accessing websites which have a login system. Is there a way to handle persistent logins, since my users will already have to login to the game, I don't want them to have to type the same username and password again when they launch the website. Does the browser use cookies to remember login details or something like that?
  35. uWebKit.com

    uWebKit.com

    Member

    Joined:
    Feb 16, 2013
    Messages:
    55
  36. Venryx

    Venryx

    Member

    Joined:
    Sep 25, 2012
    Messages:
    101
    The CSS :focus selector doesn't seem to work on textboxes, using uWebKit.

    For example, the textboxes on this page show up as yellow when clicked in Firefox or Chrome, but not in uWebKit: http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_focus

    It's a minor issue, but would be nice if it could be fixed. My guess is that it can't, at least not easily, since it seems that you would need to actually change the browser's source code.

    Just thought I'd let you know, for if it is an easy fix.
  37. uWebKit.com

    uWebKit.com

    Member

    Joined:
    Feb 16, 2013
    Messages:
    55
  38. Mc klane

    Mc klane

    Member

    Joined:
    Oct 2, 2013
    Messages:
    4
    Hi,

    I'm trying to use uwebkit behind a proxy, and i just can't succeed.

    I've set this :

    Code (csharp):
    1.  
    2. /// <summary>
    3.         /// enable disable proxy support
    4.         /// </summary>
    5.         public static bool ProxyEnabled = true;
    6.  
    7.         /// <summary>
    8.         /// The proxy hostname.
    9.         /// </summary>
    10.         public static string ProxyHostname = "192.168.1.102";
    11.         /// <summary>
    12.         /// The proxy port.
    13.         /// </summary>
    14.         public static int ProxyPort = 8080;
    15.  
    in the config file but it does not work :s.
  39. penguin_ku

    penguin_ku

    Member

    Joined:
    Sep 3, 2013
    Messages:
    1
    hello,

    I meet a problem. I can create my web page with-in unity3d, but when I package it as an excutable process, it remind me that it lack of wwebkit-process.

    How to resolve?

    My versions is trial version.
  40. JoshEnge

    JoshEnge

    Member

    Joined:
    Oct 3, 2013
    Messages:
    2
  41. DCalabrese

    DCalabrese

    Member

    Joined:
    Dec 13, 2011
    Messages:
    224
    NOTE: I've cross-posted this here and in the Unity support forums at http://forum.unity3d.com/threads/22...on-iOS-than-UnityEditor?p=1475015#post1475015 as I'm not sure if this is a uWebKit issue or a Unity issue.

    I'm working on a project where we are showing a uWebKit view on iOS. Being iOS, we of course have to use a WebGUI rather than a WebTexture, which leads to one major problem - position and size. The view is in a different position and size on iOS than it is in the Unity editor. To address this, I am attempting to position the GUI onto the same position as a 2D plane. This works wonderfully in the Editor, and moves and resizes with the plane in real time... however on iOS, it still is in the wrong position and size.

    Here is the code that I am using to convert from the world space to to screen space:

    Code (csharp):
    1.  
    2.     void Update()
    3.     {
    4.         // The Mesh Plane is used to position the Web GUI  
    5.         Bounds bounds = renderer.bounds;
    6.        
    7.         Vector3 origin = camera.WorldToScreenPoint(new Vector3(bounds.min.x, bounds.max.y, 0.0f));
    8.         Vector3 extents = camera.WorldToScreenPoint(new Vector3(bounds.max.x, bounds.min.y, 0.0f));    
    9.        
    10.         Rect newRect = new Rect(origin.x, Screen.height - origin.y, extents.x - origin.x, origin.y - extents.y);
    11.        
    12.         posX = (int)newRect.x;
    13.         posY = (int)newRect.y;
    14.         Width = (int)newRect.width;
    15.         Height = (int)newRect.height;
    16.     }
    17.  
    18.     void OnGUI ()
    19.     {
    20.         if(View != null)
    21.             View.OnWebGUI(posX, posY, Width, Height, 100f);
    22.     }
    23.  
    Again, in the Unity Editor, this works excellent. But load it up on iOS, and the WebGUI view is in the wrong position, and way too big.

    Any help would be very appreciated - thanks in advance!
    Last edited: Jan 6, 2014
  42. DCalabrese

    DCalabrese

    Member

    Joined:
    Dec 13, 2011
    Messages:
    224
    After doing some additional testing I can prove that this is absolutely a Unity issue, and not a uWebKit issue. So that leads me to 2 questions...

    1.) Does WorldToScreenPoint have known problems on iOS devices?
    2.) Is there a function that should be used in place of WorldToScreenPoint when working with iOS devices?
  43. uWebKit.com

    uWebKit.com

    Member

    Joined:
    Feb 16, 2013
    Messages:
    55
  44. madhur

    madhur

    Member

    Joined:
    May 16, 2012
    Messages:
    60
    Hi,
    I'm doing the development in a Mac. I created a windows build to run on a windows machine. When I try to inject player. It gives this error. But both Windows and Windows64 folders are there in that path. I tried both Inject Player and Inject Player 64.
    I'm using a licensed version of uWebKit.

    FileNotFoundException: \CODE\ClassRoomApp\UnityWebKitTest\WebKitTest\Assets\Editor\uWebKit\Native\Windows64\Plugins\UWKPlugin.dll does not exist
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName, Boolean overwrite) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.IO/File.cs:107)
    uWebKitInjectPlayer.InjectPlayer (System.String path, Boolean display_success, Boolean x64) (at Assets/Editor/uWebKit/uWebKitInjectPlayer.cs:85)
    uWebKitInjectPlayer.InjectPlayer64 () (at Assets/Editor/uWebKit/uWebKitInjectPlayer.cs:51)
  45. Jona27

    Jona27

    Member

    Joined:
    Sep 11, 2013
    Messages:
    1
    Hello,

    I have an issue and I hope you will be able to help me. I have a project with uWebit kit that works totally fine on Windows 7.
    However, on Windows 8 (desktop application like windows 7), keyboard inputs don't work at all? Do you have any idea?

    [EDIT]
    It looks like it comes from the IME keyboard.
    I added Input.imeCompositionMode = IMECompositionMode.On; but it's still not working...
    Last edited: Mar 5, 2014
  46. fcore7777

    fcore7777

    Member

    Joined:
    Dec 31, 2012
    Messages:
    5
    Hi,
    I'm using a uWebKit Pro version license.
    I've been trying to show a Facebook dialog to invite friend play my game.
    Please help!
    Thanks
  47. Omidja

    Omidja

    Member

    Joined:
    Jul 16, 2014
    Messages:
    11
    hi.i use uwebkit.and i need load a page in my game,and this page has a upload button.when i click on Upload button:
    1.my OpenBoxWindow open under the game(how can i open it over game??)
    2.my OpenBoxWindow close after about 10 sec!(Why?How fix it?)
  48. jingjieyeh

    jingjieyeh

    Member

    Joined:
    Dec 28, 2012
    Messages:
    1
    hi , I use uWebkit 2 version on Winodow 8.1, I have a issue that I touch input box to enter input focus state and Page is focusing a text entry area but uWebKit does not popup windows Touch Keyboard(see figure 1 ). I think if uWebkit 2 have support to send the input onfocus event into C# delegate function that I can have TouchKeyboard Open implementation when I receive input focus event to call Windows TouchKeyboard Open native API to let user use Touch Keyboard to input .
    if this method is not well,does someone have any idea to solve it?

    [​IMG]
    firgure 1
    Last edited: Aug 14, 2014