I’ve made a game where an enemy prefab is spawned and uses an empty game object as its fire point and then rotates toward the player. It instantiates a bullet I made and fires it toward the player. However, the script needs a reference to the player and camera in variable form, so I did that, but whenever I make it a prefab it loses the variable’s value and returns the error: “missingreferenceexception: the variable “player” of (script name) doesn’t exist anymore.” I hope someone can help me.,
↧