playMaker

Author Topic: Help with action "GetEventIntData" and Textmeshpro dropdowns  (Read 412 times)

mgervais

  • Playmaker Newbie
  • *
  • Posts: 21
Hi All

I am trying to use the "GetEventIntData" to capture user selection on a Dropdown.
It works fine with the regular UI Dropdown but not with the TextMeshPro dropdown. Any reason for that ? and what would be a work around if I really want to use a TMP dropdown ? Thank for any help

Mike

mgervais

  • Playmaker Newbie
  • *
  • Posts: 21
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #1 on: May 09, 2021, 06:59:27 AM »
Ok, It seems my question wasn't clear enough. Let me rephrase:

How can I use Playmaker to capture a user's selection in a TextMeshPro dropdown and set a variable to the returned value.

I would be stunned if this has never been done by anyone here before.

Thanks

M. 

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6511
    • jinxtergames
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #2 on: May 09, 2021, 08:05:39 AM »
Hi.
I think i made these actions a while ago for our project ( i dont think they are in the TMP action package from this Thread : https://hutonggames.com/playmakerforum/index.php?topic=15008.0 )

You can try the package below, they should work the same as the ui drop down actions, but then for textmesh
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Weak Interactive

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #3 on: May 09, 2021, 03:02:05 PM »
Hey,

Just thought I'd add that you can get the index of a TMP dropdown selection with "Get Property."

Just drag the TMP component into a state, select "Get Property," and choose "value" as the property to get. It's at the bottom of the list.

This allows you to store the index as an int variable. It gives you 0 for the first option, 1 for the second, etc...

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6511
    • jinxtergames
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #4 on: May 10, 2021, 09:26:54 AM »
Hi.
You should avoid using Get/Set Properties as in most cases you also need to use Linker wizard then.
Also these actions are mirroring meaning slower than dedicated actions :)
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Weak Interactive

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #5 on: May 10, 2021, 01:42:04 PM »
Hi.
You should avoid using Get/Set Properties as in most cases you also need to use Linker wizard then.
Also these actions are mirroring meaning slower than dedicated actions :)

Okay, my brain just exploded.

Can you please elaborate on this?

I've been using Get/Set Property for loads of different things, and I've never run into any issues. Is there a chance my build is going to break if I use Get Property for something as basic as getting the string of a text component?

In the official Playmaker tutorial demonstrating these actions, this isn't mentioned once:
It mentions how powerful these actions are, but it never says they're powerful enough to break your game.

Should I actually avoid using them in all cases? because if I have to make an action every time I need to use Get Property, I may as well just learn c#, right?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 6511
    • jinxtergames
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #6 on: May 11, 2021, 10:38:17 AM »
Hi.
No not in all cases.
Linker wizard might be needed depending on the platform you are building for.

Mirroring is slower than dedicated action, that does not mean they give issues.
Most cases you wont notice any difference.

Bolt actually uses mirroring for everything and thats why its slower than playmaker.
but again you will not notice in most cases.

when you do the same thing for example 1000 objects at the same time you might start noticing (depending on what you do)

for compiling there mirrored properties might not be seen and can be skipped (and break those properties actions)
thats where linker wizards comes in.

the video is from 2012 and i believe that on that time the unity version did not have issues with it yet, therefore its never mentioned there.
Ecosystem might not work at the moment
here are direct Github Links to the custom actions :
https://github.com/PlayMakerEcosystem
https://github.com/jeanfabre


Join the PlayMaker Discord Channel!

Weak Interactive

  • Beta Group
  • Playmaker Newbie
  • *
  • Posts: 33
Re: Help with action "GetEventIntData" and Textmeshpro dropdowns
« Reply #7 on: May 11, 2021, 01:30:16 PM »
Hi.
No not in all cases.
Linker wizard might be needed depending on the platform you are building for.

Mirroring is slower than dedicated action, that does not mean they give issues.
Most cases you wont notice any difference.

Bolt actually uses mirroring for everything and thats why its slower than playmaker.
but again you will not notice in most cases.

when you do the same thing for example 1000 objects at the same time you might start noticing (depending on what you do)

for compiling there mirrored properties might not be seen and can be skipped (and break those properties actions)
thats where linker wizards comes in.

the video is from 2012 and i believe that on that time the unity version did not have issues with it yet, therefore its never mentioned there.

Thanks for the info, was not aware of that.

I'm assuming building for windows should be fine, but I definitely shouldn't be advising the use of those actions without knowing a bit more.