Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 Grontag · Jul 01, 2020 at 06:29 PM · inspectoruser interface

Cant drag InputField to property of script in Inspector

I am pretty new to Unity, so please forgive me if its a basic question (i am sure it is, in fact..)

I have some InputFields, an empty GameObject that has a script attached to it, which handles the behaviour of the scene (there are buttons, and so on). I have some fields in the script (public InputField if1, if2, etc.).

My plan is to drag the InputFields to the properties in the inspector so I can access them in code when certain buttons are pressed...but I cant drag and drop them. I see a black circle when I have the InputField (dragged from the hierarchy) over the field of the script, in the inspector.

Is this the proper way of doing it? How can I drag my InputFields to the proper place in the Inspector?

Thank you.

Comment
Add comment · Show 4
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 CodesCove · Jul 01, 2020 at 08:32 PM 0
Share

Can you double check that you actually have the InputField component (script) in the InputField game object.

avatar image Grontag · Jul 02, 2020 at 08:21 AM 0
Share

First, maybe I should have stated it is a Text$$anonymous$$eshPro Input fiels. @CodesCove I tried to add InputField script to the InputFields game object, but I didn't found a script named InputField. Tried to add InputField to InputFields but, not surprisingly, I was not able to do it.

avatar image Grontag · Jul 02, 2020 at 09:02 AM 0
Share

Well, I managed to fix it. By being a Text$$anonymous$$eshPro InputField, the fields in the script have to be T$$anonymous$$P_InputField, ins$$anonymous$$d of regular InputField. I changed the class of the fields in the script, and now it works.

avatar image CodesCove Grontag · Jul 02, 2020 at 06:37 PM 0
Share

ok, great to hear!

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Zymurer · Jul 01, 2020 at 06:51 PM

In fact,there is an alternative and you needn't to drag. Click the little circle at bar of your varible in the inpspector alt textand pick the object you wish.

By the way, I do not think it is about assiging. It may be a bug or something in the scirpt causes it. Hope that helps.


ekran-alıntısı.png (1.8 kB)
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 Grontag · Jul 01, 2020 at 07:16 PM 0
Share

Already tried, and nothing shows up. Thanks for answering, anyway.

avatar image
0

Answer by SpellMender · May 05 at 09:54 PM

I've found the answer for myself. Its because I was using TextMesh Pro input fields. To resolve the issue change your InputField data type to TMP_InputField. You can only do this if you are using the TMPro namespace.

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

139 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Place holder for various scripts/functions 2 Answers

Adding Custom Inspector to Sub Class Arrays 0 Answers

RuntimeInspector-like or FullInspector-like UI in game-mode 0 Answers

OnGUI() keyboard input 1 Answer

UI layout groups rearrange children 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