Hi, maybe this is far out and not suppported whatsoever or totaly and it’s a newb question… you tell me
Is there a way to construct thru script the name of a variable being access?
When iterating, for example, I could have (This does not work…):
for(int i = 0; i < childCount; i++){
var MyConstructedVariableName = ("myChild" + i).ToString();
if(myGameObject.GetComponent<myScript>().MyConstructedVariableName != null){
DoSomething();
}
}
Inspires anyone?
Thanks!