Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Wolfshadow · Aug 12, 2015 at 11:51 PM · ioskeyboardhideopenmobile keyboard

Using the IOS Keyboard

Hello everyone. I know this is a very basic question, and I don't mean to have you guys write code for me, but I cannot figure out how the IOS keyboards work. In all the tutorials and articles in the unity scripting manual, I can not decipher how to use keyboards, or even copy and paste the code in. I want to know how to open and hide the keyboard. Thanks! If someone could show me the c# method, I would appreciate it. I am a newbie.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by chetanisinanand · Aug 13, 2015 at 06:21 AM

Hi , you might want to look into TouchScreenKeyboard

I believe TouchScreenKeyboard.Open is what you are looking for. Look into the following code i got from scripting reference:

 using UnityEngine;
 using System.Collections;
 
 public class ExampleClass : MonoBehaviour {
     public string stringToEdit = "Hello World";
     private TouchScreenKeyboard keyboard;
 
     // Opens native keyboard
     void OnGUI() {
         stringToEdit = GUI.TextField(new Rect(10, 10, 200, 30), stringToEdit, 30);
 
         if(GUI.Button (new Rect(10, 50, 200, 100), "Default"))
         {
             keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.Default);
         }
         if(GUI.Button (new Rect(10, 150, 200, 100), "ASCIICapable"))
         {
             keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.ASCIICapable);
         }
         if(GUI.Button (new Rect(10, 250, 200, 100), "Numbers and Punctuation"))
         {
             keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.NumbersAndPunctuation);
         }
         if(GUI.Button (new Rect(10, 350, 200, 100), "URL"))
         {
             keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.URL);    
         }
         if(GUI.Button (new Rect(10, 450, 200, 100), "NumberPad"))
         {
             keyboard = TouchScreenKeyboard.Open("", TouchScreenKeyboardType.NumberPad);
         }
         if(GUI.Button (new Rect(10, 550, 200, 100), "PhonePad"))
         {
             keyboard = TouchScreenKeyboard.Open ("", TouchScreenKeyboardType.PhonePad);
         }
         if(GUI.Button (new Rect(10, 650, 200, 100), "NamePhonePad"))
         {
             keyboard = TouchScreenKeyboard.Open ("", TouchScreenKeyboardType.NamePhonePad);
         }
         if(GUI.Button (new Rect(10, 750, 200, 100), "EmailAddress"))
         {
             keyboard = TouchScreenKeyboard.Open ("", TouchScreenKeyboardType.EmailAddress);
         }
         
     }
 }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Wolfshadow · Aug 13, 2015 at 09:27 PM 0
Share

$$anonymous$$y problem is that the code provided does not work. You can try, but I have read the same code. Believe me, I have done my research.

avatar image
0

Answer by JKXM · Jun 30, 2017 at 07:54 PM

Should this work while using Unity Remote 5? @ chetanisinanand

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

iOS crash when dismissing system keyboard 1 Answer

iOS keyboard - adding and removing characters in a string on the fly 0 Answers

Help with mobile keyboard 0 Answers

Keep keyboard open when lost focus by clicking background canvas - TextMeshPro Input Field 1 Answer

iPhoneKeyboard graphic bug on selecting text 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges