Search Unity

Coherent UI - HTML5-based User Interface middleware

Discussion in 'Assets and Asset Store' started by stoyannk, Oct 30, 2012.

  1. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    It's very simple to duplicate. Create an empty project. Import latest CoherentUI. Now go to Edit > Project Settings > Player and set the following.

    Rendering Path: Deferred Lighting
    Color Space: Linear
    User Direct3D 11: Checked

    Next load up the demo found at CoherentUI/Samples/Scenes/Sample03_MenuAndHUD/Main Menu/menu.scene.

    Now wait for the menu to load. Now look at how washed out it is. To compare go to Edit > Project Settings > Player and change Color Space to Gamma then back to Linear. That makes it super easy to see the differences. This only happens in DX11 though. With DX9 it works fine.
     
    Last edited: Jan 15, 2014
  2. mlenton

    mlenton

    Joined:
    Nov 13, 2013
    Posts:
    8
    Are there any plans to support this opening new native browser windows for mobile?

    Or, can anyone suggest a method for rolling our own solution?
     
  3. 3_2_1

    3_2_1

    Joined:
    Jan 17, 2014
    Posts:
    3
    Coherent Labs advertises "Voice and Video Chat through WebRTC", but there isn't any documentation about how this can be done.

    I would really appreciate some guidance for how to get WebRTC working in Coherent UI in order to implement a basic in-game video chat. I've looked through lots of Coherent UI documentation and WebRTC documentation, but there seems to be a missing link: something beyond my programming knowledge (kind of beginner) that would allow Coherent UI to access a player's webcam and display a web page with WebRTC video chat.

    I'm using the trial version version of Coherent UI and will definitely buy the full version if this works. Is WebRTC even enabled in the trial version?
     
  4. DimitarT

    DimitarT

    Joined:
    Apr 8, 2013
    Posts:
    99
    Hi, you can see our KB article about WebRTC on Coherent UI official forums - https://forums.coherent-labs.com/index.php/topic,71.0.html
     
  5. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Any information regarding this? Were you able to duplicate the issue?
     
  6. Ju57iCe

    Ju57iCe

    Joined:
    Jan 21, 2014
    Posts:
    2
    Hello Krileon,

    We've managed to reproduce your issue with the washed out colours. Our team will look into it and fix it shortly.


    -------
    Coherent-Labs Team
     
    Last edited: Jan 22, 2014
  7. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Awesome, glad I could help. Keep up the great work! As always this is hands down my favorite and most needed asset; couldn't be happier with my purchase.
     
  8. mlenton

    mlenton

    Joined:
    Nov 13, 2013
    Posts:
    8
    Hi all,

    We're using Angular JS directives in parts of our Unity3D UI and noticed that we don't see embedded images inside ng-repeat directives.

    The code is something like this:

    <div ng-repeat="(key, prop) in data" class="listitem">
    <img src="{{prop.image}}" height="82" width="82" />
    </div>


    What we see in the Unity log are requests for URLs that are like this:

    unsafe:coui://uiresources/images/exports/03_user8.png

    Whereas when the image is explicitly embedded, the image loads properly and we see the URL:

    coui://uiresources/images/exports/03_user8.png

    .. so that we know the images actually exists in this location.

    Does anyone have more information about this unsafe: prefix?

    *edit: answered this for ourselves at: http://docs.angularjs.org/api/ng.$compileProvider
     
    Last edited: Jan 22, 2014
  9. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    "Draw order" seams pretty buggy. I have 2 scenes where I had to set it to "Normal" then another I had to set it to "After Post Processing" to get it to work. In all cases I want the view the render after post processing. What's going on?

    For the 2 views messing up I've tracked it down to the Bloom post processing effect. Once I disable Bloom it behaves fine, which is weird because I have Bloom in my other view where it works fine. Maybe want to take a look at testing all the Unity Pro post processing to ensure the draw order behaves correct with CoherentUI? As I want to use Bloom, do you've any suggestions what could be causing this?

    To duplicate load up CoherentUI/Samples/Scenes/Sample03_MenuAndHUD/Gameu/game.scene and ensure the following are set.

    Rendering Path: Deferred Lighting
    Color Space: Linear
    Use Direct3D 11: NOT Checked (so use DX9)

    Now add the UnityPro post processing effect Bloom to the first person controller main camera. Now set the views "Draw order" to be "After Post Processing". Finally set the camera to be HDR.

    With the above steps you'll see the exact issue I'm experiencing. Toggle the Bloom script off during play mode then back on again to see the issue in realtime.

    Please let me know if you need any further information to duplicate the bug.
     
    Last edited: Jan 26, 2014
  10. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    I have been trying to find out what audio formats can be used on iOS in the coherentUIView but have not found any info. Anyone knows where to look? Thanks in advance!
     
  11. Ju57iCe

    Ju57iCe

    Joined:
    Jan 21, 2014
    Posts:
    2
    Hello Krileon,

    We have reproduced the problem with the draw order and located its source. If the DrawOrder option is set to After Post Effects, CoherentUI waits until the end of frame and then it renders itself. However, the bloom gets applied after the UI has been rendered, even when we wait for the end of frame. We have contacted Unity's support to resolve the issue.

    Stan
     
  12. AnchoV

    AnchoV

    Joined:
    Jun 5, 2013
    Posts:
    17
    Hey guys,

    It is my great pleasure to invite you all to come and meet us at the world's biggest game dev summit - GDC, which will be held in San Francsico on 19,20 and 21st of March (Expo days)

    Our lead engineers and I will be there, eager to meet with you :) Booth #931

    The best way to schedule a meeting with us is through our official sign-up form, which you can find HERE

    Get ready for an amazing show!

    Cheers! :)
     
  13. Darkoo

    Darkoo

    Joined:
    Feb 4, 2013
    Posts:
    96
    How should I pass multiple(more than 8 ) arguments in an View.TriggerEvent when using UnityScript?
    I have tried with a struct but douse not seem to work for me.

    Edit: fixed the issue, had a lame typo "error".
     
    Last edited: Jan 31, 2014
  14. mlenton

    mlenton

    Joined:
    Nov 13, 2013
    Posts:
    8
    Hello,

    We've encountered a situation where the Coherent UI view is not being rendered transparently on a particular combination of device/OS and browser, even though this setting is enabled in the editor.

    We're building using Coherent 1.7.0 for Unity targetting iOS and Android. The exact same build will render transparent Coherent UI View on two out of the current three Android test devices.

    What works:
    * Build to Android 4.1.x on HTC One X -> trnasparent (OK)
    * Build to Android 4.2 on Samsung Galaxy S4 -> transparent (OK)
    What doesn't:
    * Build to Android 4.0.4 on Samsung Galaxy Tab 8.9 (GT-P7320T) -> solid white background

    We are using minimal HTML CSS to test this, happy to send the test project through to support.
     
  15. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    mlenton - I had this problem on a HTC Desire, my other Android test devices were fine. Somebody else had the same problem on a Samsung Galaxy Tab, Coherent sent him a different test version which fixed it, but involved a separate build or configuration (?) - I think the eventual plan is to have this resolved in Coherent properly. I can't find the original message... is it in this message (look for one of my posts), or the official Coherent forum I'm not sure... it wasn't that long ago.
     
  16. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Still having gamma issues with latest release. Now it's when Bloom and Amplify Color are present instead of just Bloom. Maybe the view needs to be delayed further or a parameter to set how many frames to wait?

    Also when I enable DX11 the views don't work at all anymore and throw the below to console.

    Code (csharp):
    1.  
    2. [Coherent UI] (Warning) Unexpected Render Target format 28! Expected is DXGI_FORMAT_R8G8B8A8_UNORM_SRGB.
    3. UnityEngine.Debug:Log(Object)
    4. Coherent.UI.UnityLogHandler:WriteLog(Severity, String, UInt32) (at Assets/Standard Assets/Scripts/CoherentUI/Detail/LogHandler.cs:19)
    5. Coherent.UI.ILogHandler:SwigDirectorWriteLog(Int32, String, UInt32) (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/ILogHandler.cs:67)
    6. Coherent.UI.CoherentUI_NativePINVOKE:UISystem_Update(HandleRef)
    7. Coherent.UI.UISystem:Update() (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/UISystem.cs:50)
    8. CoherentUISystem:Update() (at Assets/Standard Assets/Scripts/CoherentUI/CoherentUISystem.cs:842)
    9.  
     
  17. Gatu

    Gatu

    Joined:
    May 20, 2013
    Posts:
    9
    Hello i d like to ask if there is a way to listen to a stream using CoherentUI.
    Something like this for example "http://majestic.wavestreamer.com:9820/listen.m3u?sid=1"
    I used this as the View's URL and the message i got is "Downloads are disabled when using the default Unity3D SystemListener!"
    Haven't tried anything else.
    Thanks.
     
  18. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    That's disappointing, as we've just gone down the Amplify Color route and probably will be using Bloom at some point.
     
  19. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Any word yet on my above issues regarding gamma and DX11 problems? Gamma doesn't seam to be an issue in DX11 now when I can get it to work, but it usually throws the above errors and doesn't work and often just crashes Unity.
     
  20. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Updated to 1.8.0.0 and now I get the below in DX11 with the view not rendering.

    Code (csharp):
    1.  
    2. [Coherent UI] (Error) Accessing inactive internal renderer
    3. UnityEngine.Debug:Log(Object)
    4. Coherent.UI.UnityLogHandler:WriteLog(Severity, String, UInt32) (at Assets/Standard Assets/Scripts/CoherentUI/Detail/LogHandler.cs:19)
    5. Coherent.UI.ILogHandler:SwigDirectorWriteLog(Int32, String, UInt32) (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/ILogHandler.cs:67)
    6. Coherent.UI.CoherentUI_NativePINVOKE:UISystem_CreateView__SWIG_1(HandleRef, HandleRef, String, HandleRef, String)
    7. Coherent.UI.UISystem:CreateView(ViewInfo, String, ViewListenerBase, String) (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/UISystem.cs:63)
    8. CoherentUIView:SendCreateView() (at Assets/Standard Assets/Scripts/CoherentUI/CoherentUIView.cs:1067)
    9. CoherentUIView:OnSystemReady() (at Assets/Standard Assets/Scripts/CoherentUI/CoherentUIView.cs:1083)
    10. CoherentUISystem:OnSystemReady() (at Assets/Standard Assets/Scripts/CoherentUI/CoherentUISystem.cs:639)
    11. Coherent.UI.SystemListener:SystemReady() (at Assets/Standard Assets/Scripts/CoherentUI/Detail/SystemListener.cs:25)
    12. Coherent.UI.EventListener:SwigDirectorSystemReady() (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/EventListener.cs:88)
    13. Coherent.UI.CoherentUI_NativePINVOKE:UISystem_Update(HandleRef)
    14. Coherent.UI.UISystem:Update() (at /Users/coherent/Desktop/PandoStatic/Pando/Coherent/UI/DotNET/swig/UISystem.cs:50)
    15. CoherentUISystem:Update() (at Assets/Standard Assets/Scripts/CoherentUI/CoherentUISystem.cs:795)
    16.  
    I'm using DX11 with Linear Color Space and Deferred Rendering.

    Works fine in DX9, but then I have washed out UI again when Bloom and AmplifyColor scripts are enabled on my camera.

    Also is there and easier way to send Texture2D to the view? The only usage I'm aware of is converting to byte array then sending that, but if you need to send say 20+ images (think inventories, etc.. all kinds of usages) that's quite a ton of information. Do you have any suggestions for better sending of textures to the view?

    Ok, I have a lot of data to send (including multiple byte arrays). I've converted it all the JSON, but I end up with a string that's more than 4 million characters. This is due to the byte arrays. Is there no other way to send images to the view? I have to send something like 120 images (it's part of my level editor, images are generated).
     
    Last edited: Feb 13, 2014
  21. Krileon

    Krileon

    Joined:
    Oct 30, 2012
    Posts:
    642
    Going on a week now with no response to any of my above posts. You guys not receiving notifications? Is there somewhere else I should be posting my questions?
     
  22. zyzyx

    zyzyx

    Joined:
    Jul 9, 2012
    Posts:
    227
    You could try the official Coherent Labs Forum
     
  23. fanjules

    fanjules

    Joined:
    Nov 9, 2011
    Posts:
    167
    https://forums.coherent-labs.com

    It's much better if you post there as we can all help each other out... though I don't think Coherent mind the odd post in here as like with most asset forum posts it helps spread the word about the product.
     
  24. stoyannk

    stoyannk

    Joined:
    Oct 30, 2012
    Posts:
    35
    Hi Krilleon,

    I'm very sorry for the late reply, we are already working on the issue you reported but forgot to post the reply..
    The linear/gamma problem is being looked at and we'll have a fix very soon. Alas Unity recently changed the way they handle it for Dx11 and we have to compensate for every change they do.

    For the images you want to send - yes, there is a way to do it efficiently now. As of Coherent UI 1.7 we support "Live Game Views" - you can see a blog post with details on them here.
    With them you can directly send a Unity 3D Texture to your Coherent UI View and it can even be "live" - for instance what a Camera draws. Your simpler usage is also fully supported. You can create Components (using the built-in ones) that send the images or as you have a lot images you can do it programmatically with a couple of calls.

    You can take a look at the built-in CoherentUI LiveGameView Component for a sample on how to send your images. If you are having any difficulties you can directly write to us at support[at]coherent-labs.com or in any of the forum threads. Again I'm sorry for the delayed response here.
     
  25. rfonta

    rfonta

    Joined:
    Jan 15, 2014
    Posts:
    2
    Hi !

    We just purshased Coherent UI and finded out that if we press back space in Coherent UI View, the current page is reloaded (or we go to previous page or something like this).

    If there a simple way to disable this behaviour ? (we must receive events on the page).

    Thanks,
     
  26. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi rfonta,

    This is default behavior both for Coherent UI and some browsers. To disable backspace navigating to previous page you can include simple javascript for this in you page like this one:

    Code (csharp):
    1. document.onkeydown = function(e) {stopDefaultBackspaceBehaviour(e);}
    2. document.onkeypress = function(e) {stopDefaultBackspaceBehaviour(e);}
    3.  
    4. function stopDefaultBackspaceBehaviour(event) {
    5.   var event = event || window.event;
    6.   if (event.keyCode == 8) {
    7.     var elements = "HTML, BODY, TABLE, TBODY, TR, TD, DIV";
    8.     var d = event.srcElement || event.target;
    9.     var regex = new RegExp(d.tagName.toUpperCase());
    10.     if (regex.test(elements)) {
    11.       event.preventDefault ? event.preventDefault() : event.returnValue = false;
    12.     }
    13.   }
    14. }
     
  27. rfonta

    rfonta

    Joined:
    Jan 15, 2014
    Posts:
    2
    Works like a charm !

    Didn't know that this behaviour could be overridden in JS !

    Thanks a lot !
     
  28. sloopidoopi

    sloopidoopi

    Joined:
    Jan 2, 2010
    Posts:
    244
    Hi,
    I just wanted to know if Coherent UI works the same way on IOS and Android, or are there any differencies? My main question is if i can use Coherent UI as a mediaplayer to watch videos on both platforms?
     
  29. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    I've been using the latest trial version of this product, and it's been working great.

    I've been having trouble debugging, though. When an error occurs in the Javascript, there seems to be no stack trace of any kind that is shown in the Unity Editor. This makes it very hard to know where the issue lies, when something isn't working right.

    Is there something wrong with my setup, or does Coherent UI not, by default, output errors to the Unity console? If so, is there a way to enable this?

    As a work-around for now, I place "try { [...] } catch(e) { alert(e); }" blocks around areas that I suspect are the cause of the error, and watch the Unity Editor for any error messages. (I actually use the BindCall system to tell Unity to log the message to the console; I wrote "alert" in the above for simplicity's sake)

    Is there a better way to approach in-Unity page debugging? I use Firebug for basic code debugging, but a lot of the Javascript code depends on data from Unity, and so it would be nice to be able to actually test it through the Coherent UI plugin.
     
  30. africanrhino

    africanrhino

    Joined:
    Aug 15, 2013
    Posts:
    11
    hi,
    i'm trying to hook coherentui up to a in app virtual keyboard but am not finding how to send a specific keycode as input to coherent. how would i do that? is there a sendkeypress interface similar to setmouseposition.

    Thanks a lot!
     
  31. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    @ sloopidoopi

    For Android Coherent UI uses WebViews and for IOS UIWebViews. Although there are some platform specifics the behavior of Coherent UI on IOS and Android is essentially the same. You should be able to play videos without any problems just as long as you don't use them on surface views.

    @ Venryx

    To facilitate the debugging process you can use the Coherent UI debugger. It is located in the CoherentUI folder and it has versions for Mac, Windows and Linux. It has the same debugging capabilities as the debugger of Chrome. You can use it to debug any HTML/JavaScript errors.

    @africanrhino

    Can you please tell me more your project with the virtual keyboard? Also on what platform do you plan on deploying your application?

    if it is desktop you can try using KeyEventData.EventType.KeyDown;

    If it is for mobile you can use the CoherentTouch.

    You can find more information about Coherent.UI.KeyEventData and Coherent.UI.TouchEventData in the documentation.
     
  32. africanrhino

    africanrhino

    Joined:
    Aug 15, 2013
    Posts:
    11
    It's a virtual keyboard for a xbox controller in unity as a gameobject. I'm trying to forward all the key codes to the view something like one does with the mouse coordinates via view.setmouseposition(vector) because no one ever presses a key on an actual keyboard.
     
  33. prebelo

    prebelo

    Joined:
    Sep 5, 2013
    Posts:
    11
    Just a heads up, I was also having the famous Exception: "Win32Exception: ApplicationName='jarsigner', CommandLine='-sigalg MD5withRSA -digestalg......" and my .apk would end up with almost 200mb size.

    Oh and I also added the <JDK>/bin folder to the Path Environment Variables and tried to do jarsigner in my cmd.exe and it would all be good.

    What I was missing was that the Path needs to have BOTH 32bit and 64bit versions if you happen to install both for some reason, so you need to do something like: C:\Program Files\Java\jdk1.8.0\bin\;C:\Program Files (x86)\Java\jdk1.8.0\bin\

    Hope I helped anyone in this particular situation :)
     
  34. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    Hey there,

    So I am getting a very strange issue here.
    I am using CoherentUI for a Unity-Android project. It works like a charm apart from that tiny issue that is driving me mad.

    For some reason, on newer ends devices (Nexus 5, Samsung Galaxy S4) when I exit the app via
    Application.Quit()
    CoherentUI shuts down, BUT not properly ? For some reason I am getting a weird SIGABRT signal.
    My investigation led me to believe it occured in
    CoherentUISystem.cs

    in the Update loop at line 837 :
    m_UISystem.Update() ;

    I have ne idea why, if I try to add a boolean check there set to true when OnApplicationQuit is called, but it just crash Unity-Editor and I have to restart it.

    Any idea what might happen ?
     
  35. Electrik_Sheep

    Electrik_Sheep

    Joined:
    Sep 15, 2013
    Posts:
    15
    Quick Update,

    If you maybe want to see the issue by yourself and debug it:
    * Create new Unity project
    * Import CoherentUI 1.8.1 Unity package.
    * Load one of the sample scene ( I tried MobileSurface.unity ).
    * Add a script to capture the Android Back button action and quit upon pressing it :

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class AndroidBackButton : MonoBehaviour {
    5.  
    6.     // Update is called once per frame
    7.     void Update () {
    8.                 if (Input.GetKeyDown (KeyCode.Escape)) {
    9.                         Application.Quit ();
    10.                 }
    11.     }
    12. }
    13.  
    * Put aforementioned script on a gameobject
    * Build
    * Use Android Manager to put it on the device
    * Press escape

    Additional Info :
    Using Unity 4.3.4f1 on Mac OS X.9.2
    Happens on High end device such as (tested)
    * Nexus 5 : 4.4
    * Samsung Galaxy S4 (Snapdragon) : 4.3

    Cheers ~<3
     
  36. panz3r

    panz3r

    Joined:
    Dec 10, 2012
    Posts:
    33
    Is it possible to use ssl certificates to avoid man in the middle/proxy attacks on the connexion ?
     
  37. 3_2_1

    3_2_1

    Joined:
    Jan 17, 2014
    Posts:
    3
    I'd like several objects to share the same Coherent UI material, and don't need them to be able to receive input from the player. Can anyone suggest a way to do this?

    In my mind, it would be like having CoherentUIView on an empty object, and then having it pass on its material to other objects. I'm not sure if this is even possible, and maybe there would be a better way of achieving this?

    Thanks for your help!
     
  38. Venryx

    Venryx

    Joined:
    Sep 25, 2012
    Posts:
    444
    Well, you could use a RenderTexture, as I've done in my project.

    Just create a RenderTexture asset in the Project view (or create one programmatically at runtime), and drag it into the "Target Texture" slot of the Camera script. The page's view should then be output to the Camera, which is rendered into the RenderTexture, and then you can do whatever you want with it. (save it to file, display it on-screen over a certain area, etc.)
     
    Last edited: Mar 31, 2014
  39. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi all,

    @3_2_1
    You can try the RenderTexture solution proposed by Venryx.

    @panz3r
    Apart from "Basic" all versions of Coherent UI for Unity support SSL. If the certificate is signed then it will be used automatically by the view when connecting through https. If it's not signed/self signed you should write something like the code below to handle it.

    Code (csharp):
    1. class CertificateTester : MonoBehaviour
    2. {
    3.     public void Start()
    4.     {
    5.         var viewComponent = GetComponent<CoherentUIView>();
    6.         viewComponent.Listener.CertificateError += (url, status, certificate, response) => {
    7.             if (url.Contains("msn")) {
    8.                 Debug.Log ("MSN allowed");
    9.                 response.ContinueRequest();
    10.             } else {
    11.                 Debug.Log (url + " disallowed");
    12.                 response.CancelRequest();
    13.             }
    14.         };
    15.     }
    16. }
    @Electrik_Sheep

    Your case is being handled by our support team. You'll receive notification by our support system as soon as it's resolved.

    @Venryx @prebelo - Thanks guys for sharing the knowledge :)
     
  40. 3_2_1

    3_2_1

    Joined:
    Jan 17, 2014
    Posts:
    3
    Wow that's awesome. Thanks Venryx!
     
  41. v0kb0l0k

    v0kb0l0k

    Joined:
    Feb 21, 2013
    Posts:
    9
    Can any body tell me why mouse click on plane object with attached coherent ui view script doesn't match over while clicking on it?:D I have trial version now.
     
  42. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi v0kb0l0k,

    Do you mean that the is no input on the view when you try to click it? If this is so you need to enable it either by setting its "ReceivesInput property" to “true” or by clicking on the "Lockable focus" check-box in the inspector.
     
  43. v0kb0l0k

    v0kb0l0k

    Joined:
    Feb 21, 2013
    Posts:
    9
    No, I solved my problem. After start playing project I have script that changing my main camera to another and desable first one. Now I have script that manualy binding new camera to CoherentUISystem and it working ok.
    And next quastion, can I add site address bar to my view?
     
  44. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Currently there is no build in address bar widget. However you can easily create one. Just add another view and use HTML/JavaScript to create an address bar.
     
  45. unclebob301

    unclebob301

    Joined:
    Jan 29, 2014
    Posts:
    20
    Hi

    I have the trial version and am getting to grips with it.

    Now need to build some simple functionality.

    However I am stuggling to find a simple solution/script that takes the URL of a web page viewed in the Main Camera with Coherent attached to it and saves it in a variable.

    I know this is pretty basic stuff but would really appriciate a leg up here.

    Also can I suggest on the Coherent forums a new forum for saved/proven/standard methods of doing things as from reading all this and other threads some standard themes keep arising and a single point that pulls these solutions together would be a great fast track for the prodcut as well as encouraging adoption.

    Cheers for any help.
     
  46. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi unclebob301,

    To get the current URL of the view just use the "Page" property of the view.

    You can try it by attaching the sample code below to a gameobject that has a Coherent UI view. When started it will print the current URL of the View.

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class Page : MonoBehaviour {
    5.  
    6.     void Start ()
    7.     {  
    8.         var m_view = GetComponent<CoherentUIView>();  
    9.         var page = m_view.Page;
    10.         Debug.Log("The current page is:" + page);  
    11.     }
    12.  
    13. }
    Thanks for you feedback. We actually have Knowledge base section in our Forum - https://forums.coherent-labs.com/index.php/board,20.0.html . It has topics for various FAQs and we are constantly updating it. I just added a new topic for the "Page" property of the views :)


     
  47. uniphonic

    uniphonic

    Joined:
    Jun 24, 2012
    Posts:
    130
    I own a Coherent UI Standard license. Any plans to add Windows Phone support in the future?

    Thanks!
    Jacob
     
  48. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi Jacob,

    Currently we don't plan to add support for Windows Phone. We want to provide our users with the same development experience on all platforms. Since Coherent UI is based on WebKiT on Windows Phone this is hard to achieve.

     
  49. unclebob301

    unclebob301

    Joined:
    Jan 29, 2014
    Posts:
    20
    Thank you for the code.

    Unfortunately it only seems to pass the first part of a URL not the complete address of the page viewed.

    Am I missing something obvious here?

    For instance with the bbc news website it only posts in the log

    http://www.bbc.co.uk/

    But what I am after is

    http://www.bbc.co.uk/news/

    Cheers
     
  50. XpuctoK

    XpuctoK

    Joined:
    Dec 16, 2013
    Posts:
    26
    Hi unclebob301,

    Please note that the code above is just sample and since the "Page"' property is in the start method it will just display the initial page. If you first set the view to http://www.bbc.co.uk/ and then navigate to http://www.bbc.co.uk/news/ the code above will show http://www.bbc.co.uk/ because"Page" was called just once - when the scene has been initially started.To display the current web site you'll need to call "Page" in update or some other method that you use.

    If you did this and still cannot get the correct URL please contact our support at support@coherent-labs.com