This question was
closed Oct 29, 2015 at 01:19 PM by
Landern for the following reason:
Duplicate and already fixed. Answered post: http://answers.unity3d.com/questions/1090149/calling-variables-from-other-script-1.html
Question by
Pejovski · Oct 28, 2015 at 10:10 PM ·
scripting problemvariablevariables
Calling variables from other script
I have these 2 scripts in which im calling 2 variables from 1 script to another, one of them is working other one isn't what is the problem
Script 1 - CubeControl.js
static var canWalk = true;
static var canDie = false;
Script 2 - Spikes Kill.js
CubeControl.canWalk = false;
CubeControl.canDie = true;
This is just short part of the script. So i have been using only canWalk variable it was working fine and still is, but now added another canDie and when call that var from the other script(spikes kill) its saying canDie is not member of 'CubeControl'. How can i fix this?
Comment