Crates.io | reactor_serial |
lib.rs | reactor_serial |
version | 1.0.0 |
source | src |
created_at | 2024-07-21 17:27:37.202262 |
updated_at | 2024-07-21 17:27:37.202262 |
description | A plugin for Bevy for handling saving and loading |
homepage | https://www.cobaltreactor.com |
repository | https://github.com/BobG1983/cobalt_reactor |
max_upload_size | |
id | 1310472 |
size | 67,570 |
reactor_serial
A crate for handling saving and loading for the Bevy game engine, designed for use with reactor_proto
SerialPlugin
to your app with a root save path (relative to the users data dir).app.register_save_data
.commands.set_user_id()
.commands.set_save_slot()
reactor_proto
don't register ProtoPlugin
as reactor_serial
will register it for you.To request a save send a SaveRequest
event.
To request a load send a LoadRequest
event.
Be aware that file IO testing has a lot of sleeps in it, this is to let the OS actually do the file IO. Don't be worried if test the events.rs file takes some time. I'd recommend not running cargo test
, and instead running cargo test --test <filename>
if you're doing testing in general.
Sorry about that, I couldn't find another good way to ensure that files were deleted/written without sleeping or looping in a way that would cause the test to infinite loop on a failure.