playMaker

Author Topic: New ui (unity 4.6) get text / set text  (Read 7737 times)

wesleyd

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
New ui (unity 4.6) get text / set text
« on: September 09, 2014, 12:56:36 AM »
Hi,

Is it possible to have an action to "get text" and "set text" on the new ui text with unity 4.6 ?


Thanks  ;)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: New ui (unity 4.6) get text / set text
« Reply #1 on: September 11, 2014, 11:55:27 PM »
Hi,

 Done,

uGuiSetText
uGuiGetText


it's on the ecosystem as well.

Don't forget that you can use get and set property actions to access most properties of components.

http://www.youtube.com/watch?v=ERCw7CECOKc


 Bye,

 Jean

wesleyd

  • Playmaker Newbie
  • *
  • Posts: 13
    • View Profile
Re: New ui (unity 4.6) get text / set text
« Reply #2 on: September 12, 2014, 09:12:56 AM »
Thanks a lot !  ;)

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: New ui (unity 4.6) get text / set text
« Reply #3 on: December 07, 2014, 03:18:26 AM »
Hi,
i modified the "set text" action:

- added "reset on exit"
- provide a string field to store the former text of the GUI component.

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: New ui (unity 4.6) get text / set text
« Reply #4 on: December 08, 2014, 01:35:22 AM »
I added another feature to set text:

- do this action (bool)

This lets you bypass the action based on a bool variable.

Actually this feature is something I love to see in more actions at all, as it is very handy to reduce the amount of states/actions needed to create logic.

« Last Edit: December 08, 2014, 03:54:04 AM by doppelmonster »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12342
  • Official Playmaker Support
    • View Profile
Re: New ui (unity 4.6) get text / set text
« Reply #5 on: December 08, 2014, 11:28:49 AM »
Hi,

 yeah, I know, I am really not sure about this. I too sometimes would like an "enabled" flag in actions that I can set on and off, but at the same time it may create such a mess and confusion in people's understanding of the meaning.

 I would really be interested in every's opinion on this. Cause it's easy to do actually.

 Bye,

 Jean

 

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2484
  • Yup.
    • View Profile
    • Cleverous
Re: New ui (unity 4.6) get text / set text
« Reply #6 on: December 08, 2014, 11:38:37 AM »
I like the idea, but don't like the fact that there is a checkbox to on/off the action and then an additional one inside the action. Would prefer if the higher level one could be assigned to a variable and manipulated at runtime. (Made a post about this on the beta board)

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: New ui (unity 4.6) get text / set text
« Reply #7 on: December 08, 2014, 12:09:04 PM »
I would also prefer it on a higher level. But make sure it is accessible to bool values to drive it by them! So essentially there is already the activate action button. This needs to be accessible by bool then.....

cloud03

  • Full Member
  • ***
  • Posts: 230
  • Viva Playmaker!
    • View Profile
    • Milkish Game Studios Blog
Re: New ui (unity 4.6) get text / set text
« Reply #8 on: December 10, 2014, 07:20:15 PM »
I don't know about "do this action" bool I could be wrong though, isn't it the same just by enabling and disabling the action?

doppelmonster

  • Full Member
  • ***
  • Posts: 157
    • View Profile
    • Grinder Games
Re: New ui (unity 4.6) get text / set text
« Reply #9 on: December 10, 2014, 08:27:26 PM »
It is. But you cannot enable/disable actions based on a bool variable. This one can.

This way you can have some "if"logic without leaving the state.

cloud03

  • Full Member
  • ***
  • Posts: 230
  • Viva Playmaker!
    • View Profile
    • Milkish Game Studios Blog
Re: New ui (unity 4.6) get text / set text
« Reply #10 on: December 10, 2014, 08:39:42 PM »
Ah okay, it does makes sense, that'll come handy..