Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Sixpolys on February 17, 2017, 11:20:08 AM

Title: UGui proxy not compatible with wsa .net
Post by: Sixpolys on February 17, 2017, 11:20:08 AM
I imported the UGui proxy and could not build for WSA HoloLens anymore.
the error concerns this file:
/Assets/PlayMaker Utils/PlayMakerUtils_FsmVar.cs

Error:
"'Type' does not contain a definition for 'BaseType'"

Line 484
Code: [Select]
        }else if(valueType.BaseType == typeof(System.Enum) ){

can you replace it with IsEnum()?
Code: [Select]
       
        }else if(valueType.IsEnum() ){
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 19, 2017, 01:35:17 PM
I am getting the same issue. As soon as I install the UGui Proxy addon I get the same error.
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 20, 2017, 01:20:22 AM
Hi,

Crap...

can you try this:

 }else if(valueType.GetTypeInfo().BaseType == typeof(System.Enum) ){

Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 20, 2017, 07:54:31 AM
I commented out line 484. added your code which is 485. Get the following build error.

Assets\PlayMaker Utils\PlayMakerUtils_FsmVar.cs(485,29): error CS1061: 'Type' does not contain a definition for 'GetTypeInfo' and no extension method 'GetTypeInfo' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 21, 2017, 03:16:00 AM
Hi,

 Can you try to deploy using full .net ?

Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 21, 2017, 07:30:36 AM
Not sure what you mean by full .net

Edit: Found this similar post in the MS Hololens forum (https://forums.hololens.com/discussion/3090/net-dll-problem-s).
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 21, 2017, 08:11:15 AM
Hi,

 uhm, I see, yes this post is helpfull.

 This is so amazing to me that Microsoft is failing so badly to provide a consistent experience across .net and its devices. .net is a Microsoft product and yet they just randomly remove features from it... makes it very difficult.

 I'll investigate, I think should do:

http://www.softanya.com/wordpress_en/unity-reflection-helper/

 I'll let you know how I progress on this.

 Bye,

 Jean
 Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 21, 2017, 08:27:52 AM
I'n not a coder, more like a code hacker, but I guess some things were tweaked or removed in .NET core and the reflection helper is adjusting certain methods to work, correct?

Any help is most appreciated Jean. I have a Physics Lab app in VR I am trying to port to the Holoens and have a demonstration scheduled in a couple of weeks. To a degree I can Set or Get Properties of ugui elements and I have a script to detect button press and fsm.SendEvent to send the events but it's getting difficult to swap everything out.
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 22, 2017, 01:08:00 PM
Hi Jean,

Have you had any progress? I found the following link in the Unity Docs if this helps.

https://docs.unity3d.com/Manual/windowsstore-missingtypes.html
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 23, 2017, 01:57:29 AM
Hi,

I am on it, but it's such a pain... I hope to find a way to leverage all of this in a nice way so that packages works across the board.

Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 23, 2017, 07:03:21 AM
Thank you very much Jean. Let me know if there is any way I can help. I have two hololens here and a test project ready to go so in case you need some testing done.

Thanks again,
Vern
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 24, 2017, 03:01:41 AM
Hi,

 ok, turns out there is a more elegant way and it's cross platform:  replace with :

}else if(value is System.Enum){


let me know, my tests are all green and I can compile and it so far seems to not create any problems in other areas.

 If that works on your end, I'll push the changes.

 Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 24, 2017, 08:43:56 AM
It will build the project from Unity but when I build it in visual studio I get a number of errors. Attached is a screenshot of the errors.

I have also attached a screenshot of my edit to PlayMakerUtils_FsmVar.cs

Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 24, 2017, 10:49:39 AM
Hi,

 that's already not related, I can publish fine for Windows Store, so it looks like a problem with the project build setup, not PlayMaker or this script.

 can you try to create an empty project with just a simple cube, nothing, no playmaker, not nothing, and then publish and see if it works, then you bring PlayMaker you test and then you bring uGui proxy and test ( with the mod).

 Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 24, 2017, 02:27:31 PM
I did 3 tests.

Test A, Unity set up to publish to Hololens. See TestA screenshot. Builds to Hololens without issue. Windows 10 Universal and D3D. Virtual Reality Supported and Hololens added.

Test B, Add Playmaker 1.3. Builds to Hololens without issue.

Test C, downloaded uGuiProxyFull.unitypackage and installed. Modified line 484 of PlayMakerUtils_FsmVar.cs . See ScriptMod scrfeenshot.  Builds from Unity without issue. Building to Hololens I get the same errors as previous. See attached Unity and VS screenshots.


Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 24, 2017, 04:17:31 PM
This forum thread seems to be a similar error (http://forum.photonengine.com/discussion/8361/how-to-use-photon-voice-for-universal-windows-platform-win-10-in-unity-5-4-0f3).

Still investigating....
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on February 27, 2017, 01:23:10 AM
Hi,

 can you actually comment the offending if routine, and deploy.

 if we know this is this line that is the source of the trouble, this is good, else, we are in trouble because I don't have access to hololens to test.

 Bye,

 Jean
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 27, 2017, 12:32:02 PM
You do not need a Hololens to test. You can go through the process to build out to Hololens and then in Visual Studio build the solution and if it builds then test using the Hololens emulator.

Hololens Emulator info. (https://developer.microsoft.com/en-us/windows/holographic/using_the_hololens_emulator)

Microsoft HoloLens: Course 101E – Ch. 0 – Introduction with HoloLens Emulator (https://developer.microsoft.com/en-us/windows/holographic/holograms_101e)

I have two physical Holoens devices to also test with. Later today I am going to do some posts on the Unity Hololens Forum. It looks like several others are having similar issues. I will link the posts when they are up.

Edit: Unity Forum Link (https://forum.unity3d.com/threads/build-error-assembly-csharp-dll-could-not-be-found.458493/)
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 27, 2017, 04:18:17 PM
Here is an interesting forum post (https://forum.unity3d.com/threads/cannot-build-and-deploy-with-5-04f1-htp-serialweaver-crashes-possibly-on-unet.422303/#post-2737759) about UNET code causing the same error that I am getting when building in VS.
Title: Re: UGui proxy not compatible with wsa .net
Post by: Vern_S on February 28, 2017, 01:20:19 PM
Here is the issue semi resolved. A Unity Representative assisted on the Unity/Hololens forums.

Quote
Quote from: Tautvydas-Zilys, post: 2976241, member: 359058
If you build from Unity without "C# projects" option checked, does it work and not print this error? This is very likely to have nothing to do with playmaker and instead is an issue within Unity. Could we get a bug report on this?

My Playmaker ugui test for Hololens  without C# Projects selected builds in Visual Studio, installs and runs on the Hololens without issue. I thought having C# Project selected was a requirement for Hololens. Is it only necessary if further development in Visual Studio is needed?

I'll submit a bug report shortly.

Thank you for your assistance.

Quote from: Tautvydas-Zilys, post: 2976465, member: 359058
It's not a requirement at all - it's just there for your convenience. Once you submit the bug report, could you tell me the 6 digit case number? Don't post the link, just the case number.

So building with C# Project deselected allows the project to build to the Hololens. I tested a button and slider interaction with Playmaker uGui proxy full and they work as expected. As requested I submitted a bug report to Unity. Apparently this is a Unity issue.

I have a project with lot's of uGui implemented that I will be porting to the Hololens this week and will test the heck out of it and let you know if I run into any issues or if all is good.

Thanks again Jean for you assistance.

 ;D
Title: Re: UGui proxy not compatible with wsa .net
Post by: jeanfabre on March 01, 2017, 01:02:57 AM
Hi,

 Excellent, so "is Enum" code change is working right?

Thanks for your time and patience, it helps everyone, for Unity and PlayMaker, it's highly appreciated!


 Bye,

 Jean