Update SpriteMesh in PostUpdate#23591
Conversation
|
Wouldn't it be a better fix to turn those systems into observers instead? So they're ran immediately after a sprite mesh is spawned / changed no matter the schedule? Unless there's something blocking that? |
|
Observers are not well suited to processing bulk operations. It's also much harder to reason about and control the order that they run in. We should not ad-hoc change systems into observers without very careful analysis and profiling. |
Fair enough. What about using the |
|
Also, it should be noted that these systems were an ad-hoc solution in the first place, meant to be reworked into something more long-term later down the line (possibly after the material unification). But if this change makes them more pleasant in the short-term, I have no problems with it. |
Running the systems in I thought it might be |
Objective
Fixes #23590
Solution
Move
SpriteMesh'sadd_meshandadd_materialto PostUpdateSprites spawned during
PostUpdatewill still exhibit the problem, but this is an improvement.Testing
Test with the reproduction from #23590 to see that it fixes the problem.