User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

03 Oct 2017, 22:18

Seems to be a lot of hassle for Unity users with this as I've noticed.
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.
I think the main problem here is that we are trying to be compatible with the standard WPF way to load XAMLs from disk:
private void InitializeComponent()
{
    Noesis.GUI.LoadComponent(this, "Assets/MainMenu.xaml");
}
This way is not very Unity friendly and we considered the option of removing it, but we didn't like the idea of breaking this compatibility with Blend and WPF. So, we left it, but you can only load XAMLs from string if the XAML is in someway preloaded by Unity. The confusion is coming because sometimes (for example, after importing a XAML in Unity) the XAML is preloaded and will work in Unity editor but will fail at runtime. We are working hard to detect these scenarios and report them appropriately.

In case, you want to automatically have all your XAMLs available then one unity friendly solution is having the XAMLs inside the /Resouces folder. That way, you can load the XAML using code like this (taken from our Unity tutorial):
NoesisXaml xaml = (NoesisXaml)UnityEngine.Resources.Load(path, typeof(NoesisXaml));
Button button = (Button)xaml.Load();
Although using Resources in Unity seems to be deprecated. I honestly would remove our "Preloaded Xamls" table and would leave that implementation to the client. The client has all the information to properly split each set of XAMLs in different objects that can be loaded and unloaded as a whole.

I would say, this is exactly the same problem you have in Unity to organize rest of assets, like textures.

Having said that, we are totally open to suggestion here.
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

03 Oct 2017, 22:19

I've fixed the "document contains no elements" by reimport all + unity restart. Does it work for you?
Are you trying the latest beta version (2.1)? Does it happen in a fresh project with only our package imported?
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

03 Oct 2017, 22:20

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 a lot!

Sample project: https://drive.google.com/open?id=0B6SVH ... kdmRHNTVHc
Crash report: crash_ee3d1c4eff7c1740a93eed8d06cbc0c6.zip
Thanks for this information! Could you please open a ticket with all this information? Let's follow there.
 
pbastia
Posts: 14
Joined: 15 May 2017, 19:19

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

18 Oct 2017, 22:09

Thanks for this information! Could you please open a ticket with all this information? Let's follow there.
I filed a ticket here https://bugs.noesisengine.com/view.php?id=1160 a little while ago, hopefully you are not too overworked and have a minute to take a look at it soon :)
Thanks again for making noesis as great as it is!
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

23 Oct 2017, 21:41

I filed a ticket here https://bugs.noesisengine.com/view.php?id=1160 a little while ago, hopefully you are not too overworked and have a minute to take a look at it soon :)
Yes, it is in the queue of assigned tickets. We will be working on it very soon. Sorry for the inconvenience.
 
ivan_b
Posts: 50
Joined: 22 Jul 2015, 12:57

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

06 Nov 2017, 15:28

Hi,

When migrating from Noesis version 1.6 to 2.1.0b4 I could not run Noesis in Unity.
I tried to run Noesis in an empty project and it runs fine but in the existing project only a black screen appears.
I fixed all the errors when migrating the project.
Is there any place where I can look for some errors?
Thanks.
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

06 Nov 2017, 18:27

All errors raise C# exceptions and are displayed in the Unity console. If the console is empty then you are error free. That's a good starting point. In 2.0 the Unity component is a different class. Did you properly migrated to NoesisView? What happens if you set a trivial XAML to one of your cameras? Does it render properly?
 
ivan_b
Posts: 50
Joined: 22 Jul 2015, 12:57

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

07 Nov 2017, 08:50

Yes, I have migrated to NoesisView and have setup the xaml file and all the properties.
I have started a sample from the Samples folder but the result is the same.
I will try to create another scene with a very simple xaml to see what happens and will let you know.
 
User avatar
jsantos
Site Admin
Topic Author
Posts: 1874
Joined: 20 Jan 2012, 17:18
Contact:

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

10 Nov 2017, 10:09

Yes, I have migrated to NoesisView and have setup the xaml file and all the properties.
I have started a sample from the Samples folder but the result is the same.
I will try to create another scene with a very simple xaml to see what happens and will let you know.
What platform is this? (BTW, sorry for the deletion of your previous messages viewtopic.php?f=3&t=1225)
 
nokola
Posts: 119
Joined: 10 Mar 2015, 05:29

Re: BETA: NoesisGUI v2.1.0b4 (Unity)

10 Nov 2017, 16:29

I've fixed the "document contains no elements" by reimport all + unity restart. Does it work for you?
Are you trying the latest beta version (2.1)? Does it happen in a fresh project with only our package imported?
I haven't seen this reproduce in weeks now - I think 2.1 beta4 is OK.

Who is online

Users browsing this forum: Google [Bot] and 1 guest