nizesh
Topic Author
Posts: 11
Joined: 31 Jul 2019, 22:32

Interaction Element not supported in Unity

31 Jul 2019, 22:40

Hi,

I very new to Noesis GUI and I'm trying to apply the Interactivity Behaviour as shown in this page https://www.noesisengine.com/docs/2.2/A ... viors.html. It doesn't show any errors in XAML inside Visual Studio but when I run the code in Unity, it gives me this error
NoesisException: Assets/Spyglass/Dashboard/Dashboard.xaml(924): Unknown type 'Interaction'. Rethrow as NoesisException
Noesis.Error.Check () (at Assets/NoesisGUI/Plugins/API/Core/NoesisError.cs:17)
Noesis.GUI.Noesis_LoadXaml_ (System.String xaml) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:275)
Noesis.GUI.LoadXaml (System.String xaml) (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:125)
NoesisXaml.Load () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:31)
NoesisView.LoadXaml (System.Boolean force) (at Assets/NoesisGUI/Plugins/NoesisView.cs:333)
NoesisView.OnEnable () (at Assets/NoesisGUI/Plugins/NoesisView.cs:398)
My Dashboard.xaml
<UserControl x:Class="Dashboard.Dashboard"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    FontFamily="Resources/Fonts/#Roboto"
    Foreground="#FFC9CCCF"
    d:DesignWidth="1280" d:DesignHeight="720">
    ...
	<Grid>
               <Border Background="Silver" Margin="100">
                      <Rectangle Width="100" Height="50" Fill="Red">
                             <i:Interaction.Behaviors>
                                      <ei:TranslateZoomRotateBehavior SupportedGestures="Scale" />
                              </i:Interaction.Behaviors>
                       </Rectangle>
                 </Border>
         </Grid>
                                    ...
      <UserControl>                              
I'm not sure what's wrong. Can someone please help me?
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Interaction Element not supported in Unity

01 Aug 2019, 17:44

Hi and welcome,

In NoesisGUI Unity package we include our own implementation of interactivity behaviors and triggers, you can find them under Assets/NoesisGUI/Samples/Interactivity/ folder.

Did you import that folder in your project?
 
nizesh
Topic Author
Posts: 11
Joined: 31 Jul 2019, 22:32

Re: Interaction Element not supported in Unity

01 Aug 2019, 18:03

Hi @sfernandez Thanks for the prompt response. I don't see the Interactivity folder inside the Assets/NoesisGUI/Samples directory. All I have is shown in the image in the link https://ibb.co/D9Xyj90 I also don't see the Interactivity Folder at the github page https://github.com/Noesis/Tutorials/tree/master/Samples
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Interaction Element not supported in Unity

01 Aug 2019, 18:12

Looking at the attached image it seems you are using an old version of our Unity package.
Could you please download the latest version (2.2.3)?
Then import the package into your project, it must include the folder NoesisGUI/Samples/Interactivity/ next to the other sample folders.
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Interaction Element not supported in Unity

01 Aug 2019, 18:14

By the way... the latest version of all C# code is also available at GitHub: https://github.com/Noesis/Managed
And you can find Interactivity folder there too: https://github.com/Noesis/Managed/tree/ ... eractivity
 
nizesh
Topic Author
Posts: 11
Joined: 31 Jul 2019, 22:32

Re: Interaction Element not supported in Unity

01 Aug 2019, 20:33

That worked like a charm. Thank you so much. I really appreciate it. :D

I'm trying to generate an interactive flow graphs something like this https://ibb.co/JqyvCsy in Unity using Noesis framework. Right now I'm trying to build an entire graph engine from the ground zero. It would be very helpful if there's already something inside Noesis and Unity for this. Even if there is none, an experienced suggestion would be highly encouraging enough for me. Thanks in advance.
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Interaction Element not supported in Unity

02 Aug 2019, 11:35

I don't know how the layout of these shapes is decided but the simplest way of placing UI elements is using a Canvas container.
As you have two layers, one for arrows and other for the nodes, I will use one Canvas panel for each layer.

Apart from that, if you want to follow a MVVM pattern I guess you will have a ViewModel that exposes a collection for the arrow connections and a collection for the nodes. Those collections will be bound to 2 ItemControls which will use a Canvas as the ItemsPanel to correctly position all the data.

Hope that helps.
 
nizesh
Topic Author
Posts: 11
Joined: 31 Jul 2019, 22:32

Re: Interaction Element not supported in Unity

02 Aug 2019, 21:11

I'll try to implement them as you said. Thanks a lot for the help
 
mikmueller
Posts: 3
Joined: 04 Jun 2019, 12:50

Re: Interaction Element not supported in Unity

20 Nov 2019, 10:34

Hi and welcome,

In NoesisGUI Unity package we include our own implementation of interactivity behaviors and triggers, you can find them under Assets/NoesisGUI/Samples/Interactivity/ folder.

Did you import that folder in your project?
Since it is part of the framework, I don't get why it is located in the samples folder. I usually delete sample/example folders to not bloat my repo and it took me ages to find out it was there.
I would def. put that into the core folder.
 
User avatar
sfernandez
Site Admin
Posts: 2984
Joined: 22 Dec 2011, 19:20

Re: Interaction Element not supported in Unity

20 Nov 2019, 11:44

Application framework is not part of NoesisGUI unity package because application/window logic is provided by Unity itself.
And interactivity classes are not part of WPF nor NoesisGUI, are just extensions built on top of the core library to add interactivity behaviors and triggers. Some of our samples use them, so that is why we include them in the Samples folder.

We will study the possibility of moving Interactivity folder inside the Plugin folder.

Who is online

Users browsing this forum: Ahrefs [Bot] and 10 guests