after writing public variable and making properties for it in a class called (FirstClass) :
public int example = 5;
public int Example
{
get
{
return example;
}
set
{
example = value;
}
}
then after that we write another class called (secondClass)
how do I import the variable without changing it or giving it new value? when i simply write on second class :
void Start (){
if (example == 5) {
Debug.Log ("The value is: 5" );
}
}
it will give me error that " example " doesn’t exist …