ggarredondo / Carnem-Levare-Prototype

To-be-released action RPG about boxing. This prototype was made as part of our undergraduate final projects, for the Computer Engineering degree at University of Granada. All information about the development and design of the game can be found in the corresponding dissertations.
0 stars 0 forks source link

InputDetection null reference exception #115

Closed ggarredondo closed 1 year ago

ggarredondo commented 1 year ago

If I press the stick and exit game mode at the same time, I get this exception

MissingReferenceException: The object of type 'InputSystemUIInputModule' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. InputDetection.WaitGamepadDetection (System.Single time) (at Assets/Scripts/Scene/Input/InputDetection.cs:45) System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__7_0 (System.Object state) (at :0) UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at <6afd1274f120405096bc1ad9e2010ba6>:0) UnityEngine.UnitySynchronizationContext.Exec () (at <6afd1274f120405096bc1ad9e2010ba6>:0) UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at <6afd1274f120405096bc1ad9e2010ba6>:0)

axcruz12 commented 1 year ago

Make sure the UIInput variable is not null