Quantcast
Channel: Questions in topic: "declare"
Viewing all articles
Browse latest Browse all 78

Very simple question

$
0
0
I have made quite a few JS scripts in Unity, like car and AI car scripts, but I have always dodged this problem. I declare a public var 'firstVar' in one script, and attach it to a gameobject 'firstGameObject'. I have another script on another object, and I want to say, "secondVar = firstVar from firstGameObject". How is that written? (In JavaScript)

Viewing all articles
Browse latest Browse all 78

Trending Articles



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