SIGN IN SIGN UP
bevyengine / bevy UNCLAIMED

A refreshingly simple data-driven game engine built in Rust

0 0 59 Rust

Rename SortedRenderPhase add to add_retained (#24404)

# Objective

In #22966 the semantics of the `add` method on `SortedRenderPhase` was
changed from the items being cleared at the end of the frame, to items
being retained until they are removed. A new `add_transient` method was
added with the old functionality, but this is a big migration hazard
because it's a major semantic change that doesn't give any compiler
errors or warnings.

I discovered this after updating `bevy_vector_shapes` to the RC and
seeing drawings not being cleared properly.

## Solution

Rename `add` to `add_retained` both for clarity and to make old uses not
compile, so the affected users will know to look in the migration guide.

A sentence about this should be added to the migration guide if/when
this is backported to the 0.19 release branch.

## Testing

It compiles (hopefully).
K
Kristoffer Søholm committed
adc18d7fb50b30d2dafa2a71d698fb29638fe065
Parent: 95f03c6
Committed by GitHub <noreply@github.com> on 5/28/2026, 8:50:16 PM