Cannot Reproduce

WaitForSeconds causes NullReferenceException

nishat 4 years ago updated by Lazlo Bonin (Lead Developer) 4 years ago 2

yield return time.WaitForSeconds(5f); line seems to create problem :( 

NullReferenceException: Object reference not set to an instance of an object
fallenPlayer+<Rewind>c__Iterator0.MoveNext () (at Assets/Scripts/fallenPlayer.cs:26)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)
fallenPlayer:OnTriggerEnter(Collider) (at Assets/Scripts/fallenPlayer.cs:16)

Chronos Version:
Unity Version:
Pending Review

I see two possibilities here:

1. The game object with this script doesn't have a Timeline attached.

2. The "PlayerCube" global clock doesn't exist.

Can you make sure this isn't the case?