User avatar
EvanWeeks
Posts: 8
Joined: 05 Jun 2017, 20:05

Re: Unity 2017.1 beta and .NET 4.6

06 Jun 2017, 17:58

For anyone who is still dealing with this issue, I was able to get the Noesis DLL loaded in Unity 2017.1.0b7, but it took some screwing around with the Noesis lib, and Unity still complained the whole time:

Since the editor log was telling me it couldn't find the Noesis.dll, I changed the Library.Name (which it uses to do the DllImport attribs) to a fully qualified path to the Windows x64 dll in my test project:
Image

This allowed unity to load the DLL for the editor. But, next, it was having major issues loading a class called "Inline." I went and looked for the class file and found it was named all-uppercase:
Image

I renamed it to match the class name in the file, including making its extension lowercase, so "Inline.cs" instead of "INLINE.CS" (Unity likes this, don't ask me why, but it hates it when the file name is different in any way from the class name inside). After this, the project will load correctly, but still throws out some warnings about overridden types such as ObservableCollection and ICommand:
Image

But, the samples run from inside the editor:
Image

Building and running outside the editor, however, is hanging the editor (such that I have to end-task on it) and is failing to show the XAML screen inside the external player. So, it's not a complete workaround, but it gets me at least to the point that I can play with NoesisGUI in the beta build of Unity Editor. Posting this for informational "I played with it until it almost-works" purposes only.
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Unity 2017.1 beta and .NET 4.6

06 Jun 2017, 19:50

Hi,

I've just installed Unity 2017.0.1b8 and did the following:
  • Created new project.
  • Installed NoesisGUI 2.0.2f2 package.
  • As you found, Assets/NoesisGUI/Plugins/API/Proxies/INLINE.CS must be renamed to Inline.cs.
  • Replaced all occurrences of #if __MonoCS__ || ENABLE_MONO || ENABLE_IL2CPP with #if !NET_4_6 && (__MonoCS__ || ENABLE_MONO || ENABLE_IL2CPP)
  • Reopen Unity Editor and reimport xaml assets: Tools->NoesisGUI->Settings->Reimport All button. (This step is also required with Unity 5.6 after installing/upgrading NoesisGUI package)
After that I can play all the scenes from the samples folder.

But there is still one complication that makes that version unusable in most situations. If you play a scene that uses custom Fonts or Images, then you need to restart Unity every time you play the scene, otherwise Unity will hang. We know what is causing this and will be solved for the next release.

Apart from that you shouldn't have to modify Library.Name constant. Doing it will probably break other things.

Let us know if this works for you.
 
User avatar
EvanWeeks
Posts: 8
Joined: 05 Jun 2017, 20:05

Re: Unity 2017.1 beta and .NET 4.6

06 Jun 2017, 20:03

Again, thanks for the reply.

I discovered the post-play hang as well, so I'm abandoning my workaround efforts and waiting (anxiously) on the next release.

Thanks for all your hard work on this! I can't wait to use this system. I've been writing UI code in XAML for years as a business software developer, so the ability to design my game's UI in a familiar language using familiar tools has me hopping with excitement. I'm actually getting started using it in Unity 5.6 just so I can get started learning how to integrate the XAML UI with the game objects I've already built.

Who is online

Users browsing this forum: ivan.fuertes and 1 guest