Skip to content

Commit ece0337

Browse files
authored
chore: Create 0.10.0-migration.md
1 parent 8ada1bd commit ece0337

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

release-notes/0.10.0-migration.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Migrating from 0.9 to 0.10
2+
3+
## Change in script re-load behavior https://github.com/makspll/bevy_mod_scripting/pull/345
4+
5+
Scripts now retain state on a re-load. This means any globals created in a script should be re-computed when it is loaded using `on_script_loaded`
6+
7+
## `ScriptContexts` resource removed https://github.com/makspll/bevy_mod_scripting/pull/350
8+
9+
Change all references from `ScriptContexts.contexts` to `Scripts<T>.scripts.context`
10+
11+
Language implementations must provide an internal mutability mechanism for their runtimes, and change &mut references to & on references to them in handlers
12+
13+
## Removal of some internal macros https://github.com/makspll/bevy_mod_scripting/pull/367
14+
15+
A number of internal macros was made private as part of an effort to clean up BMS imports.
16+
17+
If you were using these you will need to re-implement those yourself.
18+
19+
## Changes to `GetTypeDependencies` trait https://github.com/makspll/bevy_mod_scripting/pull/369
20+
21+
- Any types which you implemented `GetTypeDependencies` for manually, will need to specify an underlying type, for non-generic types this will just be Self, for types which have recursive registrations, this will be `Self<T1::Underlying, T2::Underlying...>` etc
22+
- You can use the derive macro to make this easier instead
23+
24+
## Addition of global type cache
25+
26+
You should replace all your `world.get_type_by_name("MyType")` calls with `types.MyType` etc.
27+
get type by name was not removed but it might be deprecated in the future.
28+

0 commit comments

Comments
 (0)