Errors after creating the Prefab variant just after adding the Enemy and Player

Neither of the characters move and when you click around, it produces an error. Everything was working fine before I created the prefab variants. Any Ideas?

NullReferenceException: Object reference not set to an instance of an object
RPG.Movement.Mover.StartMoveAction (UnityEngine.Vector3 destination) (at Assets/Scripts/Movement/Mover.cs:27)
RPG.Control.PlayerController.InteractWithMovement () (at Assets/Scripts/Control/PlayerController.cs:51)
RPG.Control.PlayerController.Update () (at Assets/Scripts/Control/PlayerController.cs:15)

This is the Line that it takes me to when I click the error:
GetComponent().StartAction(this);

ok, when you make those variant prefabs, the main prefab, “Character” needs to have the scripts removed and re-added. I don’t know why that needed to be done, but it works now.

Probably just a glitch. I wish I could say that never happens in Unity, but it definitely does.

Privacy & Terms