Search Issue Tracker
By Design
Votes
1
Found in
2019.4
2020.3
2020.3.24f1
2021.2
2022.1
Issue ID
1387624
Regression
No
MissingReferenceException is thrown when the player is no longer pressing movement inputs
How to reproduce:
1. Open the user attached "Momentum.zip" project
2. Enter Play Mode
3. Move around with W-A-S-D and then stop
4. Open the Console tab
Expected result: No errors and can continue to move around
Actual result: MissingReferenceException is thrown when the player is no longer pressing movement inputs
Reproducible with: 2019.4.34f1, 2020.3.25f1, 2021.2.7f1, 2022.1.0b2
Note:
- If the issue is not reproducing, repeat step 3 and wait for a moment
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note:
The 'Player' GameObject gets auto destroyed because it has a TrailRenderer component with 'Autodestruct' = true. To fix this issue you need to move the TrailRenderer component to another gameobject or disable the 'Autodestruct' property.
The MissingReferenceException is thrown because the CharacterMovement script references the Player GameObject and accesses it without checking for null first.