googleid_109376
12 years agoOccasional Contributor
Conditional USEUNIT
Hello,
I would like to know if it is possible to have some conditional USEUNIT, that is, linked units depending on some runtime condition. For example, I tried this:
if(condition1)
//USEUNIT unit1
else
//USEUNIT unit2
but it did not work because it linked both units, like if the conditions were not there.
How can I link units depending on some condition?
Thanks
I would like to know if it is possible to have some conditional USEUNIT, that is, linked units depending on some runtime condition. For example, I tried this:
if(condition1)
//USEUNIT unit1
else
//USEUNIT unit2
but it did not work because it linked both units, like if the conditions were not there.
How can I link units depending on some condition?
Thanks
- It is impossible, but you can try using Runner.CallMethod for your task (if you have, for instance, two functions with the same name in different units).