Hi,
Just a quick question, i have a prefab used for my quest system and when the user collects it, its then deletes it. whats the best way to do this with easy save, add a bool to delete when loaded or set up the prefab auto save to auto delete it when loaded if it was deleted and saved, if that is even a thing?
Thanks
Deleting Prefab on load
Re: Deleting Prefab on load
Hi there,
I've attached a sample script which you can attach to a GameObject to save whether it's been destroyed, and will destroy the object if so when loading the scene.
All the best,
Joel
I've attached a sample script which you can attach to a GameObject to save whether it's been destroyed, and will destroy the object if so when loading the scene.
All the best,
Joel
- Attachments
-
- SaveDestroyed.cs
- (548 Bytes) Downloaded 99 times
-
- Posts: 13
- Joined: Thu Sep 17, 2020 9:55 am
Re: Deleting Prefab on load
Works perfect thank you.