As far as I can tell — which is a log full of null reference exceptions — no Input Devices are recognized when I make a build. (At the very least, the Mouse is not recognized. I know that for certain).
Some notes about my Project / Build:
- I’ve tried this on both 2020.2.0b8 and 2020.2.0b6 and the error persists.
- I’ve tried both Version 1.1.0-preview.2 and Version 1.0.0 (Verified) of the Input System Package, and the error persists in both.
- I have tried both 32-bit and 64-bit architectures, the error persists on both.
- I have already checked that I have selected “Input System Package (New)” as my Active Input Handling solution in Player Settings.
- All Input Devices are recognized in the Input Debugger in the Editor. (Input also works fine in-Editor).
Here is the error:
Error
NullReferenceException: Object reference not set to an instance of an object
at FDS.LD.Inputs.ReceivesPlayerInput.FDS.LD.Updating.IUpdateVariable.OnUpdate () [0x00030] in C:\Users\samue\OneDrive\Desktop\MONO Projects\GameJam Game 2 (Main)\Assets\Scripts\__Final\Input\ReceivesPlayerInput.cs:36
at FDS.LD.Updating.UpdateManager.Update () [0x00098] in C:\Users\samue\OneDrive\Desktop\MONO Projects\GameJam Game 2 (Main)\Assets\Scripts\__Final\_Update Management\UpdateManager.cs:402
(Filename: C:/Users/samue/OneDrive/Desktop/MONO Projects/GameJam Game 2 (Main)/Assets/Scripts/__Final/Input/ReceivesPlayerInput.cs Line: 36)
Here is line 36 that the error is pointing to:
Debug.Log(Mouse.current.position.ReadValue());
To make sure that Mouse.current is null, I printed out this on line 35 directly before the above Debug.Log:
Debug.Log(Mouse.current == null);
It returned True.
Has anybody been experiencing similar problems as me in builds?
I’d really like to have this fixed — but hey, at least the editor seems to work fine.