feat(data,engine): implement NativeStorage and WasmStorage backends (closes #48)
Build and Deploy / build-and-push (push) Successful in 3m59s
Build and Deploy / build-and-push (push) Successful in 3m59s
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ use std::sync::Mutex;
|
||||
|
||||
use bevy::prelude::*;
|
||||
|
||||
use crate::platform::{StorageBackendResource, default_storage_backend};
|
||||
use crate::{
|
||||
AchievementPlugin, AnalyticsPlugin, AnimationPlugin, AssetSourcesPlugin, AudioPlugin,
|
||||
AutoCompletePlugin, AvatarPlugin, CardAnimationPlugin, CardPlugin, ChallengePlugin,
|
||||
@@ -44,6 +45,15 @@ impl Plugin for CoreGamePlugin {
|
||||
.take()
|
||||
.expect("CoreGamePlugin::build called twice");
|
||||
|
||||
match default_storage_backend() {
|
||||
Ok(storage) => {
|
||||
app.insert_resource(StorageBackendResource(storage));
|
||||
}
|
||||
Err(err) => {
|
||||
warn!("storage: failed to initialize platform backend: {err}");
|
||||
}
|
||||
}
|
||||
|
||||
app.add_plugins(AssetSourcesPlugin)
|
||||
.add_plugins(ThemePlugin)
|
||||
.add_plugins(ThemeRegistryPlugin)
|
||||
|
||||
Reference in New Issue
Block a user