Beamable SDK
|
This component is a Unity component hook to access a BeamContext object. Every BeamableBehaviour has one BeamContext. The gameobject that holds this component may also be used by Beamable to store other required components for the BeamContext. More...
Public Attributes | |
OptionalString | prefix = new OptionalString() |
OptionalBoolean | DontDestroyContext = new OptionalBoolean() |
By default, when this component is destroyed, if it is the primary owner of the BeamContext, then the context will be disposed. However, if the DontDestroyContext is true, then the context will not be disposed when the behaviour is destroyed. The BeamContext has gameObject internal dependencies, so in order to keep it alive, this gameObject must be marked as DontDestroyOnLoad. If you mark the DontDestroyContext property, then the gameobject will be moved to root level, and marked as DontDestroyOnLoad More... | |
BeamableBehaviourBootstrapType | BootstrapType = BeamableBehaviourBootstrapType.ON_START |
Properties | |
bool | HasContext [get] |
Returns true if there is an initialized BeamContext associated with this behaviour yet. | |
bool | IsOwner [get] |
Returns true if this behaviour is sitting on the gameObject that is housing the other required components for a BeamContext | |
BeamContext | Context [get] |
The BeamContext that is associated with this behaviour. | |
This component is a Unity component hook to access a BeamContext object. Every BeamableBehaviour has one BeamContext. The gameobject that holds this component may also be used by Beamable to store other required components for the BeamContext.
When this component is destroyed, if it is the primary responsible BeamableBehaviour for the BeamContext, then it may dispose the BeamContext as well.
OptionalBoolean Beamable.BeamableBehaviour.DontDestroyContext = new OptionalBoolean() |
By default, when this component is destroyed, if it is the primary owner of the BeamContext, then the context will be disposed. However, if the DontDestroyContext is true, then the context will not be disposed when the behaviour is destroyed. The BeamContext has gameObject internal dependencies, so in order to keep it alive, this gameObject must be marked as DontDestroyOnLoad. If you mark the DontDestroyContext property, then the gameobject will be moved to root level, and marked as DontDestroyOnLoad
The BeamContext.Default context will have DontDestroyContext set to true by default so that the context persists between scene loads.