derp. needed spatial bundle on parent

main
Elijah Voigt 2 years ago
parent e0cd574a51
commit 47af04bef9

@ -11,32 +11,26 @@
// * (medium) Load default scene when gltf selected
// * (medium) Set gltf to active/inactive
// * (medium) Play individual animation(s)
// * Only select one at a time.
// * (hard) Better Colorscheme
// * (medium) Visual errors for bad GLTFs
// * (medium) Spawn clicked scene
// * (medium) Play clicked animation
// * (easy) Play all animations
// * (medium) Add fonts similar to Audios based on inspect-fonts
// * (hard) Add Dialogs (requires text box UI, saving, loading).
//
// Asset types:
// * Audios (done)
// * Loop individual
// * Stop all
// * Loop individual (done)
// * Gltfs (doing)
// * Scenes
// * Animations
// * Play/Pause all
// * Fonts
// * Monologues
// * Fonts (done)
// * Monologues (done)
use bevy::{
asset::{Asset, Assets},
asset::{AssetLoader, LoadContext, LoadedAsset},
audio::PlaybackMode,
gltf::Gltf,
input::{keyboard::KeyboardInput, ButtonState},
prelude::*,
utils::BoxedFuture,
};
@ -108,7 +102,7 @@ pub struct EditorCamera;
fn initialize_ui(mut commands: Commands) {
// Empty entity for populating the level being edited
commands.spawn((TransformBundle { ..default() }, LevelRoot));
commands.spawn((SpatialBundle { ..default() }, LevelRoot));
commands.spawn((
Camera3dBundle { ..default() },
@ -782,11 +776,14 @@ mod scenes {
.iter()
.filter(|(&interaction, _)| interaction == Interaction::Pressed)
.for_each(|(_, ui::TargetAsset { handle })| {
info!("Spawning {:?}", handle);
info!("Spawning Scene {:?}", handle);
commands
.entity(level_root.single())
.with_children(|parent| {
parent.spawn((handle.clone(), TransformBundle { ..default() }));
parent.spawn(SceneBundle {
scene: handle.clone(),
..default()
});
});
})
}

Loading…
Cancel
Save