I'm attempting to move an object with several widgets on it to another panel temporarily at runtime. It seems like it should be very straightforward, but I can't get it to work. Here's my best guess at how it's supposed to work:
widget.cachedTransform.parent = newPanel.cachedTransform;
oldPanel.RemoveWidget(widget);
newPanel.AddWidget(widget);
Even setting both panels as dirty doesn't work. Anyone know the right way to do this?
EDIT: It does work as expected if you disable the widget(s) before changing the parent, then reenable it afterward. Ditto with the panel's GameObject. I'm not sure this is the intended method, though.