Quantcast
Channel: Answers for "How to get script components in multiple gameobjects C#"
Browsing all 4 articles
Browse latest 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

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 all 4 articles
Browse latest View live




Latest Images