You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .raze() method of View requires several parameters:
A DeferredWorld
The View that was used to create the view output.
The View::State.
So for example, Element::raze() uses the element's entity id (to despawn it) as well as the child views and the components, which also may need cleanup.
However, having to keep around both the View and View::State in order to cleanup View::State is troublesome. It would be convenient if somehow View::State could be despawnable by itself, but this would mean that it would have to have a more complex type, and this is true for every type that implements View.
Views are especially troublesome to keep around since, in general, they are not copyable or cloneable. This means having to wrap them in an Arc or some other container in order to keep them.
The text was updated successfully, but these errors were encountered:
I did a bit of research along these lines last week. The outcome was that if we made a modest change to Bevy - what I call the "hidden parents" feature - then about 50% of the code for Quill's view layer is no longer needed, raze is no longer needed, StateScoped can work, etc. The reason is because with hidden parents, we don't need two trees, we can do everything as a single tree.
The
.raze()
method ofView
requires several parameters:View
that was used to create the view output.View::State
.So for example,
Element::raze()
uses the element's entity id (to despawn it) as well as the child views and the components, which also may need cleanup.However, having to keep around both the
View
andView::State
in order to cleanupView::State
is troublesome. It would be convenient if somehowView::State
could be despawnable by itself, but this would mean that it would have to have a more complex type, and this is true for every type that implementsView
.Views are especially troublesome to keep around since, in general, they are not copyable or cloneable. This means having to wrap them in an Arc or some other container in order to keep them.
The text was updated successfully, but these errors were encountered: