Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Silicon Power on April 01, 2023, 05:14:36 AM

Title: Set UI Drop Down value by string instead of index?
Post by: Silicon Power on April 01, 2023, 05:14:36 AM
Hi Play Maker has an action to set UI Drop Down Set Value but I need to set value by string value not index! Is there any way for this?
Title: Re: Set UI Drop Down value by string instead of index?
Post by: djaydino on April 01, 2023, 02:54:12 PM
Hi.
You can have an array with the strings and get the index from there.

in code a dropdown is using index.

So you would do the same thing in code :

https://stackoverflow.com/questions/54020910/setting-drop-down-value-in-unity-with-a-string