Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Adam Bruns · Mar 12, 2010 at 06:21 PM · inputkeyboardinputmanagerjavascript-specific

Input.GetButtonDown not working at ALL

well I tried to make a script that when you hit the number 1 button it spawns a bomb. I know how to spawn and stuff, and i know how to use Input.GetButtonDown (usually). I first created a new Input button called Number1 and made the positive button the number 1 button. but when i hit 1 nothing happend, so i tried to see if even this script worked:

function update() {
if (Input.GetButtonDown ("Fire1")) 
{
print("Hit");
} 
}
well little to say it didnt work, i also tried Input.GetKeyDown and it didnt work either, what am i doing wrong?
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
2
Best Answer

Answer by Eric5h5 · Mar 12, 2010 at 06:43 PM

Your function is called "update" instead of "Update", so it will never run unless you specifically call it. If you're polling "Fire1", then your entry in the input manager should also be called "Fire1".

Comment
Add comment · Show 3 · 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 Adam Bruns · Mar 12, 2010 at 07:15 PM 0
Share

i feel stupid now....

avatar image Cyclops · Mar 12, 2010 at 07:20 PM 0
Share

Nah, we've all done it... In particular, I've tried every combination of onGui, OnGui, OnGUI... At least, I think we've all done it - O$$anonymous$$G, what if I'm the only one? :(

avatar image Adam Bruns · Mar 13, 2010 at 07:23 AM 0
Share

obviously your not, i just did it :P

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

No one has followed this question yet.

Related Questions

Quirk in Input.GetAxis 0 Answers

Inputhandling is giving different results for left and right (arrows, ctrl's , shifts) but my code seems fine 3 Answers

Multiple Players on one Computer/Console 5 Answers

Where can I find a list of characters sent from when pressing key? Examples of characters are: "\b" "\n" 1 Answer

Flight code not reading throttle axis 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