I am serializing bools for saving the state of game objects.
Everything is working correctly but if the game object is not active the json file isn’t created for that particular game object.
I have the same script on about 20 game objects. when they are destroyed I set them to false with the SetActive function. The only files that write to disk are those that are still active. the ones set to false do not send the file.
When the objects are destroyed I set the bool to false then send it when the escape key is hit.
Do I need to send that bool to another script to track it because the game object becomes inactive as soon as it is destroyed?