Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

NoesisGUI : XAML-based User Interface [RELEASED]

Discussion in 'Assets and Asset Store' started by sfernandez, Jul 23, 2013.

  1. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    :) That is the way we work here...
     
  2. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Yes, there are parts coded in c++ that cannot be easily ported to C#, and several third parties... I think that the best solution would be creating the window with Unity API, getting the OS window handle and passing it to our native world for rendering into it. But as said, may be this is not legal for a unity store app. I think it should be because there are several packages in the store that interact with the local operating system.
     
  3. Techdread

    Techdread

    Joined:
    Sep 10, 2010
    Posts:
    25
    Please don't bother with this or put it way down your list, Your workflow is already very good with Unity with linking to blend.
     
  4. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    yes, for now our priority is improve stability inside Unity and polish the API in C#. Apart from solving all the bugs that our clients are reporting of course.
     
  5. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    My projects support a number of split screen players (cameras), each with varying aspect ratios. How easy/difficult would it be to use the same interface design aligned with multiple cameras, each with their own states? The tutorial video would have me believe that accessing the individual elements from code wouldn't work due to the way you look up elements in the root by name.

    Also, I use UnityScript. How, if at all, will I be limited?
     
  6. Crazy Robot

    Crazy Robot

    Joined:
    Apr 18, 2009
    Posts:
    921
    I'm interested in this, but I really need to see performance numbers for mobile. NGUI vs NoesisGUI.
     
  7. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Yes, it is possible. Each time you load an interface it is properly instantiated. You would have to add a NoesisGUI panel component to each camera. For accessing the elements you use the "name" of the item and the corresponding component.

    NoesisGUI is c#, although it seems that Javascript code works fine. We did't test it yet but for example I tried this code and it works

    Code (csharp):
    1.  
    2. #pragma strict
    3.  
    4. import Noesis;
    5.  
    6. var _btn : Button;
    7.  
    8. function Start ()
    9. {
    10.     var gui = GetComponent.<NoesisGUIPanel>();
    11.     var root = gui.GetRoot.<FrameworkElement>();
    12.     _btn = root.FindName.<Button>("btn");
    13.     _btn.Click += OnBtnClick;
    14. }
    15.  
    16. function OnBtnClick()
    17. {
    18.     Debug.Log("Button clicked");
    19. }
    20.  
     
  8. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    Cool, cool. Thanks.
     
  9. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Do you have a NGUI sample that we could convert to NoesisGUI?
     
  10. soloneer

    soloneer

    Joined:
    Nov 23, 2010
    Posts:
    62
    Is there a timescale for introducing support for the Webplayer, (i.e. do you still intend to support web platform output)? All our products at the moment are for the web.
     
  11. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Hi,

    Our unique plan for web (and is low priority) is HTML5 + WebGL. Unity, for now, can only play content using is proprietary plugin (that is not compatible with native plugins like NoesisGUI). Although we think that this is something that will be changing, because, clearly the future of the web is that way.
     
  12. soloneer

    soloneer

    Joined:
    Nov 23, 2010
    Posts:
    62
    Thanks, this is what I was curious about as I know using third party plugins in Unity don't work for web platform.
     
  13. AngryOrange

    AngryOrange

    Joined:
    Jan 30, 2012
    Posts:
    103
    How about mac users ? The only way to use this plugin is to have visual studio right?
     
  14. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Hi, I didn't understand your private message. I though you were asking is NoesisGUI can execute in mac platforms (the answer is yes).

    But, about blend, yes, it seems that you need a virtual machine... sorry.
     
  15. AngryOrange

    AngryOrange

    Joined:
    Jan 30, 2012
    Posts:
    103
    ok , no problem :) Virtual machine is no problem too if the tool is worth it.
     
  16. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,050
    Hi I currently use EZGUI, export bitmaps from Inkscape to Unity for UI display. Inkscape was mentioned as part of the work flow. At what point in the process is the svg (which was saved as XAML) converted to a form where Unity will display it?

    iByte
     
  17. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    In case you want to preserve the data as Vector Graphics you can export to XAML using Inkscape. The xaml generated by inkscape is almost ready to be displayed by Unity. You have to insert it inside a valid container. For example, Tux is one of our samples, it comes directly from a svg exported from Inkscape and inserted inside a Grid within a Viewbox (to scale it to the size of the window).

    Code (csharp):
    1.  
    2. <Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Margin="10" mc:Ignorable="d">
    3.     <Viewbox>
    4.         <Viewbox Width="16">
    5.             <Grid Margin="-44,-111,-63,62">
    6.                 <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path4" Data="m 344.427 534.692 51.63 82.284 66.957 33.882 101.646 -33.075 61.31 -95.192 -6.453 -88.739 -50.017 -111.326 -23.394 -44.369 -125.041 1.613 -6.454 37.916 -43.562 73.41 -29.042 79.865 2.42 63.731 z" Fill="#FFFFFFFF">
    7.                     <Path.RenderTransform>
    8.                         <TranslateTransform X="-188.771" Y="11.2936"/>
    9.                     </Path.RenderTransform>
    10.                 </Path>
    11.                 <Canvas x:Name="g5">
    12.                     <Canvas>
    13.                         <Canvas.RenderTransform>
    14.                             <TransformGroup>
    15.                                 <TranslateTransform X="107.656" Y="-154.861"/>
    16.                             </TransformGroup>
    17.                         </Canvas.RenderTransform>
    18.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path108" Data="m 329.336 727.552 c -14.112 -1.224 -25.2 -11.736 -26.208 -32.616 3.24 -55.44 6.48 -112.824 -31.896 -149.832 -5.976 -46.08 -27.216 -63 -37.224 -92.592 l -15.768 -11.304 18.864 -29.52 8.064 0.216 78.768 159.264 16.488 80.28 -11.088 76.104 z" Fill="#FFC1C1BF"/>
    19.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path107" Data="m 136.232 439.696 c -2.376 15.552 -3.672 30.816 -1.44 45.576 -16.416 22.32 -28.872 44.856 -30.312 68.04 -12.456 33.192 -42.048 61.272 -36.936 126.792 16.632 17.352 39.888 33.48 59.832 50.256 25.056 20.952 10.152 48.6 -25.128 42.048 -7.848 -8.64 -25.632 -62.784 -59.328 -96.12 l 6.624 -43.704 31.824 -85.176 39.6 -63.36 4.392 -27.36 -5.544 -69.912 4.608 -25.56 11.808 78.48 0 0 z" Fill="#FFC1C1BF"/>
    20.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path106" Data="m 115.64 341.416 c 0.936 -5.04 2.16 -9.792 3.672 -14.256 l 2.376 15.624 -6.048 -1.368 z" Fill="#FFC1C1BF"/>
    21.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path105" Data="m 120.968 500.464 c -12.6 23.328 -16.992 45.792 11.952 49.752 -15.912 3.672 -35.712 18.432 -55.728 43.272 l 0.432 -50.472 23.832 -39.744 19.512 -2.808 z" Fill="#FFC1C1BF"/>
    22.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path104" Data="m -33.256 818.488 c 43.776 19.656 74.664 18.576 102.528 32.472 22.032 11.592 44.28 10.224 57.672 -3.816 11.376 -14.688 19.8 -15.408 36.576 -16.92 27.432 -1.656 54.216 -1.944 78.408 0.576 l 27.648 2.232 c -0.504 31.032 58.464 34.848 75.816 11.304 20.952 -24.912 49.752 -36.072 74.448 -54.144 L 289.304 725.536 c -33.48 80.928 -158.256 102.096 -175.536 37.728 l -147.024 55.224 z" Fill="#FFC1C1BF"/>
    23.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path103" Data="m 286.424 711.568 c -12.6 -0.072 -25.488 4.032 -24.48 20.592 l 4.248 44.28 38.232 -19.8 -18 -45.072 z" Fill="#FFC1C1BF"/>
    24.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path102" Data="m -37.36 821.224 c 44.496 19.656 75.96 18.504 104.328 32.472 22.392 11.52 45 10.224 58.68 -3.888 11.592 -14.616 20.16 -15.336 37.224 -16.848 27.864 -1.728 55.152 -1.944 79.776 0.504 l 28.08 2.304 c -0.504 31.032 59.544 34.776 77.184 11.232 21.312 -24.912 50.616 -36 75.744 -54.144 L 290.816 728.272 C 256.76 809.128 129.824 830.296 112.256 766 L -37.36 821.224 z" Fill="#FF000000"/>
    25.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path101" Data="m 382.328 691.984 c 21.312 6.984 7.56 28.296 18.432 40.536 4.68 10.368 14.544 19.512 31.032 28.008 27.576 13.896 -5.544 38.808 -39.024 51.552 -40.824 13.536 -48.744 50.832 -93.456 39.816 -16.2 -5.4 -20.952 -20.088 -20.448 -42.768 5.4 -46.368 -1.08 -78.696 -0.072 -110.304 -0.072 -12.672 4.752 -14.184 28.44 -10.872 2.808 38.376 45.144 39.384 75.096 4.032 z" Fill="#FFB77200"/>
    26.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path100" Data="m 339.632 826.624 c 31.968 -12.312 64.224 -28.512 90.216 -44.496 7.992 -4.68 9.072 -16.2 -2.16 -19.8 -24.336 -13.824 -37.584 -31.104 -34.776 -53.568 0.432 -7.848 -9.216 -16.2 -11.808 -8.712 -21.24 71.424 -89.784 67.608 -80.352 -3.096 0.504 -2.088 1.008 -4.176 1.512 -6.192 -12.312 -2.52 -17.064 0.216 -16.488 9.648 l 9.504 106.2 c 2.376 24.192 22.032 29.52 44.352 20.016 z" Fill="#FFF2B700"/>
    27.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path99" Data="m 354.464 537.544 c 24.696 32.256 49.968 113.544 29.952 154.008 -23.472 46.224 -76.608 51.696 -78.912 4.248 3.312 -56.16 6.48 -114.264 -31.824 -151.704 -5.976 -46.728 -27.288 -63.864 -37.296 -93.816 l -33.264 -24.192 -69.552 9 c -2.808 17.064 -4.464 33.696 -2.016 49.824 -16.488 22.464 -28.944 45.144 -30.384 68.4 -12.456 33.336 -42.048 61.632 -36.936 127.44 16.632 17.496 39.888 33.696 59.832 50.544 25.056 21.096 11.448 45 -23.832 38.376 C 78.848 746.056 56.744 722.872 35.288 699.328 12.392 683.056 3.896 662.176 27.368 630.496 43.424 609.04 47.96 562.456 62 543.664 74.312 525.16 92.24 508.6 105.272 490.096 c 6.912 -12.168 9.072 -21.528 7.992 -35.64 l -2.952 -85.32 c -1.944 -61.92 32.112 -94.896 79.488 -93.888 53.712 0.504 97.776 37.224 98.352 103.032 4.536 32.04 -4.896 50.4 20.52 96.192 25.848 48.24 29.88 45.648 45.792 63.072 z" Fill="#FF000000"/>
    28.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path98" Data="m 261.296 503.632 2.232 8.568 c -5.832 -10.512 -12.816 -28.584 -21.6 -36.504 -2.664 -2.16 -6.12 -2.088 -8.208 -0.072 -11.664 11.304 -40.608 34.488 -63.792 31.464 -17.856 -1.8 -35.28 -13.824 -39.096 -26.856 -2.016 -9.36 -1.08 -17.064 0.144 -24.912 l 109.728 -1.8 c -2.232 9.648 12.384 33.48 20.592 50.112 z" Fill="#FFC1C1BF"/>
    29.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path97" Data="m 143.144 363.232 c 10.944 0 20.736 13.608 20.664 32.4 -0.072 12.6 -8.28 15.84 -14.472 21.384 -2.736 2.52 -3.384 16.128 -6.768 16.128 -10.872 0 -19.08 -19.368 -19.08 -37.512 0 -18.072 8.784 -32.4 19.656 -32.4 z" Fill="#FFC1C1BF"/>
    30.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path96" Data="m 144.368 375.04 c 9.72 0 16.488 4.896 17.28 16.272 0.576 7.848 -1.512 20.448 -6.984 23.112 -2.52 1.224 -11.232 12.24 -14.256 12.096 C 128.096 425.944 125 402.112 125.936 390.736 126.8 379.36 134.72 375.04 144.368 375.04 z" Fill="#FFFFFFFF"/>
    31.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path95" Data="m 141.848 382.672 c 6.696 -0.576 12.888 7.056 13.752 16.992 0.864 9.936 -3.96 18.576 -10.656 19.152 -6.696 0.576 -12.888 -7.056 -13.752 -17.064 -0.864 -9.936 3.96 -18.504 10.656 -19.08 z" Fill="#FF000000"/>
    32.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path94" Data="m 151.064 397.288 c 0.36 1.8 -1.656 2.736 -2.232 0.936 -0.576 -2.232 -1.944 -4.896 -3.744 -7.056 -1.152 -1.296 0 -2.736 1.44 -1.728 2.52 2.088 3.96 4.68 4.536 7.848 z" Fill="#FFC1C1BF"/>
    33.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path93" Data="m 216.944 360.712 c 15.768 0 28.656 16.704 28.656 37.08 0 20.448 -12.888 37.08 -28.656 37.08 -15.768 0 -28.512 -16.632 -28.512 -37.08 0 -20.376 12.744 -37.08 28.512 -37.08 z" Fill="#FFC1C1BF"/>
    34.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path92" Data="m 224.792 374.968 c 10.872 3.888 17.136 12.456 17.928 21.6 0.936 10.512 -3.312 22.392 -12.456 29.376 -2.592 1.944 -32.544 -9.864 -34.272 -14.328 -2.592 -6.408 -4.176 -18.72 -2.232 -25.992 0.792 -2.88 3.456 -7.056 7.416 -9.288 6.264 -3.528 15.48 -4.248 23.616 -1.368 z" Fill="#FFFFFFFF"/>
    35.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path91" Data="m 216.872 380.944 c 8.712 0 15.84 8.352 15.84 18.504 0 10.224 -7.128 18.576 -15.84 18.576 -8.712 0 -15.84 -8.352 -15.84 -18.576 0 -10.152 7.128 -18.504 15.84 -18.504 z" Fill="#FF000000"/>
    36.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path90" Data="m 227.096 392.392 c 1.008 1.656 -0.648 3.384 -1.872 1.728 -1.44 -2.016 -3.816 -4.176 -6.336 -5.688 -1.656 -0.864 -1.08 -2.808 0.792 -2.232 3.24 1.08 5.688 3.168 7.416 6.192 z" Fill="#FFC1C1BF"/>
    37.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path89" Data="m 164.96 404.488 c 7.416 -2.16 19.152 -1.44 27.288 0.144 8.136 2.16 29.808 13.608 52.776 26.064 2.952 1.512 3.816 6.408 0 7.992 -5.904 0.432 4.248 14.976 -6.12 20.16 -15.552 4.032 -40.464 27.144 -52.776 29.016 -6.84 1.512 -13.896 1.728 -21.528 0 -24.048 -4.896 -30.384 -32.256 -41.688 -37.8 -3.096 -3.24 -1.512 -8.856 -0.504 -10.008 1.224 -5.832 27.288 -33.84 42.552 -35.568 z" Fill="#FFB77200"/>
    38.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path88" Data="m 185.408 405.856 c 13.032 1.44 40.68 18.072 54 24.768 3.312 1.8 3.096 7.2 0.144 8.064 -3.168 1.8 -4.104 -0.432 -6.624 -0.792 -4.032 -2.16 -10.656 3.024 -15.912 6.984 -30.312 22.896 -36.36 20.376 -60.84 17.784 -8.496 -2.088 -14.04 -4.68 -16.488 -6.696 1.8 -10.08 20.808 -48.312 27.072 -49.176 1.584 -2.088 13.176 -2.16 18.648 -0.936 z" Fill="#FFF2B700"/>
    39.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path87" Data="m 190.664 412.048 3.096 1.368 c 2.304 1.296 -0.504 4.752 -3.024 3.672 l -4.536 -1.584 c -2.664 -2.232 0.504 -5.4 4.464 -3.456 z" Fill="#FFB77200"/>
    40.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path86" Data="m 268.568 452.368 c 4.464 2.016 10.656 4.824 13.968 7.776 2.952 3.96 4.248 7.92 3.888 11.88 -0.648 2.52 -2.304 4.32 -5.184 5.4 -3.384 0.792 -7.56 0 -9.864 -3.312 -1.512 -2.664 -6.12 -11.952 -7.416 -13.536 -1.728 -3.456 -2.016 -6.12 -1.08 -8.208 1.152 -1.08 3.168 -1.368 5.688 0 z" Fill="#FFB77200"/>
    41.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path85" Data="m 273.752 461.584 c 1.728 0.792 4.176 1.872 5.472 3.096 1.152 1.584 1.656 3.096 1.512 4.68 -0.216 0.936 -0.936 1.656 -2.016 2.088 -1.368 0.36 -2.952 0 -3.888 -1.296 -0.576 -1.008 -2.376 -4.68 -2.88 -5.328 -0.72 -1.368 -0.864 -2.376 -0.504 -3.24 0.504 -0.432 1.296 -0.504 2.304 0 z" Fill="#FFC1C1BF"/>
    42.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path84" Data="m 238.616 358.552 c 0.432 0.648 0.36 1.224 -0.216 1.728 -0.504 0.504 -1.224 0.432 -2.16 -0.072 l -4.608 -3.96 c -0.576 -0.504 -0.72 -1.296 -0.36 -2.16 1.008 -0.648 1.872 -0.648 2.664 0 l 4.68 4.464 z" Fill="#FFB77200"/>
    43.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path83" Data="m 235.592 305.992 c 4.032 2.232 5.256 7.92 2.592 12.6 -2.592 4.608 -8.064 6.552 -12.168 4.248 -4.032 -2.304 -5.256 -7.92 -2.592 -12.6 2.592 -4.68 8.064 -6.552 12.168 -4.248 z" Fill="#FFB77200"/>
    44.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path82" Data="m 374.912 680.536 c 3.384 2.592 -1.656 6.84 -3.888 5.76 -1.872 -0.648 -3.24 -2.808 -4.104 -3.888 -0.792 -1.224 -0.72 -3.24 0 -3.96 0.792 -1.008 2.808 -0.792 4.104 0.072 1.296 0.648 2.592 1.368 3.888 2.016 z" Fill="#FFB77200"/>
    45.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path81" Data="m 297.44 551.512 c 41.544 21.384 52.56 60.048 34.632 112.68 -1.08 2.448 2.088 4.176 3.168 1.872 19.584 -55.728 6.192 -94.752 -36.216 -117.504 -2.16 -1.008 -3.744 1.872 -1.584 2.952 z" Fill="#FFB77200"/>
    46.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path80" Data="m 72.008 569.512 c -33.696 57.744 -33.912 93.168 -9.504 111.816 1.224 0.936 1.944 -1.296 0.792 -2.16 -27 -23.688 -14.4 -63.648 10.872 -108.288 0.72 -1.296 -1.656 -2.448 -2.16 -1.368 z" Fill="#FFB77200"/>
    47.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path79" Data="m 289.376 586.864 c -0.144 2.304 -1.008 2.664 -2.952 0.504 -6.624 -11.52 -51.336 -35.928 -73.08 -38.664 -4.104 -1.44 -3.888 -3.312 0.144 -3.888 15.696 0 27.792 -6.912 41.472 -6.912 3.744 0.144 7.344 1.584 9.432 3.744 5.112 3.312 23.688 28.944 24.984 45.216 z" Fill="#FFC1C1BF"/>
    48.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path78" Data="m 180.152 546.832 c 0.72 3.96 -16.344 -1.152 -15.408 9.864 0.288 3.024 -4.248 4.68 -4.104 0 0 -8.424 0.432 -8.28 -7.92 -9.864 -1.512 -0.072 -1.368 -2.304 0 -2.016 l 0 0 c 5.976 1.656 14.04 -1.944 13.68 -5.976 -0.144 -1.368 2.16 -1.152 2.088 0 -0.504 6.408 13.176 3.312 11.664 7.992 z" Fill="#FFC1C1BF"/>
    49.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path77" Data="m 151.568 705.376 c 0.072 2.952 -2.808 2.304 -3.024 0.216 -8.352 -25.056 -4.824 -86.76 3.312 -106.632 0.576 -2.88 4.392 -2.016 3.888 0 -8.64 36.504 -8.496 74.088 -4.176 106.416 z" Fill="#FFC1C1BF"/>
    50.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path76" Data="m 51.704 684.424 c 23.976 23.4 39.672 58.824 62.928 90.864 33.84 40.752 6.84 83.016 -48.168 70.272 -27.576 -10.368 -67.248 -9.216 -99.144 -19.728 -22.392 -5.472 -23.184 -16.56 -11.736 -38.232 4.032 -13.824 4.392 -36.288 0.648 -55.008 -2.016 -14.184 4.536 -22.104 19.656 -23.76 l 0 0 c 12.816 -0.144 30.672 5.04 40.392 -22.392 7.272 -13.104 24.696 -13.464 35.424 -2.016 z" Fill="#FFB77200"/>
    51.                         <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="path75" Data="m 24.632 699.04 c -0.792 -18.072 14.688 -21.744 25.056 -10.728 18.504 22.68 35.424 47.736 50.688 76.68 24.336 39.168 4.248 77.688 -32.472 63.072 -18.216 -10.224 -61.776 -14.76 -85.248 -18.936 -15.696 -1.296 -17.784 -11.52 -11.808 -17.28 8.208 -9.432 9.072 -32.04 1.296 -51.336 -7.704 -11.952 6.768 -25.128 18.144 -19.656 C 0.8 727.048 25.64 713.08 24.632 699.04 z" Fill="#FFF2B700"/>
    52.                     </Canvas>
    53.                 </Canvas>
    54.             </Grid>
    55.         </Viewbox>
    56.     </Viewbox>
    57. </Grid>
    58.  
    $tux.jpg
     
  18. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,050
    HI I am testing the trial package under Windows 7 Unity 4.1.2f. I noticed a performance issue switching between examples in the Control Gallery. It is dropping below 15 frames per second in the profiler. Even the button example I don't find that responsive when moving the mouse over the buttons.

    Any suggestions?

    iByte
     
  19. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Hi,

    What FPS are you getting in the buttons example? (can you test both the alone sample and the one included in the control gallery?)

    Inside the editor or standalone?

    What CPU and GPU are you testing on?
     
  20. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Sorry for asking. There is no standalone in the trial. The standalone is a little bit faster than the editor but anyway your numbers are not normal. There have to be something wrong.

    I have sent you a PM. I need you to send me the logs.
     
    Last edited: Aug 14, 2013
  21. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,050
    Log sent. CPU AMD Phenom IIX6 1045T - GeForce GTX260

    I would say that the individual button demo feels more responsive but I do see the frame rate drop with that sample as well. It is really noticable when switching between different control groups in the control demo. Sounds like you might have a handle on it already, which is good.

    iByte
     
  22. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Yes, it is under control. The patch will come with v1.0.2 (to be released at the end of this week).
    Sorry for the inconvenience...
     
  23. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    yes, that was fixed too (and many more things).
     
  24. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    In WPF there are two kinds of trees present in your interface: the logical tree and the visual tree. Take a look at this simple tutorial if you are not familiar with these concepts.

    NoesisGUI provides two helper classes to iterate through these trees: LogicalTreeHelper and VisualTreeHelper. And here you have a script that iterates both trees (doing nothing on each element :p):

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4. using Noesis;
    5.  
    6. public class IterateTrees : MonoBehaviour
    7. {
    8.     void Start ()
    9.     {
    10.         NoesisGUIPanel gui = GetComponent<NoesisGUIPanel>();
    11.         FrameworkElement root = gui.GetRoot<FrameworkElement>();
    12.         IterateLogicalTree(root);
    13.         IterateVisualTree(root);
    14.     }
    15.  
    16.     void IterateLogicalTree(FrameworkElement element)
    17.     {
    18.         uint n = LogicalTreeHelper.GetChildrenCount(element);
    19.         for (uint i = 0; i < n; ++i)
    20.         {
    21.             FrameworkElement child = LogicalTreeHelper.GetChild(element, i).As<FrameworkElement>();
    22.             if (child != null)
    23.             {
    24.                 IterateLogicalTree(child);
    25.             }
    26.         }
    27.     }
    28.  
    29.     void IterateVisualTree(Visual visual)
    30.     {
    31.         uint n = VisualTreeHelper.GetChildrenCount(visual);
    32.         for (uint i = 0; i < n; ++i)
    33.         {
    34.             Visual child = VisualTreeHelper.GetChild(visual, i);
    35.             if (child != null)
    36.             {
    37.                 IterateVisualTree(child);
    38.             }
    39.         }
    40.     }
    41. }
    42.  
     
  25. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    BTW, in the list of many things to be solved in our proxies is implementing the IEnumerable interface. This way iteration would be more c# friendly.
     
  26. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    Trial link in the first post of this thread updated to the latest version: NoesisGUI-1.0.2.4404.
     
  27. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    In terms of functionality, this asset could be just about the greatest thing ever. I can't help thinking how you could do a vector-based Iron Man style HUD with spinning, animated HUD symbols and all kinds of stuff.

    I'm having some pretty serious stability issues with the trial version though. I can get all of the sample scenes to run, but every time I hit the Play button to stop running a scene, the Unity UI becomes non-responsive. I have to do "End Task" in Task Manager to kill Unity, and from that point on I'm unable to launch it again. It becomes stuck on the splash screen. If I log off and then back on, I can launch Unity again.

    After viewing each of the clip art samples from the ControlGallery scene, I also got an Unhandled Neosis Exception: "Offscreen atlas texture is full. Can't find space for 720x-74 rectangle. Please increase Offscreen size in renderer."
     
  28. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Hi Steve,

    it seems that you are facing one problem related to the android sdk (yes, although you are not deploying to an android device)

    http://forum.unity3d.com/threads/148176-Bug-Unity-runs-adb-exe-when-entering-play-mode-in-the-editor

    Could you confirm me that you have the process adb.exe running when you hit play and that the problem is solved killing that process?

    For us, it still not clear if this is a problem in Unity or in our side. More people reported this in our forum (http://www.noesisengine.com/forums/viewtopic.php?f=3&t=92#p550)

    About the second problem, did you tried the v1.0.2 trial version or which one? Could you describe the exact steps to repro the problem?

    Thanks a lot.
     
  29. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Aha! Yes, that's it exactly, just as described in those threads. As soon as I hit play, there is, in fact, an adb.exe process running. If I kill it, Unity returns to normal behavior. I've had a lot of fun playing with the trial, so at the very least, that gives me a way to keep going without having to log off/log on constantly. Weird, I haven't seen that with any other Unity project, not even the ones that I *do* deploy to Android.

    I am getting the second issue on the latest trial version, NoesisGUI-1.0.2.4404. I did not get the error with the previous version, though I don't know if I did exactly the same thing.

    I can reproduce the second issue by running the ControlGallery sample scene and just clicking through the sample items on the list to the left. Sometimes I'll get the error on the very first item. The first time was after clicking on the butterfly/lion/tux clip art. Other times it'll be after clicking on a random sample control item from the list.

    The numbers in front of the word "rectangle" in the error message vary a bit each time. The last one I got was "Offscreen atlas texture is full. Can't find space for 30x-22 rectangle. Please increase Offscreen size in renderer". The detail in the bottom part of the error dialog is:

    Code (csharp):
    1. [ 0] [0x1c0cbbe6] Noesis.dll!<Unknown function>
    2. [ 1] [0x1c2de2fd] Noesis.dll!<Unknown function>
    3. [ 2] [0x1c2ded62] Noesis.dll!<Unknown function>
    4. [ 3] [0x1c2dee63] Noesis.dll!<Unknown function>
    5. [ 4] [0x1c2db65f] Noesis.dll!<Unknown function>
    6. [ 5] [0x1c2db7ff] Noesis.dll!<Unknown function>
    7. [ 6] [0x1c2d58f3] Noesis.dll!<Unknown function>
    8. [ 7] [0x1c2d5aba] Noesis.dll!<Unknown function>
    9. [ 8] [0x1c0e1ab5] Noesis.dll!<Unknown function>
    10. [ 9] [0x0b5bdaac] tbb.dll!<Unknown function>
    11. [10] [0x0b5bd689] tbb.dll!<Unknown function>
    12. [11] [0x0b5bbd63] tbb.dll!<Unknown function>
    13. [12] [0x0b5bbc3c] tbb.dll!<Unknown function>
    14. [13] [0x729a29bb] MSVCR80.dll!<Unknown function>
    15. [14] [0x729a2a47] MSVCR80.dll!<Unknown function>
    16. [15] [0x779d9f72] ntdll.dll!<Unknown function>
    17. [16] [0x779d9f45] ntdll.dll!<Unknown function>
    18.  
     
  30. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    Just use the As<T>() method in the Noesis.BaseComponent base class:

    Code (csharp):
    1.  
    2. void IterateVisualTree(Visual visual)
    3. {
    4.     TextBlock textBlock = visual.As<TextBlock>();
    5.     if (textBlock != null)
    6.     {
    7.         Debug.Log("I found a TextBlock");
    8.     }
    9.  
    10.     uint n = VisualTreeHelper.GetChildrenCount(visual);
    11.     for (uint i = 0; i < n; ++i)
    12.     {
    13.         Visual child = VisualTreeHelper.GetChild(visual, i);
    14.         if (child != null)
    15.         {
    16.             IterateVisualTree(child);
    17.         }
    18.     }
    19. }
    20.  
     
  31. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    We have been able to repro this problem here. Will be fixed in the next release.

    Thanks!
     
  32. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    NoesisGUI v1.0.2

    >> Buy from Asset Store

    • Fixed: Deferred lighting issues
    • Fixed: Render artifacts with DirectX. NoesisGUI was corrupting the scene of Unity
    • Fixed: OpenGL stencil buffer glitches
    • Fixed: Render performance was very poor on some GPU cards
    • Fixed: Unity scripts updated, robustness against errors improved
    • Fixed: LoadScene is now possible in Unity
    • Fixed: Problem with properties in c#. They were not properly serialized. Read-only properties crashing.
    • Fixed: Input event args are now correctly exported to Unity
    • Fixed: Shift key was ignored due to a bug in Unity Event.current notification
    • Fixed: Navigation tab working now for Unity
    • Shader used for masks optimized in GL ES
    • Improved batching of draw image
    • Fixed: Compatibility problem in Windows8, noesis library was not unloaded correctly
    • Gui/3rdParty package copied to https://github.com/Noesis/noesisgui-contrib
    • Fixed broken links to Tutorials. Now, each tutorial is a zip included inside the documentation
    • Improvements to index documentation. Now tutorials for native and unity are separated
    • Improvements to Styling Tutorial. Sample using Themes added
    • Improvements to Text Tutorial informing about .font resources
    • TextBox events (KeyDown, KeyUp, TextInput, etc) were not calling user handlers
    • Grid issues:
      • Static functions for setting grid attached properties were using the incorrect type
      • Modifications of grid attached properties were not notifying to the parent grid. The same happened for DockPanel Dock attached property
     
  33. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    We just added to the first post the link to the 3rd person shooter project we used in our Unity Tutorial Video.
    Download, unzip, open the project with Unity and import our last NoesisGUI package.

    Enjoy it!

    :D
     
  34. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Is there a way to reference a vector image multiple times in one XAML file? I'm a XAML noob, but I've been going through tutorials and I started reading WPF Unleashed. For a minimal example, I'm trying to display the same vector image in two different rows in a grid.

    I can define a vector image (or whatever) either inline or via an external XAML file and reference it as a StaticResource. I can define it inline twice as two separate resources, and that works, but considering that I want to potentially display an arbitrary number of them, that's not going to work.

    If I'm understanding it right, in WPF if you're dealing with compiled XAML, you can put x:Shared="false" on the resource, and it'll create new instances each time it's referenced. NoesisGUI doesn't seem to support that, so how would you normally deal with that? I can't seem to find an example of that in any of the included samples.

    Thanks!
     
  35. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    You can define a vectorial Geometry in a dictionary and share it along different Path shapes:

    Code (csharp):
    1. <Grid
    2.   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    3.   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    4.  
    5.     <Grid.Resources>
    6.         <Geometry x:Key="VectorArt">M0,0 L100,0 100,50 Z</Geometry>
    7.     </Grid.Resources>
    8.  
    9.     <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
    10.         <Path Data="{StaticResource VectorArt}" Fill="Black" Margin="2"/>
    11.         <Path Data="{StaticResource VectorArt}" Fill="Red" Margin="2"/>
    12.         <Path Data="{StaticResource VectorArt}" Fill="Green" Margin="2"/>
    13.         <Path Data="{StaticResource VectorArt}" Fill="Blue" Margin="2"/>
    14.     </StackPanel>
    15.    
    16. </Grid>
    $GeometryShare.png

    Is this what you need?
     
  36. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    That's sort of what I was trying to do, but my original inline example was made up of a "Path" rather than "Geometry" so the syntax threw me. I was able to use the ContentControl itself to display a single one only. What I ultimately want to do is have the image from an external file. I attempted to display multiple butterfly images (from the samples), and I'm still struggling. Wow, even basic stuff is a pain.

    So I attempted to turn Butterfly.xaml into an external resource. I called it Butterfly-resource.xaml:

    Code (csharp):
    1.  
    2. <ResourceDictionary
    3.   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    4.   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    5.     <Viewbox x:Key="Butterfly">
    6.         <Viewbox Width="16">
    7.         <Grid Margin="-8,-30,0,0">
    8.             <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Data="m 204.33 ...and so on
    9.             <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Data="m 203.62 ...and so on
    10.             <Path xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Data="m 363.73 ...and so on
    11.         </Grid>
    12.         </Viewbox>
    13.     </Viewbox>
    14. </ResourceDictionary>
    15.  
    Then I tried to use it like this:

    Code (csharp):
    1.  
    2. <Grid
    3.   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    4.   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    5.  
    6.     <Grid.Resources>
    7.    
    8.         <ResourceDictionary>
    9.             <ResourceDictionary.MergedDictionaries>
    10.                 <ResourceDictionary Source="Butterfly-resource.xaml"/>
    11.             </ResourceDictionary.MergedDictionaries>  
    12.         </ResourceDictionary>      
    13.                
    14.    </Grid.Resources>
    15.    
    16.    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
    17.         <StaticResource ResourceKey="Butterfly"/>          
    18.     </StackPanel>
    19.  
    20. </Grid>
    That works, but you can't use multiples. I suppose this is more of a "getting stuck learning XAML" than anything with Noesis; the stuff about x:Shared threw me for a loop. I guess I tried to jump ahead too fast. I haven't actually made it to the chapters on drawing paths and all that in my WPF book yet. There's ImageDrawing, DrawingImage, GeometryDrawing, PathGeometry, Path, etc, which is pretty confusing when you're starting out.
     
  37. techmage

    techmage

    Joined:
    Oct 31, 2009
    Posts:
    2,133
    I'm not familiar with what XAML is, could someone tell me more about that? Can you visually layout GUI's for this in a XAML editor or something? Are there any XAML editors for OSX?
     
  38. Loden_Heathen

    Loden_Heathen

    Joined:
    Sep 1, 2012
    Posts:
    480
    XAML = http://msdn.microsoft.com/en-us/library/ms752059.aspx

    In short its a way to define the visual aspects of your program (i.e. the GUI) in XML; you might also hear WPF (Windows Presentation Foundation) or SL (Silverlight). There is a lot more to it than that the link I provded is from MSDN and covers WPF which uses XAML to define the UI.

    As far as editors I have always used Microsoft Visual Studio (Win) but I'm sure there is something.
     
  39. sfernandez

    sfernandez

    Joined:
    Feb 14, 2012
    Posts:
    104
    What you are trying to do can be achieved right now in NoesisGUI through control templates. You can define a ControlTemplate from the butterfly vector art (ButterflyResources.xaml):

    Code (csharp):
    1.  
    2. <ResourceDictionary
    3.   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    4.   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    5.  
    6.     <ControlTemplate x:Key="ButterflyTemplate" TargetType="Control">
    7.         <Viewbox>
    8.             <Grid Margin="-8,-30,0,0">
    9.                 <Path Data="m 204.33 139.83 c -8 -6.5 2.35 ...and so on" Fill="#F67F00"/>
    10.                 <Path Data="m 203.62 139.62 c -8 -6.5 2.34 ...and so on" Fill="#000000"/>
    11.                 <Path Data="m 363.73 85.73 c -4.46 0.56 -8.5 ...and so on" Fill="#FFF6E3"/>
    12.             </Grid>
    13.         </Viewbox>
    14.     </ControlTemplate>
    15.  
    16. </ResourceDictionary>
    17.  
    And then apply that template multiple times:

    Code (csharp):
    1.  
    2. <Grid
    3.   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    4.   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    5.  
    6.     <Grid.Resources>
    7.         <ResourceDictionary Source="ButterflyResources.xaml"/>
    8.     </Grid.Resources>
    9.    
    10.     <StackPanel Width="200" HorizontalAlignment="Center" VerticalAlignment="Center">
    11.         <Control Template="{StaticResource ButterflyTemplate}"/>
    12.         <Control Template="{StaticResource ButterflyTemplate}"/>
    13.         <Control Template="{StaticResource ButterflyTemplate}"/>
    14.     </StackPanel>
    15.    
    16. </Grid>
    17.  
    The result will be the following:

    $ButterflyTemplate.png

    Anyway, we have plans to implement DrawingImage (a type of ImageSource whose content comes from a Drawing) and DrawingBrush (a type of Brush whose content comes from a Drawing), providing better support for drawing vectorial data.
     
  40. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Information about XAML editors here: http://www.noesisengine.com/forums/viewtopic.php?f=3&t=107

    For now in OSX the unique option is a virtual machine.
     
  41. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,050
    How long till the next release?

    iByte
     
  42. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,050
    Hi My question was more at what point does the Noesis code render the XAML into a form where it is sent to the GPU. Is it still in a resolution independent format as part of the data downloaded to iOS for example?

    iByte
     
  43. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Aha! Thanks for that. To be honest, I'm only on chapter 5 of my WPF book and ControlTemplate isn't covered until chapter 10, so yeah, I guess I got a little ahead of myself there. But that definitely works for what I'm trying to do. Yeah, better support for vector images definitely sounds good, since that's one of the main cool things about XAML.
     
  44. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    NoesisGUI v1.0.3 is planned for release next Friday
     
  45. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    The data is converted to triangles (tessellated) each frame. Although being this an expensive process many caches are used to avoid redundant calculations. But yes, from the point of view of the user, xaml remains resolution independent even on iOS.
     
  46. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    This path is yet not implemented but will be "very soon". :)
    For now the best alternative is writing to disk those images and reference them from xaml.
     
  47. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
    Enjoy that book. It is my favorite.
     
  48. realblues

    realblues

    Joined:
    Dec 10, 2010
    Posts:
    10
    It Looks Fantastic.

    Is it Supports Asian Language Font ?
     
  49. jdesantos

    jdesantos

    Joined:
    May 24, 2013
    Posts:
    313
  50. realblues

    realblues

    Joined:
    Dec 10, 2010
    Posts:
    10