So, the issue I have is I am trying to access a List that has all of my virtual keys on a virtual keyboard stored in a list, but it’s giving me an error. This list is attached to a MonoBehaviour script which is attached to a gameobject within my game. I guess, and I assume that there is a logical explanation, I can’t access a predetermined list from a non-MonoBehaviour Script. So do I need to add all of my buttons for my keyboard in the script instead of the inspector? Or, am I just doing something wrong? Thank you!
ERROR: Error code: NullReferenceException: Object reference not set to an instance of an object ← This is because I am calling a MonoBehaviour from a non-MonoBehaviour so there’s no way for me to reference it, which is my question.
CODE: inputDict.Add(“moveForward”, new Inputs(“W”, “moveForward”, allKeys.allKeys));
The “allKeys” part is the part discussed above. I don’t believe code is needed for this question as it is more of just a general question, but here you go.