Destructible Saver Ignoring & Remembering Destruction at Same Time
Posted: Fri Mar 20, 2020 8:16 am
Hey,
I'm testing at implementing destructible saving with an enemy and it seemed to be despawning between scenes regardless of whether I killed it or not. I opened up the DestructibleSaver to take a look at what was happening. I added some Debug.Print lines to the check in RecordDestruction() to see whether the object wasn't getting ignored on destruction when the scene changes, as well as OnBeforeSceneChange().
Both cases in RecordDestruction() were called for some reason, which meant the object first remembered its destruction and then called a second time and ignored it. The print in OnBeforeSceneChange() wasn't called at all.
Do you know what could have caused this? This object was the only one in the scene with a DestructibleSaver on it.
Thanks.
I'm testing at implementing destructible saving with an enemy and it seemed to be despawning between scenes regardless of whether I killed it or not. I opened up the DestructibleSaver to take a look at what was happening. I added some Debug.Print lines to the check in RecordDestruction() to see whether the object wasn't getting ignored on destruction when the scene changes, as well as OnBeforeSceneChange().
Both cases in RecordDestruction() were called for some reason, which meant the object first remembered its destruction and then called a second time and ignored it. The print in OnBeforeSceneChange() wasn't called at all.
Do you know what could have caused this? This object was the only one in the scene with a DestructibleSaver on it.
Thanks.