playMaker

Author Topic: Enum Variable Can't switch value if enum have Descriptions.  (Read 225 times)

Hayato

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Enum Variable Can't switch value if enum have Descriptions.
« on: January 07, 2019, 12: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.

If hide the Descriptions the Variable works fine.



===

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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13891
  • Official Playmaker Support
    • View Profile
Re: Enum Variable Can't switch value if enum have Descriptions.
« Reply #1 on: January 08, 2019, 02:01:08 AM »
Hi,

 odd, it all works fine here:



Can you try with another enum, like I did?

Bye,

 Jean

Hayato

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Enum Variable Can't switch value if enum have Descriptions.
« Reply #2 on: January 08, 2019, 03:21:13 AM »
Thank you for testing , it work fine as the enum just like you did .


And if I add a "/" in Description here , the value will not show in the options.


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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3497
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Enum Variable Can't switch value if enum have Descriptions.
« Reply #3 on: January 08, 2019, 01: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 :(

Hayato

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Enum Variable Can't switch value if enum have Descriptions.
« Reply #4 on: January 09, 2019, 06: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. :)