Hi everyone.
Im not sure if this is the right place to ask .
Lets say that i have one script called DEPTH with 3 Float variables .
Code:
public class DEPTH: MonoBehaviour
{
public float PosiX;
public float PosiY;
public float PosiZ;
void onGUI()
{
PosiX= firstP.x /texture.widthScreen.width ;
PosiY= firstP.y/texture.heightScreen.height;
PosiZ= 0;
}
}
Then my ScriptB called: AutoSpawn.
The script is excuted every 10 seconds and i think im referencing DEPTH Script to script to get the variables.
But i get Null everytime.
Código:
Class SpawnEnemies (){
public float PosiXX;
public float PosiYY;
public float PosiZZ;
DEPTH script;
void Start () {
PosiXX=script.PosiX.ToString;
PosiYY=script.PosiY.ToString;
PosiZZ=script.PosiZ.ToString;
}
}
Can anybody please givme a tip.
Thank you all.