- Home /
Why Am I getting MissingMethodException message?
so i inputed a script to turn a flashlight on/off and i check the console and i keep gettin this message MissingMethodException: Method not found: 'UnityEngine.Input.getkeydown'. Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher () Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.Create () Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object[] args) Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object[] args) Boo.Lang.Runtime.RuntimeServices+c_AnonStorey14.<>m_7 () Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.Invoke (System.Object target, System.String name, System.Object[] args) Flashlight.Update () (at Assets/Standard Assets/Projectors/Flashlight.js:3) and the script is function Update () {
if (Input.getkeydown("f")) {
if (light.enabled == true)
light.enabled = false;
else
light.enabled = true;
}
}
aswell as there are 2 listeners in this make sure that tere is only 1 listener and the only thing i have open is skype to talk to my friend cause of the game were devlopin/making any help would be greatly appreciated thanks
Answer by Dave-Carlile · Feb 01, 2013 at 02:27 AM
From the documentation...
The function is named GetKeyDown
, not getKeyDown
.
Answer by JDM Industrys · Feb 01, 2013 at 03:26 PM
thanks a lot Dave Carlile it shall now work
This should be added as a comment under my answer (using the "add new comment" link) ins$$anonymous$$d of as another answer. Also, if my answer was helpful, check the box under the thumb up/down to accept it.
Your answer
Follow this Question
Related Questions
Talking Code 2 Answers
character lagging in air when jumped 0 Answers
String.Split() Function Issues 1 Answer
Multiple Animations for the Same GameObject 2 Answers
How do I make a respawn system? 1 Answer