The build version of my game doesn't work
So, in Unity Editor the game works fine, but in the build version it shows only the main menu screen and won't let me play. I keep getting the same errors everytime I open the build version.
NullReferenceException: Object reference not set to an instance of an object at SoundManagerScript.PlaySound (System.String clip) [0x00038] in :0 at MainMenu.PlayGame () [0x00000] in :0 at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in :0 at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in :0 at UnityEngine.UI.Button.Press () [0x0001c] in :0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00009] in :0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in :0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00063] in :0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1) UnityEngine.EventSystems.StandaloneInputModule:ReleaseMouse(PointerEventData, GameObject) UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData) UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32) UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent() UnityEngine.EventSystems.StandaloneInputModule:Process() UnityEngine.EventSystems.EventSystem:Update()
Answer by H3nryUnity · Aug 03, 2020 at 09:23 PM
Ok so, I just deleted a sound and now the game works fine. Idk why, but it works.
Your answer
Follow this Question
Related Questions
Bogus Null Reference in Build only,Bogus Phony NULL REFERENCE in BUILD ONLY (works in editor) 0 Answers
Game built on OSX does not open on OSX. 0 Answers
Any way to exclude BuildConfig.java from unity-android-resources project via Gradle? 1 Answer