Comments (1)
I believe the issue here is you're dropping the Handle
on each frame;
fn get_handle(asset_server: Res<AssetServer>, fonts: Res<Assets<VelloFont>>) {
// Handle created and loading started
let handle = asset_server.load::<VelloFont>("...");
let Some(font) = fonts.get(&handle) else {
// Highly likely the asset hasn't loaded immediately (latency, etc.)
// Because of that, this function always returns
warn!("asset does not exist");
return;
// Now that we've returned, the Handle is dropped, which causes the load to be cancelled
};
// ...
}
Instead, try storing the Handle
in a resource (or an Entity
as a Component
). That way the Handle
will survive long enough for the load to complete.
from bevy.
Related Issues (20)
- Allow plugins to define component requirements HOT 6
- Panic when lazily adding multiple observers HOT 2
- `run_system_cached` API will reject systems created by `pipe` and `map` HOT 1
- Implement KeyboardFocus resource and focus keyboard events
- Add CursorIcon::Hidden HOT 1
- Add docs to `RawHandleWrapper::_window` field HOT 1
- Framerate drop after turning on WinitSettings::desktop_app() HOT 3
- Logging for system parameter validation should be configurable HOT 2
- Animation's reflection trait bounds can be simplified
- `NonEmptyEventReader` system parameter
- Respect `SystemParam::validate_param` for observers and other non-executor system runners
- `missing-metadata` workflow fails and posts a misleading comment if `Cargo` itself breaks HOT 1
- Horizontal scroll does not work in `scroll` example HOT 2
- Colored glass should cast colored shadows HOT 4
- Transmission / opacity should affect shadow strength HOT 2
- JS Bindings for BRP
- `bevy::diagnostic::FrameTimeDiagnosticsPlugin` cannot obtain true FPS with modifying `bevy::time::TimeUpdateStrategy`
- Try optimizing animate_targets system HOT 3
- Add `world` and `world_mut` methods to `WorldChildBuilder` HOT 2
- Subassets of subassets do not work. HOT 1
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.