I am looking for ideas or ways to load unsaved objects back in the scene when the Load() method is called from the pause menu or menu screen. i.e items I have picked up and/or enemies I've recently killed before autosaving or saving manually. items are scriptable objects, but the enemies are just normal objects present in the scene. I want it to be somewhat memory efficient, I am not sure if setting its status to inactive would be sufficient, instead of destroying it altogether. Thank you in advance.
CodePudding user response:
Can't you just reload the scene and if you have saves you should be able to just reload and modify the scene based on save data.
You may need to add more info about your project, because right now I can only assume what it looks like and what exactly are trying to achieve.
CodePudding user response:
For memory efficiency you should probably just disable enemies instead of destroying them (given that you'd have to clone them in order to respawn). It'd certainly be more memory efficient than having to manually set the position/rotation again.