In a C# script i tried this
First file:
class Ada{
int n;
}
Another file:
class Bada{
Ada myAda;
void start(){
myAda = new Ada();
myAda.n = 3;
}
}
ANDDD IT didn't work. I got error like
"You are trying to create a MonoBehaviour using the NEW keyword. This is not allowed"
So then, how do i access those variables?
↧