Way to preserve non-Unity.Object references?
Posted: Fri Aug 05, 2022 6:39 pm
Hi, so Class A holds a reference to an instance of Class B.
We have multiple instances of Class A that all reference the same instance of Class B.
However, when we save and load, each instance of Class A now references a unique instance of Class B (loading seems to create a new instance of Class B for each reference, resulting in many instances of Class B instead of just the single instance that existed when the game was saved).
Is there a way/best practice around this?
We have multiple instances of Class A that all reference the same instance of Class B.
However, when we save and load, each instance of Class A now references a unique instance of Class B (loading seems to create a new instance of Class B for each reference, resulting in many instances of Class B instead of just the single instance that existed when the game was saved).
Is there a way/best practice around this?