|
| 1 | +# [`bevy_mod_scripting`](https://github.com/makspll/bevy_mod_scripting/) 0.9.7 is out! |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +## Summary |
| 6 | +- Adds ability to construct arbitrary types and enums via `construct` global functions: |
| 7 | +```lua |
| 8 | +local myStruct = construct(StructType, { |
| 9 | + foo = bar |
| 10 | + zoo = construct(NestedType { |
| 11 | + foo = bar |
| 12 | + }) |
| 13 | +}) |
| 14 | + |
| 15 | +local myEnum = construct(EnumType, { |
| 16 | + variant = "StructVariant" |
| 17 | + foo = Bar |
| 18 | +}) |
| 19 | + |
| 20 | +local myTupleStructEnum = construct(EnumType, { |
| 21 | + variant = "TupleStructVariant" |
| 22 | + _1 = bar |
| 23 | +}) |
| 24 | +``` |
| 25 | + |
| 26 | +- BMS will now automatically register components with `ReflectComponent` type data, so that you can query them as components *before* inserting them into entities. i.e.: |
| 27 | +```rust |
| 28 | +#[derive(Reflect, ..)] |
| 29 | +#[reflect(Component)] |
| 30 | +struct MyComp; |
| 31 | +``` |
| 32 | + |
| 33 | +- `ReflectAllocator` diagnostics are now available conveniently packaged as a plugin (measuring current allocation count + deallocations): |
| 34 | +```rust |
| 35 | +app.add_plugins(AllocatorDiagnosticPlugin) |
| 36 | +``` |
| 37 | + |
| 38 | +- Initial documentation generation from LAD files is now being published with the book over at https://makspll.github.io/bevy_mod_scripting/ladfiles/bindings.lad.html |
| 39 | + - This is still a prototype, but will contain useful information on bindings BMS exports by default. |
| 40 | + - LAD files are in a good shape, but some details need to be polished before they become stable |
| 41 | + - work on other backends (other than mdbook) should be possible now, albeit changes are expected |
| 42 | + |
| 43 | +## Fixes |
| 44 | +- When an asset handle is requested and immediately dropped, the previously confusing error: `A script was added but it's asset was not found, failed to compute metadata. This script will not be loaded.` was downgraded to a warning with a helpful hint. |
| 45 | +- Cases where resource/component/allocation locks would not be correctly released in the case of script function errors or short-circuting logic were fixed |
| 46 | +- The `bevy/reflect_functions` and `bevy/file_watcher` feature flags are no longer pulled into the dependency tree by BMS, reducing bloat. |
| 47 | + |
| 48 | +## Changelog |
| 49 | +See a detailed changelog [here](https://github.com/makspll/bevy_mod_scripting/blob/main/CHANGELOG.md) |
0 commit comments