Hey all
I have a it of an issue with a couple of my scripts
What I need is a script with my variables which are static, and a second generic script to access them
The generic script has to be universal so I can attach to various objects and access different variables from script 1
Example: script1 has 3 variables
public static float var1 = 1;
public static float var2 = 2;
public static float var3 = 3;
Script2 access one of those variable
string dynVar;
void Start ()
{
float x = script1.var2;
}
Now I know that code won’t work as its just as an example
I want to be able to change the name of the variable in the inspector
Hope this makes sense, also if it makes a difference its planned for mobile device