- Home /
Question by
AndrewBrown123 · Sep 20, 2019 at 06:17 PM ·
2duicontrollereventsystem
PointerEventData null reference expectation error
Hello
I'm trying to make a fake internet system like in GTA 4, and 5 and I have my Xbox controller set up so i can move a cursor around on screen with the joystick and press the A Button to click. I found a script from Unity Form page here: https://forum.unity.com/threads/how-to-create-a-mouse-like-cursor-to-be-controlled-by-the-keyboard-or-a-joystick.299656/
My Issue: the PointerEventData is what's not working.
private PointerEventData pointer;
//pointer = cursorObject;
Debug.Log(pointer);
In the console it always comes up as null with the Debug. I just get a NullReferenceException error.
I can't change it because in the API there is no GameObject properties in it.
I don't know what to do I've work on this script for almost a week. Any help is welcomed.
Thank You to anyone that stops by and helps
Comment