playMaker

Author Topic: How do I get the text from an NGui UIInput object[SOLVED]  (Read 4241 times)

Gevarre

  • Playmaker Newbie
  • *
  • Posts: 49
How do I get the text from an NGui UIInput object[SOLVED]
« on: May 29, 2013, 01:28:40 PM »
Hi,
I'm trying to make a basic NGui input field to store the player's name in playerprefs.

I've made an NGui input object and attached the NGuiEventsToPlaymakerFsmEvents script to it and edited it to add a function to fire an event when the text is submitted (found the code in the "NGUI Integration (WIP)" thread.

I've set up an FSM on the object and gotten the event to fire just fine when the text is entered. I just have no clue as to how to get at/read that string when it happens. The closest I've gotten is that there seems to be a string variable in the UIInput.cs script named "text", but I have no idea how to access it.

Anyone know how to do this?
« Last Edit: May 30, 2013, 12:28:11 AM by jeanfabre »

Gevarre

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How do I get the text from an NGui UIInput object
« Reply #1 on: May 29, 2013, 09:58:35 PM »
Update: I've solved this and am writing a tutorial on how to do this. It should be posted in the next few days.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I get the text from an NGui UIInput object[SOLVED]
« Reply #2 on: May 30, 2013, 12:28:36 AM »
Hi,

 Thanks for sharing!

bye,

 Jean