playMaker

Author Topic: iOS GUI form data capture tutorial?  (Read 4868 times)

Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
iOS GUI form data capture tutorial?
« on: April 22, 2011, 07:42:33 AM »
Just wondering if there are any?
I'm a complete novice so am struggling some with Playmaker.
I'm trying to build an iPhone utility app, so lots of iOS forms to fill and store.

By way of example;
1. User fires up utility app on iPhone, launches user settings screen with various form fields,
2. App checks player prefs and populates fields with corresponding data where it exists.
3. Player taps field "first name", iphone keyboard appears, and they select the field content and key new data,
4. On tapping else where on screen or in a new field or even exiting the screen for another, the data in field "first name" is saved to player prefs and variable. etc, etc,

Any pointers greatly appreciated, but I'm just struggling with the variety of ways to solve this, and also what's appropriate in regard to actions that are usable on iOS. I'm guessing any of the mouse actions are useless and I should be making a beeline for device actions and screen-pick?

Lastly, does Playmaker have any ready made action to make the iPhone keyboard appear? Or do I need to write a script for that and and simply switch the script on and off?
I'm an artist not a coder so don't assume I have a clue ;-)
Many thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS GUI form data capture tutorial?
« Reply #1 on: April 22, 2011, 08:49:24 AM »
Hi,

Correct me if I am wrong, but the keyboard should come up automatically as you click on a gui text field isn't it?

Maybe I dont' understand your question. I have a gui skin I am currently developing ( http://www.fabrejean.net/projects/unity/testWeb/testWeb.html ) and text field correctly reveal and edit th econtent on ipad ( despite the weird text placement... but that's another issue ).

You'll find anyway the unity reference help regard the iphone keyboard here:

http://unity3d.com/support/documentation/ScriptReference/iPhoneKeyboard.html


Also, Playmaker does have what it needs to work with user prefs. You'll find the list of actions here:

https://hutonggames.fogbugz.com/default.asp?W545

I haven't found a sample scene using user prefs ( correct me if I am wrong here again).

Bye,

 Jean
« Last Edit: April 22, 2011, 09:45:55 AM by jeanfabre »

Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
Re: iOS GUI form data capture tutorial?
« Reply #2 on: April 22, 2011, 04:33:08 PM »
Hi Jean,
Re: the iPhone keyboard, I though that was the case too but without any luck.
Mind you i've only tested it using Unity Remote. Anyway, doesn't appear for me, and the mix of info on Unity Answers is confusing with old and new posts contradicting each other.
Have found the Player Prefs actions thanks.

Any pointers on what events and actions you'd start off something like this?
I'm going around in circles. Thanks.
------
Quick question re: your test on the iPad - are you using unity remote too?
« Last Edit: April 22, 2011, 09:30:42 PM by Duffdaddy »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS GUI form data capture tutorial?
« Reply #3 on: April 25, 2011, 01:07:25 AM »
Hi,

Unity remote only forward what happens with the users touch, and play it back in Unity, so keyboard is not going to work 8 no tested but 99.9999% sure.  I am only using unity remote very sparingly. Never rely on it to test user interaction ( at least not for responsiveness). I use it to verify layout or algo. Always test on the real device. The other major reason for that is perfs.

Ok, for me to help you, let's cut down the problem.

 -- You need to let the user input some text:

     Validate this by properly test on the device itself. that will work.

-- You need to access user prefs.

 Let me roll a screencast on this. Allow me few days tho ok?

 Bye,

 Jean


Duffdaddy

  • Junior Playmaker
  • **
  • Posts: 54
Re: iOS GUI form data capture tutorial?
« Reply #4 on: April 25, 2011, 02:39:03 AM »
Hi Jean
Yea you're right re Unity Remote and the keyboard, so will just export and install my app to fully test it.

Re the screen cast, that'd be awesome. I'm finding my way, but lots of trial and error so some pointers would help immensely, just so I can be confident I'm taking a correct approach. Few days wait no sweat.
Would make a world of difference.

In the interim though I've built a few FSMs that check if player prefs exist, then create them if they dont exist and then retrieve them and save them to a string, but have had few issues with variable values being cached etc, but least am on my way.