Hello,
I often need to modify a variable based on a condition.
When this happens, I use an If block for the conditional part, but because it has its own scope we can’t set the pad inside. So I have to add a switch just after to only set the pad when the if is triggered.
I find this kinda ugly, but often have to do something like this.
Only solution I’m thinking about is having this whole thing as its own operation and only call it when there is the trigger; that way we still have access to the Pad without this ugly switch.
But it means adding an operation which may not be wanted when patching around.
In regular C# we can do if and set variable inside because the scope is shared.
Am I missing any obvious way of doing this?
Thanks


