Comments (3)
OnAdd hooks will be paid once on entity spawning, and only for those entities which have the state scoped component. Added filters will be paid every frame, scaling linearly with the number of matching entities.
I'd love to see real numbers though.
from bevy.
I don't believe that's the correct complementary behavior. The current behavior is "despawn on exit", so its complement would be "spawn on enter", which would be genuinely useful but is blocked on the better scenes work. As another example, "show on enter" + "hide on exit" is already possible.
From @benfrankel in #15072
from bevy.
If we consider that practically all game entities will have StateScoped
, this would introduce a fixed global cost to spawning entities (or at least the root entities of hierarchies). What is the perf comparison between an OnAdd
hook and e.g. a system that polls for Added
(not that I'm recommending to use such a system, but we have a number of those in the bevy
codebase)?
from bevy.
Related Issues (20)
- Remove `StateTransition` schedule in favor of using observers HOT 5
- different wgpu_backend render total different with the same gltf model HOT 4
- When using multiple canvas, an error is displayed
- Implement `Component` for `Arc` HOT 5
- Border radius is scaled incorrectly HOT 2
- non-root `TargetCamera`s are not ignored HOT 1
- Resource doesn't get dropped on panic in system. Is this expected? HOT 4
- uberbuffers selects single mesh when two are added HOT 1
- Instance example magically inherits transform information of a random entity if any number of new pbr bundles is spawned HOT 3
- ImageAddressMode::Repeat "twitchy" texture rendering
- overflow evaluating the requirement &_: IntoIterator HOT 1
- Don't use `CARGO_MANIFEST_DIR` directly for changing the relative location of the assets directory
- bevy_ptr: unused align_of import in release mode
- overlapping viewport from different camera causes over-culling of entity rendering HOT 2
- Make `reflect::Map::drain` and `reflect::List::drain` take a mutable borrow instead of `Box<Self>`.
- Reflect derived traits on all components and resources HOT 6
- Mention `DynamicTyped` in docs
- On Steam Deck in gaming mode the screen does not update
- The program statements in the novice tutorial are no longer applicable in the latest version. It is recommended to modify them | 新手教程中的程序语句在最新版本中不在适用,建议修改。 HOT 4
- Delay in text-update vs layout-update, creating wiggling text HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.