Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
(bleed) AutoRenderSize returns int2.Zero for WithSpriteBody with any required condition #14449
The bug was introduced (or at least triggered) by the split of Render and Selection bounds.
As long as one of the actors' sprite bodies doesn't have any required condition, it works fine, but even with correct condition setup (like for the V2), it breaks when all bodies have some kind of required condition, even if one of them is/should be currently "active".
@MunWolf They have
Option 1. IF (and that is a very big "IF" that I don't believe in) it's safe to cache the size of a random (whichever is first) sequence, which was the old/current behaviour and use that forever (pretty sure "deploying" actors can easily invalidate that, but let's leave this for future PRs), then we can easily not care about which is the first visible sequence in order to get its size and just get the size of the first (visible or not).
I think we can safely drop the
Option 2. Due to the nature of
Going with Option 2. may even be better in the long run as I'm pretty sure we'd want to get rid of the caching of the bounds, unless I'm missing something that modders can do to make it work when switching to a different "model" under some condition (deploying into something bigger comes to mind).