PoolableObject.sendAwakeStartOnDestroyMessage Field

Audio Toolkit

Collapse image Expand Image Copy image CopyHover image
If enabled Awake(), Start(), and OnDestroy() messages are sent to the poolable object if the object is set active respectively inactive whenever Destroy(GameObject) or Instantiate(GameObject) is called.

This way it is simulated that the object really gets instantiated respectively destroyed.

Namespace: (Default Namespace)
Assembly: AudioToolkit (in AudioToolkit.dll) Version: 8.0.0.0 (8.0.0.0)

Syntax

C#
public bool sendAwakeStartOnDestroyMessage

Field Value

Type: Boolean

Remarks

The Start() function is called immedialtely after Awake() by Instantiate(GameObject) and not next frame. So do not set data after Instantiate(GameObject) that Start() relies on. In some cases you may not want the Awake(), Start(), and OnDestroy() messages to be sent for performance reasons because it may not be necessary to fully reinitialize a game object each time it is activated from the pool. You can still use the OnPoolableObjectActivated and OnPoolableObjectDeactivated messages to initialize specific data.

See Also