How to Resolve Null Error

The null error occurs when trying to use the Touchscreen class without a simulated device. You need to play the game while you have a device simulation active. If you run the game with the default ‘game’ window, it gives the null error.

That is correct, we need to use the Simulator whenever we use the TouchScreen class (or, of course, build the game to an APK and install it to your device),

Privacy & Terms