playMaker

Author Topic: GUILayout text field: How do i tell it not to record "enter?"  (Read 7289 times)

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #15 on: March 04, 2015, 01:37:52 AM »
Please reply how to make this work on Android and actually on both at the same time so the app can be built for both.

br,
szomaza

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #16 on: March 04, 2015, 02:32:59 AM »
Hi,

 I don't own an android unfortunatly, so i can't test myself, but I would suspect that indeed if you replace with UNITY_ANDROID it should work

 Have you tried?

 Bye,

 Jean

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #17 on: March 05, 2015, 12:49:58 AM »
No, not yet. I am not brave enough for such hacks, thus the reason I use playmaker instead of coding.
But now that you are holding my hand, I'll try.

Br,
szomaza

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #18 on: March 05, 2015, 01:22:20 AM »
Hi,

 Simply replace UNITY_IOS with UNITY_ANDROID, you can do this!  ;)

going into coding isn't such a big deal, you are working with Unity, one of the most complex system, however you see this, it may be easy and productive, but the various concepts, especially in a 3d environment is not an easy thing to digest, so from this to coding, the step is very small. Give it a go, it will free you, and PlayMaker will still be totally worse it, even if you know coding, it will become the enabler combination for you to do anything you want! I mean it.

 Bye,

 Jean

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #19 on: March 07, 2015, 07:39:47 AM »
Thanks a bunch for the encouraging words! :-)
Must be wizardry, as the action just works on Android by simply replacing UNITY_IOS with UNITY_ANDROID.

It is great, now I can open whatever keyboard I want.

The problem is that I am using a GUILayoutTextField and when the player clicks that, some keyboard is automatically opened.
Problem is that I don't have a chance in these cases to use the Open Device Key Board action as the keyboards are opened up automatically by tapping into the text field.

I first guessed the type of keyboard to be used is coded into the action as the other one the GUILayoutPasswordField opens a slightly different keyboard.
So I thought I would use my newly found coding superpowers but could not find "touchscreenkeyboardtype" in anywhere else except in the Open Device Key Board action.
http://docs.unity3d.com/ScriptReference/TouchScreenKeyboardType.html

Where/how is it specified what type of keyboard those GUILayout fields should open when the user taps into them?

br,
szomaza

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #20 on: March 07, 2015, 09:01:53 AM »
Well, anyway I got rid of the GUILayoutText fields so now I can use the Open Device Keyboard.
It works nicely on Android now.

How do I make it work for iOS too?
Can I add "UNITY_IOS OR UNITY_ANDROID" to the script so it will use that same code on both?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #21 on: March 10, 2015, 02:40:17 AM »
Hi,

 very good!

Code: [Select]
#if UNITY_IOS || UNITY_ANDROID
that's the OR  -> ||

 Bye,

Jean

szomaza

  • Sr. Member
  • ****
  • Posts: 253
Re: GUILayout text field: How do i tell it not to record "enter?"
« Reply #22 on: March 10, 2015, 05:12:28 AM »
 :) Oh yes, thanks!