Notifications
Clear all
[Closed] How to access variable expression not value
Mar 25, 2022 3:34 am
Hello,
I have a situation in which I need to change variables values dynamically. The variable is within a struct. I need to access the expression of the value to point it to another target, not the value itself. please see the following mini example.
struct test (
x = ui.globalRollout.width.value , y = ui.globalRollout.height.value,
)
I need to dynamically access this “UI.globalRollout.width.value” to replace it with something else like this “UI.LocalRollout.width.value” in certain conditions. I’ve tried getProperty() method but It returns the value of the expression. Also Doing it manually is not practical because I will have two versions of the struct and updating it will not be easy. Any idea of how to do this?
Thanks in advance