Re: BETA: NoesisGUI v2.1.0b4 (Unity)
As said in my previous post, could you try reproducing using our samples?I'm running into the exact same problem, this wasn't really an issue in the 2.1.0b3 but I now need to "reimport all" from the noesis settings, then reimport my folder with the XAMLs if I don't want to end up with a Noesis Access Violation crash. (It's a .NET 4.6 profile app)
PD: We will address your second question later. thanks!
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
The samples work fine. Building the game and running it also works. However, closing the game via Alt+F4 or via the close button crashes the game if the Development Build flag is used.This is something new. Are you able to reproduce it with our samples? If affirmative, could you please describe the exact steps?Thanks for the beta! I've been testing 2.1.0b4 with Unity 2017.1.1f1. Everytime I relaunch Unity I need to reimport assets before I can run a scene. If I don't I get a NoesisException telling me the XAMLs could not be found. Furthermore, building the game also gives the same NoesisException. Is this still in the pipeline to be fixed or is this some new bug?
Whenever we change a XAML the corresponding Unity .asset is modified, but we leave to Unity the decision about when to save those changes to disk. So, if you close Unity abruptly (because you are debugging for example) your changes would be lost. Anyway, a clean installation of the Unity package should leave everything in correct state.
Could you please elaborate a bit about it?
As for my own code: it doesn't matter when I close Unity. If I do the following:
1. Open Unity
2. Reimport all assets so Noesis doesn't throw an exception
3. Run the scene, look at my created UI and stop running.
4. Close Unity without changing anything both in the Unity editor as well as in the code editor.
Relaunching Unity and immediately running the scene will give the exception that the XAMLs cannot be found.
After some more testing the problem seems to be referenced XAMLs:
Code: Select all
<UserControl x:Class="Assets.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:Assets.Views"
DataContext="{Binding RelativeSource={RelativeSource Self}, Path=ViewModel}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Button Grid.Row="0" Content="{Binding ButtonContent}" Width="150" Margin="5"
VerticalAlignment="Center" HorizontalAlignment="Center"
Command="{Binding ToggleVisibilityCommand}"/>
<views:SubView Grid.Row="1" Visibility="{Binding SubViewVisibility}"/>
<Button Grid.Row="2" Content="Visibility Button" Width="150" Margin="5"
VerticalAlignment="Center" HorizontalAlignment="Center"
Visibility="{Binding SubViewVisibility}"
Command="{Binding ExitCommand}"/>
</Grid>
</UserControl>
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
@Gwynneth I was facing a similar problem earlier. It turns out that Noesis doesn't always discover all the Xaml files if you are loading them dynamically at runtime. To avoid that issue, I added them in the NoesisSettings 'Preloaded Xamls' array, and everything worked well from that end.
@jsantos Thanks a lot for your reply! I am trying to put together a small project where the issue appears (I built this Caliburn Micro - style container view that would have a view model as a dependency property, and load the appropriate Xaml view for it, based on a naming convention. It's the dynamic loading of the xaml that crashes regularly). I'll be back as soon as I can on it, but it might take me a few days before I can get to that.
@jsantos Thanks a lot for your reply! I am trying to put together a small project where the issue appears (I built this Caliburn Micro - style container view that would have a view model as a dependency property, and load the appropriate Xaml view for it, based on a naming convention. It's the dynamic loading of the xaml that crashes regularly). I'll be back as soon as I can on it, but it might take me a few days before I can get to that.
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
Exactly, each UserControl xaml needs to be referenced from somewhere (this is Unity architecture, not us and it happens with all resources). We provide the 'Preloaded Xamls' array for that purpose, but you can use whatever solution suits you. The problem here is that sometimes (for example when you rebuild all the assets) the UserControl are already loaded by Unity and we are able to load it. We need to find a solution to improve the error message for these cases.@Gwynneth I was facing a similar problem earlier. It turns out that Noesis doesn't always discover all the Xaml files if you are loading them dynamically at runtime. To avoid that issue, I added them in the NoesisSettings 'Preloaded Xamls' array, and everything worked well from that end.
Thanks! As soon as you have that small repro project with the crash, please send it to us. We will fix the crash ASAP.@jsantos Thanks a lot for your reply! I am trying to put together a small project where the issue appears (I built this Caliburn Micro - style container view that would have a view model as a dependency property, and load the appropriate Xaml view for it, based on a naming convention. It's the dynamic loading of the xaml that crashes regularly). I'll be back as soon as I can on it, but it might take me a few days before I can get to that.
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
@jsantos, pbastia Thanks, everything works now!
- ai_enabled
- Posts: 231
- Joined:
- Contact:
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
@jsantos,
From my experience, I almost never had XAML which was not used in the project, and when I had it was just a few files.
We still not updated our first game to NoesisGUI 2.x but if we had, it will be a lot of problems with it as there are hundreds of XAMLs and it's hard to determine which of them will break the game because they're not referenced via Unity system and loaded dynamically.
Why not make a mode when all XAML files in Unity project are automatically included in "Preloaded Xamls"? And use this mode by default.
Regards!
Seems to be a lot of hassle for Unity users with this as I've noticed.each UserControl xaml needs to be referenced from somewhere (this is Unity architecture, not us and it happens with all resources). We provide the 'Preloaded Xamls' array for that purpose, but you can use whatever solution suits you.
From my experience, I almost never had XAML which was not used in the project, and when I had it was just a few files.
We still not updated our first game to NoesisGUI 2.x but if we had, it will be a lot of problems with it as there are hundreds of XAMLs and it's hard to determine which of them will break the game because they're not referenced via Unity system and loaded dynamically.
Why not make a mode when all XAML files in Unity project are automatically included in "Preloaded Xamls"? And use this mode by default.
Regards!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
I have imported the new Noesis into Unity 5.6.0f3 and I have tried to run the Noesis samples but all of them display only a black screen.
In my project I have used Noesis 1.6 and after I have converted the project to the beta version of Noesis I got the error "Document contains no elements" for some xaml files.
Is there something in the settings that I am missing?
Thanks
In my project I have used Noesis 1.6 and after I have converted the project to the beta version of Noesis I got the error "Document contains no elements" for some xaml files.
Is there something in the settings that I am missing?
Thanks
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
I've fixed the "document contains no elements" by reimport all + unity restart. Does it work for you?
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
I wasn't able to reproduce the issue on a smaller scale, this is strange. However, I keep on getting these 'Noesis Access Violation' crashes every so often. I attached a sample project with my current architecture, and a Unity crash report, maybe you could guide me towards finding out where the issue is? Is it possible that Noesis is actually not the cause of this?Thanks! As soon as you have that small repro project with the crash, please send it to us. We will fix the crash ASAP.
Thanks a lot!
Sample project: https://drive.google.com/open?id=0B6SVH ... kdmRHNTVHc
Crash report:
Re: BETA: NoesisGUI v2.1.0b4 (Unity)
@nokola, thanks, it worked, but I still get the black screen.
Who is online
Users browsing this forum: No registered users and 0 guests