-
- edgarhsanchez
- Posts: 34
- Joined:
Problem with Gui.UnityExporter
I am able to run the Resource.BuildTool.exe against my WPF project folder and I see that resources have been built into the make files but after I run the Gui.UnityExporter.exe it says 0 for exported items. Is there a fully working example available for a WPF Visual Studio 2010 based solution I could use to get started with NoesisGUI and Unity3D 4?
-
-
sfernandez
Site Admin
- Posts: 2908
- Joined:
Re: Problem with Gui.UnityExporter
The next release will include a new tool from inside UnityEditor to import NoesisGUI resources in a more comfortable way.
Meanwhile, the steps to export your resources to Unity are:
1. Run BuildTool scan Your/Package to add your resources to the database.
2. Run BuildTool build Your/Package to build your resources.
3. Run BuildTool list Your/Package to ensure that your resources are in the database.
4. You can run Gui.XamlPlayer.exe tool and load your xaml files to verify that are working correctly.
5. Run Gui.UnityExporter.exe Your/Package Path/To/Your/Unity/Project.
If still not working, please post the output of the previous commands.
Meanwhile, the steps to export your resources to Unity are:
1. Run BuildTool scan Your/Package to add your resources to the database.
2. Run BuildTool build Your/Package to build your resources.
3. Run BuildTool list Your/Package to ensure that your resources are in the database.
4. You can run Gui.XamlPlayer.exe tool and load your xaml files to verify that are working correctly.
5. Run Gui.UnityExporter.exe Your/Package Path/To/Your/Unity/Project.
If still not working, please post the output of the previous commands.
-
- edgarhsanchez
- Posts: 34
- Joined:
Re: Problem with Gui.UnityExporter
I am getting the following when building this project with "Resource.BuildTool.exe build Gui/HelloWorld"
------------------------------------------------------------------------------
Build Tool - NoesisEngine Data Builder v0.41
------------------------------------------------------------------------------
Build Platform: DX9
> Build Package Gui/HelloWorld
> Building Gui/HelloWorld/BureauBlack.xaml
Parsing (@980,24)
Unknown type 'AutomationProperties'
< Build Package Gui/HelloWorld [0.064893 sg]
Total time = 0.07s
C:\Users\e.sanchez\Downloads\NoesisGui Downs\NoesisGUI-0.9.6.3768\NoesisGUI\Bin>
When I begin removing things to make it work it seams like a never ending list of problems with the BureauBlack.xaml. What is the prescribed way to use our XAML themes/styles?
------------------------------------------------------------------------------
Build Tool - NoesisEngine Data Builder v0.41
------------------------------------------------------------------------------
Build Platform: DX9
> Build Package Gui/HelloWorld
> Building Gui/HelloWorld/BureauBlack.xaml
Parsing (@980,24)
Unknown type 'AutomationProperties'
< Build Package Gui/HelloWorld [0.064893 sg]
Total time = 0.07s
C:\Users\e.sanchez\Downloads\NoesisGui Downs\NoesisGUI-0.9.6.3768\NoesisGUI\Bin>
When I begin removing things to make it work it seams like a never ending list of problems with the BureauBlack.xaml. What is the prescribed way to use our XAML themes/styles?
- Attachments
-
- HelloWorld.7z
- Project files
- (251.77 KiB) Downloaded 232 times
-
-
sfernandez
Site Admin
- Posts: 2908
- Joined:
Re: Problem with Gui.UnityExporter
NoesisGUI is implementing a subset of WPF/Silverlight framework, so there are types and properties that our framework won't recognize. For example, Automation properties, SystemColors keys or SystemParameter keys.
Seeing the output of the BuildTool, you can detect these cases and remove or modify appropriately the XAML.
I downloaded the HelloWorld sample you attached, and after fixing all the types and properties that were unrecognized, I was able to launch your application:
> Gui.Launcher.exe Gui/HelloWorld/App.xaml
and see the button with the BureauBlack theme:
NOTE: One of the problems I found was the font resource name. The .font file must be named as the name of the FontFamily (the BuildTool is warning you if you don't do that correctly). You were using the 'Trebuchet MS' font, so your font resource file must be named as "Trebuchet MS.font" instead of "trebuc.font".
Seeing the output of the BuildTool, you can detect these cases and remove or modify appropriately the XAML.
I downloaded the HelloWorld sample you attached, and after fixing all the types and properties that were unrecognized, I was able to launch your application:
> Gui.Launcher.exe Gui/HelloWorld/App.xaml
and see the button with the BureauBlack theme:
NOTE: One of the problems I found was the font resource name. The .font file must be named as the name of the FontFamily (the BuildTool is warning you if you don't do that correctly). You were using the 'Trebuchet MS' font, so your font resource file must be named as "Trebuchet MS.font" instead of "trebuc.font".
-
-
sfernandez
Site Admin
- Posts: 2908
- Joined:
Re: Problem with Gui.UnityExporter
You can find attached the changes I made to build your files.
- Attachments
-
- HelloWorld.7z
- (253.11 KiB) Downloaded 269 times
-
- edgarhsanchez
- Posts: 34
- Joined:
Re: Problem with Gui.UnityExporter
I am trying to get this example running on Unity3d and am now stuck on that part of the tutorial. I am getting the following error...
I have run...
>Gui.UnityExporter.exe Gui/HelloWorld E:\UnityNoesisGuiTests
------------------------------------------------------------------------------
Unity Exporter - NoesisEngine Data Package To Unity Exporter v0.10
------------------------------------------------------------------------------
Data package : Gui/HelloWorld
Unity project: E:/UnityNoesisGuiTests
App.xaml
Fonts/Trebuchet MS.font
MainWindow.xaml
BureauBlack.xaml
4 resource(s) copied, 924 KB
but from within Unity I get the following error. I've followed the tutorial on Unity closely but I don't see where I went wrong.
Exception: Can't create component Application, it is not registered
.\Core\Kernel\Src\ComponentFactoryImpl.cpp (line 120)
Noesis.Kernel.RaiseError (System.String filename, Int32 line, System.String desc) (at Assets/Scripts/Noesis/NoesisKernel.cs:103)
(wrapper native-to-managed) Noesis.Kernel:RaiseError (intptr,int,intptr)
Noesis.UIRenderer.LoadXAML (System.IntPtr& root, System.IntPtr& uiRenderer, System.String xamlFile, System.String resourcesFile) (at Assets/Scripts/Noesis/NoesisUIRendererImports.cs:43)
Noesis.UIRenderer..ctor (System.String xamlFile, System.String resourcesFile) (at Assets/Scripts/Noesis/NoesisUIRenderer.cs:55)
I am not familiar with this error.
I have run...
>Gui.UnityExporter.exe Gui/HelloWorld E:\UnityNoesisGuiTests
------------------------------------------------------------------------------
Unity Exporter - NoesisEngine Data Package To Unity Exporter v0.10
------------------------------------------------------------------------------
Data package : Gui/HelloWorld
Unity project: E:/UnityNoesisGuiTests
App.xaml
Fonts/Trebuchet MS.font
MainWindow.xaml
BureauBlack.xaml
4 resource(s) copied, 924 KB
but from within Unity I get the following error. I've followed the tutorial on Unity closely but I don't see where I went wrong.
Exception: Can't create component Application, it is not registered
.\Core\Kernel\Src\ComponentFactoryImpl.cpp (line 120)
Noesis.Kernel.RaiseError (System.String filename, Int32 line, System.String desc) (at Assets/Scripts/Noesis/NoesisKernel.cs:103)
(wrapper native-to-managed) Noesis.Kernel:RaiseError (intptr,int,intptr)
Noesis.UIRenderer.LoadXAML (System.IntPtr& root, System.IntPtr& uiRenderer, System.String xamlFile, System.String resourcesFile) (at Assets/Scripts/Noesis/NoesisUIRendererImports.cs:43)
Noesis.UIRenderer..ctor (System.String xamlFile, System.String resourcesFile) (at Assets/Scripts/Noesis/NoesisUIRenderer.cs:55)
I am not familiar with this error.
-
-
sfernandez
Site Admin
- Posts: 2908
- Joined:
Re: Problem with Gui.UnityExporter
First of all, Happy New Year!
Our current Unity integration doesn't support neither Application nor Window classes. UserControl or Panel derived classes should be the root of the loaded XAML.
Please try the following code for your XAML, so you can load it correctly from Unity:
Sorry for my late answer.

Our current Unity integration doesn't support neither Application nor Window classes. UserControl or Panel derived classes should be the root of the loaded XAML.
Please try the following code for your XAML, so you can load it correctly from Unity:
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="350" Width="525" Background="White">
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="BureauBlack.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Grid.Resources>
<Button Name="button1" Content="Say Hello" Command="{Binding SayHelloCommand}"
Width="75" Height="23" Margin="50,60,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</Grid>
Who is online
Users browsing this forum: Bing [Bot], Semrush [Bot] and 9 guests