Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Referencing variables via external script?

$
0
0
I want to reference variables from script A into script B. I'm using GetComponent and everything works fine. The only issue I'm running into is that I have about 100+ variables in script A, and I don't want to declare each and every one of them as 'public' so that they can be used in script B. Is there a way so that script B can be allowed access to all variables from script A including non public members?

Viewing all articles
Browse latest Browse all 171066

Trending Articles



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