It seems we should have different sizing modes on the nodes. An auto-sizing mode has been requested for a long time, which would make the node take on the size from the texture and thereby disable the size-fields in the editor. So far it has only come up from the fact that it’s very annoying to have to find the image and it’s original size and manually transfer this to the gui node in the editor. From your issue, it seems like there should also be different runtime behaviours as well. Here’s my idea:
- Fixed - exactly like the current implementation
- Auto - take on the size of the current animation frame. This would disable the size field in the editor to make it clear that it’s automatic. Any custom setting of the size at runtime would be overridden by the engine. Setting it to another value could also produce a warning in this mode.
“Fixed” could be called “Manual” or “Custom” as well, not sure which one is the most clear.
I was thinking if it would ever be useful to have a setting where the size is fetched from the first animation frame and then kept constant during the course of the animation, but I’m not sure there are any immediate use cases for that. That mode would also be really hard to name, which sort of speaks a bit against it.