Quantcast
Channel: Answers by "ransomink"
Viewing all articles
Browse latest Browse all 80

Answer by ransomink

$
0
0
When you grab the first supply (the *target* variable), I assume that object is destroyed. If so, then once it gets destroyed the *target* will not have a reference. During the next Update(), it will check for a coin gameobject and FixedUpdate() will look at the target, which is set from the coin gameobject. You get an error from: - Not finding the coin gameobject - Not having a reference for target - Not having a transform to look at ---------- **EDIT**: It is not recommended to use GameObject.FindWithTag every frame—inside Update/FixedUpdate—because its use is very expensive.

Viewing all articles
Browse latest Browse all 80

Trending Articles



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