playMaker

Author Topic: TextMesh Pro and Compare String Action  (Read 4274 times)

stvbabb

  • Junior Playmaker
  • **
  • Posts: 66
TextMesh Pro and Compare String Action
« on: April 22, 2018, 07:28:34 AM »
Hello,

I'm trying to compare a string coming from a TextMesh Pro Input Field game object and then compare that string with a password using the 'Compare String' action.

The Equal Event is Pass

The Not Equal Event is Fail.

There is a button that sends an event with an on click event to Get the Text of the TextMesh Pro string and then move on to the compare while carrying the TextMesh Pro text over in a variable.

TLDR;

Can I not compare TextmeshPro strings using the 'Compare String' Action?

Thanks,
Steve

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: TextMesh Pro and Compare String Action
« Reply #1 on: April 22, 2018, 12:51:41 PM »
Hi, I have full set of textmesh pro actions here. It includes get/set string for textmesh ugui and textmesh 3d text. Once you have gotten the string from textmesh pro, then you can do a compare.

https://github.com/dumbgamedev/TextMeshPro_Playmaker

stvbabb

  • Junior Playmaker
  • **
  • Posts: 66
Re: TextMesh Pro and Compare String Action
« Reply #2 on: April 23, 2018, 01:38:33 AM »
Hey tcmeric,

Thanks for the response! Sorry, my first post was unclear. My brain was in full 'fix this issue' mode and not in plain English mode.

But, I'm actually using your wonderful actions for TextMesh Pro already (thank you for that!), and I'm able to get strings from TextMesh Pro already and convert string to int and stuff like that, but that compare string action coming from a TextMesh Pro string just doesn't seem to work. It gives me untrue every time. I'll try again.

Also, will your TextMesh Pro actions be on the ecosystem at some point?

Thanks,
Steve
« Last Edit: April 23, 2018, 03:46:20 AM by stvbabb »

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: TextMesh Pro and Compare String Action
« Reply #3 on: April 23, 2018, 10:03:05 AM »
Hi, no, I have other plans for it. But a copy will always remain for free on github.

Once you use the text mesh pro text into a string, its just a normal playmaker string. Not related to TMP at all  8)

stvbabb

  • Junior Playmaker
  • **
  • Posts: 66
Re: TextMesh Pro and Compare String Action
« Reply #4 on: April 23, 2018, 02:16:33 PM »
Hi tcmeric,

I think it has to do with getting the text from an TMP input field. I can't seem to get it work.

In the pictures attached you see I'm getting the text from the Get Textmesh Pro UGUI  Text action and then moving on the string compare action in  the compareText state. It just won't prove equal, it fails every time.

I'll just have to use the standard InputField and get the text using the U Gui Input Field Get Text action. If you have any other suggestions I'd love to try them. :)

Cheers,
Steve

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: TextMesh Pro and Compare String Action
« Reply #5 on: April 23, 2018, 08:14:06 PM »
Hmm, I see. Ill give it a go on my end later. I am sure we can figure it out  :)

stvbabb

  • Junior Playmaker
  • **
  • Posts: 66
Re: TextMesh Pro and Compare String Action
« Reply #6 on: April 24, 2018, 01:32:18 AM »
Okay, thanks! I tried writing my own Get TextMesh Pro Text from input field, but I didn't get too far. However, I think that is the bug - getting it from a TMP InputField game object.

Cheers and thanks,
Steve

tcmeric

  • Beta Group
  • Hero Member
  • *
  • Posts: 768
Re: TextMesh Pro and Compare String Action
« Reply #7 on: April 25, 2018, 02:27:24 AM »
Seems like I am having trouble attaching actions here on the forum today.

I added them to the github: https://github.com/dumbgamedev/TextMeshPro_Playmaker

Action name is setTextmeshProInputText & getTextmeshProInputText

Tested them and they seem to be working ok. Let me know how it goes.

stvbabb

  • Junior Playmaker
  • **
  • Posts: 66
Re: TextMesh Pro and Compare String Action
« Reply #8 on: April 25, 2018, 02:58:32 AM »
Thanks!! That is really helpful! I'll test them tonight for sure and report back.

Cheers,
Steve