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

PowerUI - Powerful HTML/CSS UI Framework

Discussion in 'Assets and Asset Store' started by KulestarUK, Aug 16, 2013.

  1. Genom

    Genom

    Joined:
    Dec 2, 2014
    Posts:
    86
    Since when Power UI is free and open source? it would be awesome of course.. also, would it be moved to github?
     
  2. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    You can see his latest update here which states it is now free and open source:
    https://www.assetstore.unity3d.com/en/#!/content/10374
     
    Mr-Logan likes this.
  3. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    twobob likes this.
  4. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    I bought this three days before it became free) I'm lucky, yeah :D

    Next question to PowerUI devs) How can I get location of document's element in a screen coordinates? Something like document.GetScreenPoint(document.getElementById(.....)).

    I noticed that changing background image for divs does not work. If I set style.background from code, it does nothing; and if I switch div style to style with different image, it does not work either. Will be using img, but this bug is really annoying.

    UPD:
    Changing src attribure of img at runtime does nothing. I ended up re-generating entire innerHTML of parent div on-the-fly.
    Mouse out event (Action) from element not firing.
     
    Last edited: Jan 14, 2018
  5. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    @KulestarUK Will you be taking donations for the project in the future? I'm asking as I'd like to support future development.
     
  6. KaletheQuick

    KaletheQuick

    Joined:
    Feb 12, 2016
    Posts:
    41
    Yes, I second this motion. I just got on the asset store today to buy it and while excited, would love to contribute to a patreon or just give you money.
     
  7. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    Ok, I'll ask my 31st question) Maybe someone can shed some light.
    I am now transferring my UI from main manager to the FlatUI one. And everything went smooth until I started implementing mouse interaction. For FlatUI, according to wiki, I must make a raycast to my UI mesh and pass hit result to ResolvePoint method to get point in pixels. This approach resulted in a total mess. Coordinates I got were nowhere near the actual ones.
    So I decided to ditch ResolvePoint and get XY by UV myself. And I got the same rubbish results. Here what I have:
    I have a plane object. This plane is fixed relative to camera (plane is camera's child and always facing the camera -- image attached). This plane has some RenderTexture on it. Now I want to know, what UV coordinate is currently under the mouse cursor.
    The following script is sitting on this plane object:
    Code (CSharp):
    1. //....
    2. _collider = gameObject.GetComponent<Collider>(); // Plane's mesh collider
    3. //....
    4. void FixedUpdate()
    5.         {
    6.             RaycastHit hit;
    7.             var p = UnityEngine.Input.mousePosition;
    8.             if (_collider.Raycast(Camera.main.ScreenPointToRay(p), out hit, 100f))
    9.             {
    10.                 var meshCollider = hit.collider as MeshCollider;
    11.                 var rend = hit.collider.GetComponent<Renderer>();
    12.                 if (rend == null || rend.sharedMaterial == null || rend.sharedMaterial.mainTexture == null || meshCollider == null)
    13.                     return;
    14.                 var pixelUV = hit.textureCoord;
    15.                 pixelUV.x *= rend.material.mainTexture.width;
    16.                 pixelUV.y *= rend.material.mainTexture.height;
    17.                 Debug.Log("UV=[" + hit.textureCoord.x + ";" + hit.textureCoord.y + "]" + ", XY=[" + pixelUV.x + ";" + pixelUV.y + "]");
    18.             }
    19.         }
    But coordinates I see in the log are very strange. First of all, when I change aspect ratio in a viewport, point that had XY[51,466] in 16:10 becomes XY[95,464] in 4:3 and so on. Secondly, offset is so huge that I am getting UV readings even if mouse pointer is nowhere near this plane.

    How to get Plane's UV under the cursor? By using PowerUI or something else, I really don't care at that point)

    UPD: I ended up ditching mouse pointer entirely. Code above actually works well if you hide cursor and just look at the collision detection. Now I am showing a really small sphere at the ray hit point, and when you move your mouse, this sphere smoothly follows plane surface: now this is my "pointer". It works really well, and even better than "real" pointer: my 3d-cursor actually follows object geometry. And as this sphere represent actual raycast hit point, precision is great.

    I really like this workaround, but question is still open.
     

    Attached Files:

    • UVs.png
      UVs.png
      File size:
      1.6 MB
      Views:
      1,010
    Last edited: Jan 28, 2018
    StevenPicard likes this.
  8. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    After all my struggles and dead-ends, I finally managed to implement UI I wanted. PowerUI has its cons, but if you have enough imagination, you can find workarounds for all that. I want to thank PowerUI devs for their product, it's really awesome!) Here is my small UI demo (you can see here my sphere-pointer I was talking about):
    http://imw.su/2018-01-28-2354-23.mp4 (video removed)
     
    Last edited: Apr 1, 2018
    Mauri, twobob and Mr-Logan like this.
  9. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Vagrod likes this.
  10. aftokinito

    aftokinito

    Joined:
    Jan 30, 2013
    Posts:
    10
    I bought this weeks ago and now it's free? Pretty disappointing and you should be providing refunds for the people that bought it recently.
     
  11. Hemanth_DJ

    Hemanth_DJ

    Joined:
    Aug 12, 2017
    Posts:
    13
    H power UI is removed from asset store l,when will it be back
     
  12. raggnic

    raggnic

    Joined:
    Sep 27, 2017
    Posts:
    13
    Hi there!

    I'm trying to use PowerUI to display a large html file in worldUI sample. As it's large I have to use scrolling. Problem is that the html document rendering is ending well before the bottom of the document (like on the second page). Is it a known limitation? is there a workaround?

    Amazing Asset though..
     
  13. JasonCG

    JasonCG

    Joined:
    Oct 6, 2012
    Posts:
    29
    Edit: I think I've figured it out. There were a few issues. One was my VRInputPoitner was being removed from PowerUI's Input update loop (totally my fault). I also switched to using WorldUIHelper directly instead of creating my own class for managing WorldUI, which generates a BoxCollider instead of a MeshCollider.

    Code (CSharp):
    1. private Vector2 screenCoord;
    2. public override bool Relocate(out Vector2 delta) {
    3.     delta.x = ScreenX - screenCoord.x;
    4.     delta.y = ScreenY - screenCoord.y;
    5.     if (delta.x == 0 && delta.y == 0)
    6.         return false;
    7.     ScreenX = screenCoord.x;
    8.     ScreenY = screenCoord.y;
    9.     DocumentX = ScreenX;
    10.     DocumentY = ScreenY;
    11.  
    12.     return true;
    13. }
    14. /// <summary>
    15. /// Called whenever a WorldUI is in the path of the laser pointer
    16. /// </summary>
    17. /// <param name="sender"></param>
    18. /// <param name="rcHit"></param>
    19. /// <param name="obj"></param>
    20. public void ItemUnderPointer(Controller sender, RaycastHit rcHit, GameObject obj) {
    21.     var webui = obj.GetComponentInParent<PowerUI.WorldUIHelper>();
    22.     if (webui != null) {
    23.         //PowerUI.Input.scre
    24.         screenCoord = webui.WorldUI.ResolvePoint(rcHit);
    25.  
    26.     }
    27. }
    28.  
    29.  
    I'm trying to integrate PowerUI with my VR (SteamVR) game's control system, and I think I'm doing it incorrectly. Currently I am using Unity's UI Canvas system for my UI but I'm looking at replacing the bulk of my UI with PowerUI.

    So far I have a PowerUI FlatWorldUI object in world space properly rendering a basic web page. I already have a mechanism for determining when a laser pointer from the controller is hitting an object, grabbing an appropriate RaycastHit, and passing it along to whatever needs it.

    I've started creating a PowerUI.InputPointer class (VRInputPointer) to connect my current controller monitoring with PowerUI by following the instructions at https://powerui.kulestar.com/wiki/index.php?title=Input_Pointers

    The issue I'm running into is I'm not sure how to pass along the "cursor" coordinates into the FlatWorldUI (set InputPointer.Position I think?) Currently I've hooked into a loop I already have running on each controller to determine if it's pointing at a GameObject on the "UI" layer. To make this work with PowerUI, after instantiating a WorldUI at runtime, I add a MeshCollider to the generated MeshRenderer GameObject.

    I get a RaycastHit with my laser pointer on the object, which I pass along to my VRInputPointer. Now I need to convert the RaycastHit contact point to WorldUI "screen" space. I'm pretty sure I'm way off base on what I need to do, but essentially I check if the object has a WorldUIHelper in its hierarchy and, if it does, I pull out the WorldUI from it and:

    vrInputPointer.Position = worldUi.ResolvePoint(raycastHit);

    The problem now is Position is completely wrong, because ResolvePoint is using the texture coordinates in the RaycastHit to determine the contact position, but the texture coordinates always report (2.0f, 2.0f) regardless of where the actual raycast hits.

    So what is the proper way to implement a laser pointer from a VR controller with PowerUI? Am I not correctly adding the MeshCollider to the WorldUI?

    Thanks!
     
    Last edited: Mar 13, 2018
  14. FionNoir

    FionNoir

    Joined:
    Aug 25, 2015
    Posts:
    14
    I'm not able to run jQuery in PowerUI cause it can't handle the "$" symbol.
    Did anybody make this work and how?
     
  15. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    You should be able to use "jQuery" in place of $. Example: jQuery( "div p" ).hide();
     
  16. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    Have you looked at the example?You might be loading the jQuery file wrong?
     
  17. FionNoir

    FionNoir

    Joined:
    Aug 25, 2015
    Posts:
    14
    Oh, I missed the example. Is it in the examples from PowerUI? Thanks for that hint! At the moment I'm trying to build a Bootstrap UI in PowerUI, which is the reason for jQuery. My first try was to put the files in the Unity project, which leads to many errors. Then my second try was to load the librarys from a webserver whcih failed too.
    I will have a look at the example and see if can go on with that :)
     
  18. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    The example has it as a simple .txt file that the PowerUI framework then loads and understands as js file, there is another way where you set the file extension to something like *.byte
    But I don't have the project in front of me, so I can't tell you exactly how it's done, but it's all in the documentation. :)
     
  19. nullabl3

    nullabl3

    Joined:
    Jun 29, 2017
    Posts:
    3
    I can run the javascript examples and some other jQuery snippets but append etc methods don't work. Why is this?

    ex: $("#list").append("<li>item</li>");
    Works in browser but not in powerUI

    Another question. Is it not a good idea to use the HtmlUIPanel rendering method? I tried to render my page with that in the unity UI but the layout just breaks. If I use the main-ui, everything renders just fine.
     
    Last edited: Apr 10, 2018
  20. Vagrod

    Vagrod

    Joined:
    Aug 4, 2017
    Posts:
    82
    Last edited: Apr 23, 2018
  21. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hi
    Just started using this asset. Very cool (and astounding at this 0 price?! If this works well enough, I'm seconding that question above about supporting the developer!) Am I right thinking it's in "community maintenance" now?

    Regardless onto the problems...

    In-world UI (v2.5) seems to have some ... oddities (aka bugs) at least with 2017.03.1p4.
    By that I mean the in-world demos don't work. The screen-space ones seem fine.

    EDIT: Deleted entire post since I found the obvious answer in the README that I'd missed. Doh!

    If future users have a problem like the above, go read "PowerUI/Getting Started/ReadMe.txt"
    Sorry to waste time!
     

    Attached Files:

    Mr-Logan likes this.
  22. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
  23. Mr-Logan

    Mr-Logan

    Joined:
    Apr 13, 2006
    Posts:
    455
    I know that he has done work on the git since making it free and opensource, but I don't know how much.
    I've personally considered making a pull request and trying to get into the code to fix a number of small issues, but I haven't had the time yet.
     
  24. Metalloriff

    Metalloriff

    Joined:
    May 8, 2015
    Posts:
    4
    Hello. So I've started using this, and I love it so much more than any UI system I've ever used, but I have a question and a bug to report.

    So the bug is where elements like to move on their own, for example, if I put a text field next to a span, the span moves when the text field is empty. I know this isn't a problem with my HTML or my CSS, because it does it with just these two elements, and it does it in your examples. The buttons also move a few pixels to the right after I click them, but this could be an issue with my code. Here's a gif showing both problems. https://i.imgur.com/1n7jh3u.gifv

    And the question I had was, would it be possible to add support for "transition" and maybe "pointer-events"?

    I'm on Unity 2018.1.0f2 by the way.

    Thanks in advance!
     
  25. tianjinwuyong

    tianjinwuyong

    Joined:
    Apr 20, 2017
    Posts:
    1
    hello,

    I want to use Chinese in power UI. but every time I add Chinese in the html, there is nothing displayed(empty screen). I wonder if the power UI not supporting Chinese. am I right? or can anybody tell how I can setup to support Chinese. Thanks.

    Wu Yong
     
  26. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hi, Just got JQuery running in my use. 1 bug, 1 handy script, 2 questions and thought I'd share a few discoveries to save future users time.

    BUG:
    clicks over half-way across X width of the window are positioned incorrectly in World UI. (they're fine in screen-space UI). The X result fixes against left side and Z is inverted (clicking top right gives bottom left result).
    - PixelPerfect doesn't seem to affect.
    - MakeItFlat (which requires different initial rotation) gives similar results but rotated.
    I can supply a reproduction but it's basically a tiny image on a page with a background colour, JQuery and this script affecting the image:

    Code (JavaScript):
    1. $(window).click(function(e) {
    2.     $("#image").css({left:e.pageX, top:e.pageY});
    3. });
    I remember seeing some potentially relevant code when stepping through with the debugger a few days ago -- had lots of axis checking and inverting. Might see if I can find it again.

    JQuery notes:
    • I recall someone saying minified version doesn't work. It /does/ but you need to rename it "jquery.asset" (remove the hyphens).
    • The dollar works fine (as does "jQuery" -- case sensitive).
    • There don't seem to be mouse/pointer move events (wished for above). I imagine this is since it'd be huge performance risk?
    Handy script:
    I've taken to adding a little "error reporter" script to my scene to help me spot problems. Attached for others' use. Is there a better way? I plan to route these errors to a report-to-base solution (e.g. analytics) for problems-in-the-field.

    Questions:
    1. Separately, Manager's "watch for changes" reloads occur off the main thread so my error reporter code gets called same which breaks Invoke(). Does PowerUI include a facility for calling on the main thread already? (I have my own in my utils lib but figure there's probably one here already.)
    2. I noticed the wiki seems to be accumulating spam. It makes searching even harder. How best to tackle this?
    3. I also wonder if there's a unified contents page there somewhere I haven't spotted? Per MediaWiki docs, I tried https://powerui.kulestar.com/wiki/Special:AllPages but it 404s.
    Thx
     

    Attached Files:

  27. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Did a little bit of investigation but have to stop now. Think I found the area the problem is in -- Input.HitToSurfacePoint():
    • When problem does not occur, it determines (correctly) we're on the negative Z side of the BoxCollider and returns at line 663.
    • When the problem occurs, it does not think we're on negative Z and returns at line 683 = using Z hit point for the HTML X coordinate! Given it's a minutely thin BoxCollider (in Z axis) this gives almost zero all the time.
    I'm out of time to investigate this right now -- maybe more this evening. (or I can have crossed fingers that @KulestarUK or someone will fix beforehand ;-) )

    Thx
     
  28. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Believe I've fixed it. Simple fix: use the local normal for the comparisons instead.
    At line 643 (below `localPoint` calculation, add:
    Code (CSharp):
    1. var localNormal = hit.transform.InverseTransformDirection(hit.normal);
    Update the values for `maxBox` and `minBox` to 0.5f and -0.5f respectively.
    Then swap `localPoint` for `localNormal` in all the `if` tests below.
     
  29. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hi, me again.
    Little patch for HtmlUIPanel.cs for when you use the PowerUI Input Settings window to disable Unity UI input processing. Lines 96-101 need protecting with #if HANDLE_UNITY_UI.
     
  30. ChrisDirkis

    ChrisDirkis

    Joined:
    Jun 1, 2017
    Posts:
    38
    Hi there! A quick question, since I don't know enough about the framework/html/css to debug this myself:

    I'm attempting to use the Google Material Design components, from https://github.com/material-components/material-components-web/blob/master/docs/getting-started.md . Specifically, I grabbed the minified css and js scripts from there, copied them into my project, and referenced them with

    Code (JavaScript):
    1. <link rel="stylesheet" type="text/css" href="../../../Material/material-components-web.min.css">
    2. <script type='text/javascript' src="../../../Material/material-components-web.min"></script>
    3. <script type='text/javascript'>
    4.     console.log("test");
    5.     mdc.ripple.MDCRipple.attachTo(document.querySelector('.foo-button'));
    6. </script>
    Those relative links were correct, in my case, of course. However, when I made a button with the style recommended in the above Github link, both a) the css wasn't applied (I think), and b) the javascript wouldn't run (in fact, with the imported js file, not even the console.log worked).

    Are there any debugging switches I can enable to get some insight into where things are breaking?
     
  31. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hey, until a better answer comes along, I assume you've already looked around in "Window | PowerUI" and "Window | PowerTools"? Personally I found it easier to just get JS/HTTP errors reported on Unity console so you might try my error reporter from https://forum.unity.com/threads/powerui-powerful-html-css-ui-framework.196144/page-11#post-3496299
    HTH
     
  32. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Here's a zip of .asmdef files I'm using. It helps compilation time a bit. Hopefully it'll be even better with incremental compiler. (I had to disable in my project for other reasons.)

    HTH
     

    Attached Files:

  33. MajorClod

    MajorClod

    Joined:
    Sep 28, 2017
    Posts:
    2
    Hi all,

    I'm trying out PowerUI as I'm working on an application that requires a UI that renders lots of text, information, images, etc. So a HTML/CSS based solution is perfect. This applications primary method of interaction is Touch, and the platform is Windows.

    I'm trying to test out touch and I'm getting inconsistencies with how click events are handled between mouse inputs and touch inputs.

    I have a div with an onmousedown or onclick event. First tap with the touchscreen on the div fires a single event. A subsequent tap will fire two events. If I tap on another element, then come back to the div with another tap, I'll only get one event.

    ontouchstart only fires one event as expected (so I could use that), however this won't let the button work with mouse input (which I also need)

    These functions all work as expected in Chrome, Edge, etc...

    I've put a JSFiddle here https://jsfiddle.net/xzLgdyve/4/ which can also be used in PowerUI to test functionality. It reproduces the above behaviour.

    Anyone else experienced this on touch devices?
     
  34. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    654
    Hey. Sorry to hear of your troubles. I'm relatively new here but haven't heard much from the author. There is also a forum on the support site. Maybe worth dropping a ping there if no response here? Not yet sure which is preferred.
     
    MajorClod likes this.
  35. MajorClod

    MajorClod

    Joined:
    Sep 28, 2017
    Posts:
    2
    Thanks, I'll check the forum out!
     
  36. roganz

    roganz

    Joined:
    Dec 6, 2016
    Posts:
    4
    Has anyone managed to get an ajax query working from javascript?
    I've tried jquery's various methods, and I've also tried just straight XMLHttpRequest, but they all give me the following error in my Unity console:
    System.ArgumentException: failed to convert parameters

    Here's some code I tried, for example:
    Code (JavaScript):
    1. var r = new XMLHttpRequest();
    2. r.onerror=function(e){
    3.     console.log("error");
    4. };
    5. r.onload=function(e){
    6.     console.log("loaded");
    7. };
    8. r.open("GET", url);
    9. r.send();
    EDIT
    Looks like it's the onload it doesn't like. So for now I'm just going to check r.readyState on an interval until it is 4 to see if it's done.
     
    Last edited: Jun 27, 2018
  37. wangzj89

    wangzj89

    Joined:
    May 16, 2016
    Posts:
    1
    Seems that the default font `DejaVu` does not contain Chinese characters. Try to add a custom font for yourself.

    https://powerui.kulestar.com/wiki/index.php?title=Custom_Font
     
  38. cnmuna

    cnmuna

    Joined:
    Mar 6, 2017
    Posts:
    3
    Hi,
    sorry for my bad english, I tried to load a image using img tag by giving them web url and local file path and it worked perfectly on unity editor and android devices.But when i build them to ios device it just not work at all unless images are in the Resources folder. Does those images always have to be in resources folder, How can i load them using a url on ios device.
    I've been searching internet for days now and still unable to find an answer.
    does anyone know how to fix it, thanks in advance.
     
  39. dementcore

    dementcore

    Joined:
    Feb 6, 2013
    Posts:
    5
    Hi, it's possible to embed powerui as a child off Unity UI RectTransform? Thanks
     
  40. lancepriebe

    lancepriebe

    Joined:
    Apr 24, 2016
    Posts:
    3
    Hello, I am looking for a solution. I am using BestHTTP and attempting to add PowerUI. Sadly there seems to be a namespace conflict with Json.Encode and Json.Decode between the two. Help? thanks.
     
  41. KulestarUK

    KulestarUK

    Joined:
    Aug 16, 2013
    Posts:
    269
    Hi @lancepriebe PowerUI doesn't reference its Json namespace all that much so you could run a find and replace:

    "namespace Json" -> "namespace PowerUI.Json"
    "using Json;" -> "using PowerUI.Json;"

    In the PowerUI source folder. You might get some errors coming from DataPackage.cs and EditorWebAPI.cs - if that's the case, make sure they're also referencing PowerUI.Json too :)
     
    Summer006_unity likes this.
  42. Alestemo_

    Alestemo_

    Joined:
    Jul 11, 2018
    Posts:
    5
    Good day, Devs!

    Maybe this is a stupid question, but i don't know how to solve this problem. My own Fullscreen UI (Unity basics) is displayed on top of Power UI. I want to display a small window on top of my own UI.


    https://gyazo.com/4c6daf454dd05da1bdc32f9bfe84e574
     
  43. Alestemo_

    Alestemo_

    Joined:
    Jul 11, 2018
    Posts:
    5
    How to integrate the Power UI into the Unity's UI?
     
  44. midnightcrawler1

    midnightcrawler1

    Joined:
    Jan 17, 2017
    Posts:
    15
    When I put this in VR it messes with all my camera view and scene, everything starts to flicker and I see things that are not supposed to be there.
    Is there a way to use this without putting a camera in the scene?
     
  45. KulestarUK

    KulestarUK

    Joined:
    Aug 16, 2013
    Posts:
    269
    @unity_3wn_EYo_PHEONg It sounds like you'd want to use PowerUI within a Unity UI - there's an example scene included which shows how that can be setup :)

    @midnightcrawler1 Check your Project Settings > "Tags and Layers" - there needs to be a layer called "PowerUI" which usually gets autocreated but sometimes Unity isn't able to. When that layer is missing it can cause a variety of camera problems and it sounds a lot like what you're experiencing. Also when PowerUI starts up it'll automatically hide itself from any other cameras in the scene, but you can do that explicitly if you want - just make sure that same PowerUI layer isn't visible in cameras that shouldn't see it.
     
    Alestemo_ likes this.
  46. midnightcrawler1

    midnightcrawler1

    Joined:
    Jan 17, 2017
    Posts:
    15
    Thank you for the fast response, yeah that fixed it, debug showed it's not creating the layer, I created a PowerUI layer and everything worked.
    Another question, I need to have lots of different UI controls in my scene, like around 500. They need to be attached to individual controls. Currently when I put more than one control in my scene, they all render the same webpage. Is there anyway I can render different UI for each control?
    Thank you!
    ===============
    Actually never mind it was my bad, this is working great man, how do I pay you? :)
    You have no idea how much you saved my A$$
     
    Last edited: Nov 26, 2018
  47. KulestarUK

    KulestarUK

    Joined:
    Aug 16, 2013
    Posts:
    269
    @midnightcrawler1 Usually for VR you'd use a bunch of WorldUI's (GameObject > Create Other > WorldUI) - these have a HTML file setting which you can set to some other file. Alternatively if it's totally dynamic, instance a WorldUI via code - that's described in the same wiki article - and you can set HTML to it directly from there :)
     
  48. midnightcrawler1

    midnightcrawler1

    Joined:
    Jan 17, 2017
    Posts:
    15
    Yes I will mess around to make it work the way I need it. I'll bug you with questions if any.
    Thank you chief!
     
    KulestarUK likes this.
  49. Alestemo_

    Alestemo_

    Joined:
    Jul 11, 2018
    Posts:
    5
    Thank you so much! :rolleyes:
     
  50. midnightcrawler1

    midnightcrawler1

    Joined:
    Jan 17, 2017
    Posts:
    15
    I have a problem that I couldn't figure out by myself. If I open let's say 100 World UIs and each of them load a different image simultaneously, I get a network error for a minority of them not being able to load the image from a url. If I run the same function multiple times it eventually loads all of them with no problem. I have a separate function that does this using WWWRequest and never had this problem. I was wondering if it's because of multi-threading or any help/suggestion would be appreciated.

    Unity Network Error: Cannot connect to destination host
    upload_2018-11-28_18-43-46.png

    HTML:
    <style>
    p {margin: 0; padding: 15;}
    .title {color:#ffef42; font-weight: bold;}
    img{width:380px; border-radius: 8px; padding: 2px;}
    </style>
    <div class="title">tape</div>
    <div class="zoomin"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/MODODennison.jpg/440px-MODODennison.jpg" alt="No Image"></div>