Also return name
This commit is contained in:
parent
537d050287
commit
bdbbb4267e
1 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,7 @@ create_settings_container!(
|
|||
);
|
||||
|
||||
impl SaveGame {
|
||||
pub fn to_entity_object(self, engine: &Engine) -> Result<Entity> {
|
||||
pub fn to_entity_object(self, engine: &Engine) -> Result<(Entity, String)> {
|
||||
let scene = engine.scene_mut();
|
||||
|
||||
let experience_settings = scene.resources.get::<ExperienceSettings>();
|
||||
|
@ -396,6 +396,6 @@ impl SaveGame {
|
|||
entity_object.insert_component(statistics);
|
||||
entity_object.insert_component(current_status);
|
||||
|
||||
scene.add_entity(entity_object)
|
||||
Ok((scene.add_entity(entity_object)?, self.general.name))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue