2020-04-06 21:20:53 +00:00
|
|
|
[package]
|
|
|
|
name = "bevy_ui"
|
2022-04-17 23:04:52 +00:00
|
|
|
version = "0.8.0-dev"
|
2021-10-27 00:12:14 +00:00
|
|
|
edition = "2021"
|
2020-08-10 00:24:27 +00:00
|
|
|
description = "A custom ECS-driven UI framework built specifically for Bevy Engine"
|
|
|
|
homepage = "https://bevyengine.org"
|
|
|
|
repository = "https://github.com/bevyengine/bevy"
|
2021-07-23 21:11:51 +00:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-08-10 00:24:27 +00:00
|
|
|
keywords = ["bevy"]
|
2020-04-06 21:20:53 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2020-08-10 00:39:28 +00:00
|
|
|
# bevy
|
2022-04-17 23:04:52 +00:00
|
|
|
bevy_app = { path = "../bevy_app", version = "0.8.0-dev" }
|
|
|
|
bevy_asset = { path = "../bevy_asset", version = "0.8.0-dev" }
|
|
|
|
bevy_core_pipeline = { path = "../bevy_core_pipeline", version = "0.8.0-dev" }
|
Enforce type safe usage of Handle::get (#4794)
# Objective
- Sometimes, people might load an asset as one type, then use it with an `Asset`s for a different type.
- See e.g. #4784.
- This is especially likely with the Gltf types, since users may not have a clear conceptual model of what types the assets will be.
- We had an instance of this ourselves, in the `scene_viewer` example
## Solution
- Make `Assets::get` require a type safe handle.
---
## Changelog
### Changed
- `Assets::<T>::get` and `Assets::<T>::get_mut` now require that the passed handles are `Handle<T>`, improving the type safety of handles.
### Added
- `HandleUntyped::typed_weak`, a helper function for creating a weak typed version of an exisitng `HandleUntyped`.
## Migration Guide
`Assets::<T>::get` and `Assets::<T>::get_mut` now require that the passed handles are `Handle<T>`, improving the type safety of handles. If you were previously passing in:
- a `HandleId`, use `&Handle::weak(id)` instead, to create a weak handle. You may have been able to store a type safe `Handle` instead.
- a `HandleUntyped`, use `&handle_untyped.typed_weak()` to create a weak handle of the specified type. This is most likely to be the useful when using [load_folder](https://docs.rs/bevy_asset/latest/bevy_asset/struct.AssetServer.html#method.load_folder)
- a `Handle<U>` of of a different type, consider whether this is the correct handle type to store. If it is (i.e. the same handle id is used for multiple different Asset types) use `Handle::weak(handle.id)` to cast to a different type.
2022-05-30 16:59:44 +00:00
|
|
|
bevy_derive = { path = "../bevy_derive", version = "0.8.0-dev" }
|
2022-04-17 23:04:52 +00:00
|
|
|
bevy_ecs = { path = "../bevy_ecs", version = "0.8.0-dev" }
|
|
|
|
bevy_hierarchy = { path = "../bevy_hierarchy", version = "0.8.0-dev" }
|
|
|
|
bevy_input = { path = "../bevy_input", version = "0.8.0-dev" }
|
|
|
|
bevy_log = { path = "../bevy_log", version = "0.8.0-dev" }
|
|
|
|
bevy_math = { path = "../bevy_math", version = "0.8.0-dev" }
|
|
|
|
bevy_reflect = { path = "../bevy_reflect", version = "0.8.0-dev", features = ["bevy"] }
|
|
|
|
bevy_render = { path = "../bevy_render", version = "0.8.0-dev" }
|
|
|
|
bevy_sprite = { path = "../bevy_sprite", version = "0.8.0-dev" }
|
|
|
|
bevy_text = { path = "../bevy_text", version = "0.8.0-dev" }
|
|
|
|
bevy_transform = { path = "../bevy_transform", version = "0.8.0-dev" }
|
|
|
|
bevy_window = { path = "../bevy_window", version = "0.8.0-dev" }
|
|
|
|
bevy_utils = { path = "../bevy_utils", version = "0.8.0-dev" }
|
2020-07-25 06:04:45 +00:00
|
|
|
|
2020-08-10 00:39:28 +00:00
|
|
|
# other
|
2021-07-15 21:25:49 +00:00
|
|
|
stretch = "0.3.2"
|
2021-12-19 03:03:06 +00:00
|
|
|
serde = { version = "1", features = ["derive"] }
|
2021-05-06 00:41:18 +00:00
|
|
|
smallvec = { version = "1.6", features = ["union", "const_generics"] }
|
2021-12-14 03:58:23 +00:00
|
|
|
bytemuck = { version = "1.5", features = ["derive"] }
|