Re-export ron
in bevy_scene
(#10529)
# Objective Close #10504. Improve the development experience for working with scenes by not requiring the user to specify a matching version of `ron` in their `Cargo.toml` --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
parent
d0c9e2197a
commit
dcfae72386
@ -37,6 +37,9 @@ pub use server::*;
|
||||
|
||||
pub use bevy_utils::BoxedFuture;
|
||||
|
||||
/// Rusty Object Notation, a crate used to serialize and deserialize bevy assets.
|
||||
pub use ron;
|
||||
|
||||
use crate::{
|
||||
io::{embedded::EmbeddedAssetRegistry, AssetSourceBuilder, AssetSourceBuilders, AssetSourceId},
|
||||
processor::{AssetProcessor, Process},
|
||||
|
@ -26,7 +26,6 @@ bevy_render = { path = "../bevy_render", version = "0.12.0", optional = true }
|
||||
|
||||
# other
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
ron = "0.8.0"
|
||||
uuid = { version = "1.1", features = ["v4"] }
|
||||
thiserror = "1.0"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
use crate::{DynamicSceneBuilder, Scene, SceneSpawnError};
|
||||
use crate::{ron, DynamicSceneBuilder, Scene, SceneSpawnError};
|
||||
use bevy_ecs::{
|
||||
entity::Entity,
|
||||
reflect::{AppTypeRegistry, ReflectComponent, ReflectMapEntities},
|
||||
|
@ -18,6 +18,9 @@ mod scene_spawner;
|
||||
#[cfg(feature = "serialize")]
|
||||
pub mod serde;
|
||||
|
||||
/// Rusty Object Notation, a crate used to serialize and deserialize bevy scenes.
|
||||
pub use bevy_asset::ron;
|
||||
|
||||
use bevy_ecs::schedule::IntoSystemConfigs;
|
||||
pub use bundle::*;
|
||||
pub use dynamic_scene::*;
|
||||
|
@ -1,3 +1,4 @@
|
||||
use crate::ron;
|
||||
#[cfg(feature = "serialize")]
|
||||
use crate::serde::SceneDeserializer;
|
||||
use crate::DynamicScene;
|
||||
|
@ -496,6 +496,7 @@ impl<'a, 'de> Visitor<'de> for SceneMapVisitor<'a> {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::ron;
|
||||
use crate::serde::{SceneDeserializer, SceneSerializer};
|
||||
use crate::{DynamicScene, DynamicSceneBuilder};
|
||||
use bevy_ecs::entity::{Entity, EntityMapper, MapEntities};
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use bevy::utils::thiserror;
|
||||
use bevy::{
|
||||
asset::{io::Reader, AssetLoader, AsyncReadExt, LoadContext},
|
||||
asset::{io::Reader, ron, AssetLoader, AsyncReadExt, LoadContext},
|
||||
prelude::*,
|
||||
reflect::TypePath,
|
||||
utils::BoxedFuture,
|
||||
|
@ -5,6 +5,7 @@ use bevy::{
|
||||
embedded_asset,
|
||||
io::{Reader, Writer},
|
||||
processor::LoadAndSave,
|
||||
ron,
|
||||
saver::{AssetSaver, SavedAsset},
|
||||
AssetLoader, AsyncReadExt, AsyncWriteExt, LoadContext,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user