File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
release-content/migration-guides Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : ` ReflectAsset` now uses `UntypedAssetId` instead of `UntypedHandle`.
3
+ pull_requests : [19606]
4
+ ---
5
+
6
+ Previously, ` ReflectAsset ` methods all required having ` UntypedHandle ` . The only way to get an
7
+ ` UntypedHandle ` through this API was with ` ReflectAsset::add ` . ` ReflectAsset::ids ` was not very
8
+ useful in this regard.
9
+
10
+ Now, all methods have been changed to accept ` impl Into<UntypedAssetId> ` , which matches our regular
11
+ ` Assets<T> ` API. This means you may need to change how you are calling these methods.
12
+
13
+ For example, if your code previously looked like:
14
+
15
+ ``` rust
16
+ let my_handle : UntypedHandle ;
17
+ let my_asset = reflect_asset . get_mut (world , my_handle ). unwrap ();
18
+ ```
19
+
20
+ You can migrate it to:
21
+
22
+ ``` rust
23
+ let my_handle : UntypedHandle ;
24
+ let my_asset = reflect_asset . get_mut (world , & my_handle ). unwrap ();
25
+ ```
You can’t perform that action at this time.
0 commit comments