So I have a character who is able to shoot however when the character dies and respawns he is unable to shoot and i get the error:
UnassignedReferenceException: The variable BulletTrailPrefab of Weapon has not been assigned.
You probably need to assign the BulletTrailPrefab variable of the Weapon script in the inspector.
UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, Vector3 pos, Quaternion rot) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/UnityEngineObject.cs:74)
UnityEngine.Object.Instantiate (UnityEngine.Object original, Vector3 position, Quaternion rotation) (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/UnityEngineObject.cs:84)
Weapon.Effect () (at Assets/Weapon.cs:64)
Weapon.Shoot () (at Assets/Weapon.cs:53)
Weapon.Update () (at Assets/Weapon.cs:33)
So if someone can help me fixing this it would be greatly appreciated. I have tried lots of stuff however nothing appears to work ![]()
1924279–124267–Weapon.cs (1.28 KB)
1924279–124268–GameMaster.cs (720 Bytes)
1924279–124269–Player.cs (498 Bytes)