PoolManagerBaseTManagerSettings, TPool, TPoolSettings, TSource, TInstanceDontDestroyOnLoad Property |
[This is preliminary documentation and is subject to change.]
Namespace: Umbrace.Unity.PurePool
Upon setting the DontDestroyOnLoad property to , the manager will be prevented from being destroyed when loading a new scene. In addition, all pools that are parented beneath the manager in the hierarchy will also be prevented from being destroyed.
It's important to make the distinction that it's actually the root transform of the GameObject to which the manager is attached that will persist between scene changes. The root transform is the top-most transform in the hierarchy. Therefore, every object that is parented beneath the root transform in the hierarchy will persist between scene changes, and not only the manager.
If the PoolManagerBaseTManagerSettings, TPool, TPoolSettings, TSource, TInstance component is removed from its game object, the game object will still persist through scene changes.
Pools that are attached to the manager using AttachPool(TPool), but that are not parented beneath the manager in the hierarchy, are not affected by this property.