Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: Hayato on January 07, 2019, 02:26:15 AM

Title: Enum Variable Can't switch value if enum have Descriptions.
Post by: Hayato on January 07, 2019, 02:26:15 AM
When creat Enum Variable and set to a Enum Type that has Description. (ex.  SteamVR_Input_Sources )
The Variable value locked as 1st enum value and can not switch to others.
And the value shows wrong as the Description of 1st enum value.

See the screenshot below :

Enum Variable shows wrong and can't switch.
(https://i.imgur.com/TN1yYV0.png)
If hide the Descriptions the Variable works fine.
(https://i.imgur.com/e5TouUV.png)


===

Unity Info:
Unity Version: 2018.3.0f2
Playmaker Version: 1.9.0.p5
BuildTarget: StandaloneWindows64

System Info:
OS: Windows 10  (10.0.0) 64bit
Processor: Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz
System Memory: 16336
Graphics Device: NVIDIA GeForce GTX 980 Ti
Title: Re: Enum Variable Can't switch value if enum have Descriptions.
Post by: jeanfabre on January 08, 2019, 04:01:08 AM
Hi,

 odd, it all works fine here:

(https://i.imgur.com/U55pMGf.gif)

Can you try with another enum, like I did?

Bye,

 Jean
Title: Re: Enum Variable Can't switch value if enum have Descriptions.
Post by: Hayato on January 08, 2019, 05:21:13 AM
Thank you for testing , it work fine as the enum just like you did .
(https://i.imgur.com/f18yjRq.png)

And if I add a "/" in Description here , the value will not show in the options.
(https://i.imgur.com/PY84TgY.png)

I meet this enum from SteamVR , can you help to support "/" in Description ?
https://github.com/ValveSoftware/steamvr_unity_plugin/blob/master/Assets/SteamVR/Input/SteamVR_Input_Sources.cs
Thank you !

Hi,

 odd, it all works fine here:

Can you try with another enum, like I did?

Bye,

 Jean
Title: Re: Enum Variable Can't switch value if enum have Descriptions.
Post by: Alex Chouls on January 08, 2019, 03:46:12 PM
This is a bug in EnumPopup in Unity 2018.3.
I've submitted a bug report to Unity.

There might be a workaround, but for now, I think you'll have to comment out the Descriptions in the Valve library :(
Title: Re: Enum Variable Can't switch value if enum have Descriptions.
Post by: Hayato on January 09, 2019, 08:05:38 AM
This is a bug in EnumPopup in Unity 2018.3.
I've submitted a bug report to Unity.
There might be a workaround, but for now, I think you'll have to comment out the Descriptions in the Valve library :(

Saddly if I comment out the Descriptions will make the program error .
But I can still comment out them only when I edit with playmaker , and then get them back.
Hope there can be a fix about it soon !
Thank you for the answer. :)