Topic Author
Posts: 17
Joined: 28 Aug 2013, 21:03

Error loading xaml file.

28 Aug 2013, 21:47

Hi there!
I've been trying to follow the tutorials on how to set up noesis properly and get my own GUI in, and am having some trouble once I get it into Unity.

Whenever I try to use a xaml file I have made, I get the following error:
Exception: [DX9] Resource Assets/Assets/App.xaml not found

This is created in Blend, and I'm pretty much just saving it outright from there, what could I be doing wrong?

This is the App.xaml file:

This is the MainWindow.xaml file:

This is the Simple Styles.xaml file:
User avatar
Site Admin
Posts: 3027
Joined: 22 Dec 2011, 19:20

Re: Error loading xaml file.

28 Aug 2013, 23:06

Hi Justei,

When you create in Blend an application project it creates automatically App.xaml and MainWindow.xaml files. Those files should be ignored because both application and window are managed by Unity itself, and NoesisGUI for Unity doesn't support Application and Window classes as root of their xaml assets.

I would recommend to follow this steps to set up your project:
- Create a Unity project
- Create a Blend project outside the Assets folder of your Unity project (to avoid messing Unity with Blend .cs files)
- Then create an empty .xaml file inside Assets folder (in any subdirectory you want)
- In Blend, Projects tab, right click on your project, select the option "Link to Existing Item...", and find the .xaml file you created in the Assets folder
- Design your interface as you want but remember not to use a Window as root, I normally use a Grid, for example:

    <TextBox HorizontalAlignment="Left" Height="23" Margin="77,105,0,0" Style="{DynamicResource SimpleTextBox}" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Text="username"/>
- In Unity, create a new scene, select Main Camera object in the hierarchy, and add a NoesisGUIPanel component
- In the Xaml property of the NoesisGUI Panel component select the previously created xaml
- In the Xaml property of the NoesisGUI Panel component select the Simple Styles.xaml
- Click Play button in Unity Editor.

Don't hesitate to ask again if there is anything you don't understand ;)
User avatar
Site Admin
Posts: 3959
Joined: 20 Jan 2012, 17:18

Re: Error loading xaml file.

29 Aug 2013, 00:15


Our next release (end of week) will include a tutorial describing these steps. I think that you have probably read the Blend Tutorial included in the documentation that, although included in the Unity part, it is in fact a tutorial for the native SDK.

I have sent you an email with a preview of the tutorial that will be included.

Hope this helps.
Topic Author
Posts: 17
Joined: 28 Aug 2013, 21:03

Re: Error loading xaml file.

29 Aug 2013, 17:02

Thanks a lot for the help :) it works now! :)

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Semrush [Bot] and 8 guests