playMaker

Author Topic: Gui Layout Text Field  (Read 3721 times)

Urany

  • Playmaker Newbie
  • *
  • Posts: 2
Gui Layout Text Field
« on: October 21, 2016, 05:46:00 AM »
Hi there,

I've been having problems with this one for quite some time and can't find the solution. How to set origin position to a GUI TextField action? All I get is the GUI Layout TextField action that only lets me set height and width properties. GUI Button and Label actions have a variation that also lets me set the position on the screen.

Should I instead use the standard Unity TextField and then connect it to Playmaker using UGUI proxy component?

Thanks!

Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Gui Layout Text Field
« Reply #1 on: October 22, 2016, 12:44:16 PM »
Can you clarify what you are trying to achieve?

Are you wanting to change the change the 'transform' values for an 'input field' object?

the Ugui proxy package that you can get from the ecosystem has a lot of great actions that are directly related to controlling 'input field' ui objects. However changing the position of an object regardless of being ui or not can be done using the 'translate' or 'set position' or any of the 'itween' actions.

-Stephen

Urany

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Gui Layout Text Field
« Reply #2 on: October 23, 2016, 05:40:17 AM »
That's right - I want to change 'transform' values of the input field - not the input field that is created in hierarchy, but - the input field that gets created using 'GUI Layout Text Field' action in FSM as a consequence of sent event.

Hope clarifies the question - thanks :)

Spunkyinteractive

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Gui Layout Text Field
« Reply #3 on: October 24, 2016, 06:04:10 AM »
Thanks for clarifying, unfortunately i am not familiar enough with that action to help any further. I tried using it in a test project, but no field was created.. one thing you could possible try, is to use a 'find game object' action to get the text field that is created via your 'GUI Layout Text Field' action and save it into a game object variable. Then you can use actions to adjust the object saved to that variable.

So if the text field actions creates an object in the hierarchy called 'textfield1' then i would use 'find game object' action and use 'textfield1' as the object name to look for, and save this in a new gameobject variable that, for example, i could call 'textfield1_object'.
From here we could use the action 'translate', change the game object field from 'use owner' to 'specify game object' and select our 'textfield1_object' variable.

I hope this helps.

-Stephen