If your fader isn't fading

It may be a problem with a null reference exception, which a few other folks have had (see the other threads on this lecture).

What worked for me was moving this content

            animator = GetComponent<Animator>();
            Weapon weapon = Resources.Load<Weapon>(defaultWeaponName); 
            EquipWeapon(weapon);

from Start() to Awake().

2 Likes

Good catch. It’s essential that component references on the same GameObject (like animator!) get cached in Awake() once all of these scripts start communicating.

2 Likes

Privacy & Terms