mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 20:00:53 +00:00
Compare commits
2 Commits
d50fb4508d
...
c9229c6884
Author | SHA1 | Date | |
---|---|---|---|
|
c9229c6884 | ||
|
930033354b |
@ -14,10 +14,7 @@ license = "MIT OR Apache-2.0"
|
|||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { version = "0.13", default-features = false, features = [
|
bevy = { version = "0.13", default-features = false, features = ["bevy_scene"] }
|
||||||
"bevy_asset",
|
|
||||||
"bevy_scene",
|
|
||||||
] }
|
|
||||||
bevy_gltf_components = { version = "0.5", path = "../bevy_gltf_components" }
|
bevy_gltf_components = { version = "0.5", path = "../bevy_gltf_components" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use bevy::{
|
use bevy::{
|
||||||
app::{App, Plugin},
|
app::{App, Plugin},
|
||||||
asset::Handle,
|
|
||||||
ecs::{
|
ecs::{
|
||||||
component::Component,
|
component::Component,
|
||||||
entity::Entity,
|
entity::Entity,
|
||||||
@ -13,7 +12,7 @@ use bevy::{
|
|||||||
log::warn,
|
log::warn,
|
||||||
prelude::Update,
|
prelude::Update,
|
||||||
reflect::{Reflect, TypePath},
|
reflect::{Reflect, TypePath},
|
||||||
scene::Scene,
|
scene::SceneInstance,
|
||||||
utils::HashMap,
|
utils::HashMap,
|
||||||
};
|
};
|
||||||
use bevy_gltf_components::GltfComponentsSet;
|
use bevy_gltf_components::GltfComponentsSet;
|
||||||
@ -157,7 +156,7 @@ impl<T: Component + FromGltfRef> Default for GltfRefPlugin<T> {
|
|||||||
/// SystemParam to find the Gltf that an entity belongs to.
|
/// SystemParam to find the Gltf that an entity belongs to.
|
||||||
#[derive(SystemParam)]
|
#[derive(SystemParam)]
|
||||||
pub struct GltfForEntity<'w, 's> {
|
pub struct GltfForEntity<'w, 's> {
|
||||||
gltfs: Query<'w, 's, (), With<Handle<Scene>>>,
|
gltfs: Query<'w, 's, (), With<SceneInstance>>,
|
||||||
hierarchy: Query<'w, 's, &'static Parent>,
|
hierarchy: Query<'w, 's, &'static Parent>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user