Answer the question
In order to leave comments, you need to log in
Is it possible to set variables inline?
In php, this was definitely possible, it looked something like this ${"Test".$a} which could be equal to both $Test1 and $Test2, etc.
I also need an assignment like this, so far I'm doing this
public GameObject SelectTest1;
public GameObject SelectTest1;
public GameObject SelectTest1;
.......................
GameObject SelectedObject= null;
switch(v){
case "Test1": SelectedObject = SelectTest1; break;
case "Test2": SelectedObject = SelectTest2; break;
case "Test3": SelectedObject = SelectTest3; break;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question