Input Button is not setup Error

Greetings,

After i wrote this Code:

Btn.GetComponent<Button>().image.color = new Color(0.5803922f, 1f, 0.654902f, 1f);

This message appeared:

ArgumentException: Input Button  is not setup.
 To change the input settings use: Edit -> Settings -> Input
UnityEngine.EventSystems.BaseInput.GetButtonDown (System.String buttonName) (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/BaseInput.cs:126)
UnityEngine.EventSystems.StandaloneInputModule.ShouldActivateModule () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:227)
UnityEngine.EventSystems.EventSystem.Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:474)

Btn is just a UI.Button GameObject, i’m using the using UnityEngine.UI;
I tried to reset the Inputs in Window, same Error.

Hope you can help me, thanks


1 Like

Found it.

In the Hierachy is a GameObject called “EventSystem”. It changed all textfields at the “Standalone Input Module”. You can reset this by going in the top right corner and press “Reset”. That helped me.

191356-zyzrjd7.png

Virtual kiss

MWAH