- if this is a user widget
- and this is the parent container hosting those widgets:
Set the instance’s data to have said instance take a different execution path. Or use a select node to feed other elements pertinent data. Here, providing each user widget was given a different ID, that widget would take a different execution path.
There are betters ways than using an int, ofc - enumerators are much more descriptive & human-readable, for example.
Another, slightly more advanced technique that does not require you to encapsulate the functionality within the user widget is to Dispatch the ID.
- the child dispatches its ID (here, an Instance Editable enum):
- only to have it caught by the parent:
Now you can create a bazillion of generic light-on-script widgets that do know what they’re executing; it’s decided by the underlying, owning widget instead. Only the parent needs to know about the functionality.
Optionally, at the bottom, one can manually set up dispatchers if so preferred.