playMaker

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

1982

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
How to input text / numbers?
« on: December 05, 2013, 04: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
    • View Profile
Re: How to input text / numbers?
« Reply #1 on: December 05, 2013, 04:47:35 AM »
GUILayout Text Field, and GUILayout Int/Float Field for numbers.

 ;)

1982

  • Junior Playmaker
  • **
  • Posts: 71
    • View Profile
Re: How to input text / numbers?
« Reply #2 on: December 05, 2013, 04: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, 04:59:46 AM by 1982 »

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
    • View Profile
Re: How to input text / numbers?
« Reply #3 on: December 05, 2013, 03: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
    • View Profile
Re: How to input text / numbers?
« Reply #4 on: December 05, 2013, 03: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..