playMaker

Author Topic: How to input text / numbers?  (Read 3766 times)

1982

  • Junior Playmaker
  • **
  • Posts: 71
How to input text / numbers?
« on: December 05, 2013, 06:16:03 AM »
Okay I must be complete noob for not figuring this out... But how do you allow player to type text or numbers and save it to a PM variable?


uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: How to input text / numbers?
« Reply #1 on: December 05, 2013, 06:47:35 AM »
GUILayout Text Field, and GUILayout Int/Float Field for numbers.

 ;)

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: How to input text / numbers?
« Reply #2 on: December 05, 2013, 06:55:15 AM »
Yes that seems to work, but is there any way of getting rid of the GUI element because I would like to use only text mesh?

Also seems like you have to click the field to activate it  :-\
« Last Edit: December 05, 2013, 06:59:46 AM by 1982 »

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: How to input text / numbers?
« Reply #3 on: December 05, 2013, 05:29:52 PM »
I haven't really played around with Unity's GUI all that much, but I believe just about every aspect of the GUI element is customisable using GUI skins etc.

Might be worth looking into.. sorry I can't offer much more than that

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: How to input text / numbers?
« Reply #4 on: December 05, 2013, 05:32:41 PM »
Yes, I am also noob with Unity own GUI system. I went directly to text mesh :D Maybe the answer is there, I hope..