Error loading xaml file.
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?
Thanks.
This is the App.xaml file:
http://pastebin.com/pKPPMdcd
This is the MainWindow.xaml file:
http://pastebin.com/hdY56Gpn
This is the Simple Styles.xaml file:
http://pastebin.com/1kdkui09
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?
Thanks.
This is the App.xaml file:
http://pastebin.com/pKPPMdcd
This is the MainWindow.xaml file:
http://pastebin.com/hdY56Gpn
This is the Simple Styles.xaml file:
http://pastebin.com/1kdkui09
-
sfernandez
Site Admin
- Posts: 3184
- Joined:
Re: Error loading xaml file.
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:
- 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
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:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextBox HorizontalAlignment="Left" Height="23" Margin="77,105,0,0" Style="{DynamicResource SimpleTextBox}" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Text="username"/>
</Grid>
- 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
Re: Error loading xaml file.
Welcome.
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.
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.
Who is online
Users browsing this forum: No registered users and 4 guests