Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

Prefabs holding variables,How to carry accross game objects to prefabs

$
0
0
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.,

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>