mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 15:14:50 +00:00
use Name on node when loading a gltf file (#1183)
* export Name in prelude * use Name instead of Labels in gltf scenes
This commit is contained in:
parent
c25b41a038
commit
228c3df751
2 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ pub use task_pool_options::DefaultTaskPoolOptions;
|
|||
pub use time::*;
|
||||
|
||||
pub mod prelude {
|
||||
pub use crate::{DefaultTaskPoolOptions, EntityLabels, Labels, Time, Timer};
|
||||
pub use crate::{DefaultTaskPoolOptions, EntityLabels, Labels, Name, Time, Timer};
|
||||
}
|
||||
|
||||
use bevy_app::{prelude::*, startup_stage};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use anyhow::Result;
|
||||
use bevy_asset::{AssetIoError, AssetLoader, AssetPath, Handle, LoadContext, LoadedAsset};
|
||||
use bevy_core::Labels;
|
||||
use bevy_core::Name;
|
||||
use bevy_ecs::{bevy_utils::BoxedFuture, World, WorldBuilderSource};
|
||||
use bevy_math::Mat4;
|
||||
use bevy_pbr::prelude::{PbrBundle, StandardMaterial};
|
||||
|
@ -318,7 +318,7 @@ fn load_node(
|
|||
));
|
||||
|
||||
if let Some(name) = gltf_node.name() {
|
||||
node.with(Labels::from(vec![name.to_string()]));
|
||||
node.with(Name::new(name.to_string()));
|
||||
}
|
||||
|
||||
// create camera node
|
||||
|
|
Loading…
Reference in a new issue