Make spawn_dynamic return InstanceId (#6663)
# Objective Fixes #6661 ## Solution Make `SceneSpawner::spawn_dynamic` return `InstanceId` like other functions there. --- ## Changelog Make `SceneSpawner::spawn_dynamic` return `InstanceId` instead of `()`.
This commit is contained in:
parent
0a853f1ca6
commit
4209fcaeda
@ -54,10 +54,11 @@ pub enum SceneSpawnError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl SceneSpawner {
|
impl SceneSpawner {
|
||||||
pub fn spawn_dynamic(&mut self, scene_handle: Handle<DynamicScene>) {
|
pub fn spawn_dynamic(&mut self, scene_handle: Handle<DynamicScene>) -> InstanceId {
|
||||||
let instance_id = InstanceId::new();
|
let instance_id = InstanceId::new();
|
||||||
self.dynamic_scenes_to_spawn
|
self.dynamic_scenes_to_spawn
|
||||||
.push((scene_handle, instance_id));
|
.push((scene_handle, instance_id));
|
||||||
|
instance_id
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn spawn_dynamic_as_child(
|
pub fn spawn_dynamic_as_child(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user