Click or drag to resize

PoolManagerBaseTManagerSettings, TPool, TPoolSettings, TSource, TInstanceDontDestroyOnLoad Property

[This is preliminary documentation and is subject to change.]

Gets or sets a value indicating whether the pool manager (and the pools beneath it) will remain in the scene when a new scene is loaded.

Namespace:  Umbrace.Unity.PurePool
Assembly:  Umbrace.Unity.PurePool (in Umbrace.Unity.PurePool.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public bool DontDestroyOnLoad { get; set; }

Property Value

Type: Boolean
Remarks

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.

See Also