Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: wesleyd on September 09, 2014, 03:56:36 AM

Title: New ui (unity 4.6) get text / set text
Post by: wesleyd on September 09, 2014, 03: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  ;)
Title: Re: New ui (unity 4.6) get text / set text
Post by: jeanfabre on September 12, 2014, 02:55:27 AM
Hi,

 Done,

uGuiSetText (https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/b1bbe047ac80670435db443a17273d5a9374226e/Assets/PlayMaker%20Custom%20Actions/uGui/uGuiSetText.cs)
uGuiGetText (https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/b1bbe047ac80670435db443a17273d5a9374226e/Assets/PlayMaker%20Custom%20Actions/uGui/uGuiGetText.cs)


it's on the ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181) as well.

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



 Bye,

 Jean
Title: Re: New ui (unity 4.6) get text / set text
Post by: wesleyd on September 12, 2014, 12:12:56 PM
Thanks a lot !  ;)
Title: Re: New ui (unity 4.6) get text / set text
Post by: doppelmonster on December 07, 2014, 05: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.
Title: Re: New ui (unity 4.6) get text / set text
Post by: doppelmonster on December 08, 2014, 03: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.

Title: Re: New ui (unity 4.6) get text / set text
Post by: jeanfabre on December 08, 2014, 01:28:49 PM
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

 
Title: Re: New ui (unity 4.6) get text / set text
Post by: Lane on December 08, 2014, 01:38:37 PM
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)
Title: Re: New ui (unity 4.6) get text / set text
Post by: doppelmonster on December 08, 2014, 02: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.....
Title: Re: New ui (unity 4.6) get text / set text
Post by: cloud03 on December 10, 2014, 09: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?
Title: Re: New ui (unity 4.6) get text / set text
Post by: doppelmonster on December 10, 2014, 10: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.
Title: Re: New ui (unity 4.6) get text / set text
Post by: cloud03 on December 10, 2014, 10:39:42 PM
Ah okay, it does makes sense, that'll come handy..