Quantcast
Channel: Answers for "How to get script components in multiple gameobjects C#"
Browsing latest articles
Browse All 4 View Live

Answer by PeterDC

Instead of using public use static; that should keep your variable the same value in all instances of the script.

View Article


Answer by Marowi

You're on the right track.You should probably do it less often than in every Update(), but FindGameObjectsWithTag will work. You then need to get the component (script) that the variable is in, using...

View Article

Browsing latest articles
Browse All 4 View Live


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