I wish to use a value in say B script. Now in A script I have a variable is modified using GUI in run time. I wish to use that same variable in another script in run time i.e. changes in GUI should affect both the variables.
Could someone help me with this?
Thank you very much in advance.
If the above script is defined in a file named CannonController.js, you could refer to it in another script like this:
When you define a public variable named cannonScript of type CannonController you can assign any object with a CannonController script attached to it in the Inspector.
You can do that like this:
I'm not sure why you have those static variables. Perhaps you could explain that.