• 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 Rgalaxy · Jan 19, 2014 at 10:07 AM · androidjavascripterrortextfield

Android textfield problem

Holla, i encounter Textfield Error on Android, the field did not show the text i write on android keyboard, this [problem][1] has been asked but not answered yet.. so if somebody could help.. it will be so much appreciated :)

[1]: http://answers.unity3d.com/questions/222638/android-textfield-problem.html

i try to give my textfield a style so it will looks a different than the original black box from Unity..

 var names : String;
 var school : String;
 var age : String;
 var windowTexture : GUIStyle;
 var labelStyle : GUIStyle;
 var fieldStyle : GUIStyle;

 function OnGUI(){
     GUI.Window(0,new Rect(Screen.width*0.3,Screen.height*0.1,Screen.width*0.65,Screen.height*0.55),Field," ",windowTexture);
 }
 
 function Field(){
     GUI.Label(new Rect(20,20,100,50),"Nama     : ",labelStyle);
     name = GUI.TextField(new Rect(170,20,250,50),names,fieldStyle);
     GUI.Label(new Rect(20,100,100,50),"Sekolah : ",labelStyle);
     school = GUI.TextField(new Rect(170,100,250,50),school,fieldStyle);
     GUI.Label(new Rect(20,180,100,50),"Umur    : ",labelStyle);
     age = GUI.TextField(new Rect(170,180,250,50),age,fieldStyle);
 }

after i click the GUI Textfield, and write it on my android, the letter of text jsut not appearing, anybody maybe could point me to the right way?

EDIT : -still not yet fixed the problem, anybody could help?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Rgalaxy · Jan 23, 2014 at 05:44 PM

ok, it solved, it seems Unity did not receive "name" as a variable, i couldn't use name, instead if i used names, it can do..

also, at the code above, at line 14, it should be names, rather than name. Sorry for not seeing it :)

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

18 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

Related Questions

how do i use touch.Position 1 Answer

Compiler error while switching to android 1 Answer

Access JavaScript variables on c# script (Android build fails!) 1 Answer

game won't work in build 0 Answers

Project not pushing to Android or iOS 1 Answer


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