nodemules / SuperPlatformerBros

1 stars 0 forks source link

Jumping doesnt work in build #31

Closed brenthaertlein closed 6 years ago

brenthaertlein commented 6 years ago

Marsh cannot jump in a MacOS build.

The jump sound plays, but the character does not jump.

Check Windows build for how this functionality behaves

johngreedjr commented 6 years ago

Changing this to just "build" as I created a windows build and it does not work there either.

Investigate GetButton vs GetButtonDown and other things.

johngreedjr commented 6 years ago

I tried most things from this guy's list to no avail: https://forum.unity.com/threads/script-not-working-in-build-ok-in-editor.40806/

johngreedjr commented 6 years ago

Get this error in logs of build but not in play mode:

NullReferenceException: Object reference not set to an instance of an object
  at Assets.Scripts.CameraSystem.LateUpdate () [0x00007] in /Users/charles/Code/SuperPlatformerBros/Assets/Scripts/CameraSystem.cs:32 

(Filename: /Users/charles/Code/SuperPlatformerBros/Assets/Scripts/CameraSystem.cs Line: 32)

Making this change fixes it but does not fix the jump issue (unrelated)

-            _player = GameObject.FindGameObjectWithTag("Player");
+            _player = GameObject.Find("Marsh");
johngreedjr commented 6 years ago

Fixed. Gravity Changed.