Deleting Prefab on load

Discussion and help for Easy Save 3
Post Reply
seaniboy2009
Posts: 13
Joined: Thu Sep 17, 2020 9:55 am

Deleting Prefab on load

Post by seaniboy2009 »

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
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Deleting Prefab on load

Post by Joel »

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
Attachments
SaveDestroyed.cs
(548 Bytes) Downloaded 98 times
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
seaniboy2009
Posts: 13
Joined: Thu Sep 17, 2020 9:55 am

Re: Deleting Prefab on load

Post by seaniboy2009 »

Works perfect thank you.
Post Reply