Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.MonoBehaviourDisposable Class Reference

Public Member Functions

virtual void Recycle ()
 Resets the fields to their default value so the object can be reused again. It will be called by the DepictionEngine.PoolManager if the object is being recycled from the pool.
 
bool Initialize ()
 Needs to be called before the object can be used. Objects created through the DepictionEngine.InstanceManager should automatically Initialize the object.
 
virtual void Initialized (InitializationContext initializingContext)
 Acts as a reliable constructor and will always by called unlike Awake which is sometimes skipped during Undo / Redo operations.
 
AddComponent< T > (InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 
AddComponent< T > (bool initialize, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 
Component AddComponent (Type componentType, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 
Component AddComponent (Type componentType, bool initialize, InitializationContext initializingContext=InitializationContext.Programmatically, JSONObject json=null, List< PropertyModifier > propertyModifiers=null, bool isFallbackValues=false)
 
InitializationContext GetInitializeContext ()
 
bool IsDisposing ()
 Is the object disposing?.
 
bool IsDisposed ()
 Has the object been disposed?
 
void Originator (Action callback, IScriptableBehaviour originator)
 Provides the code executed in this callback information about the DepictionEngine.IScriptableBehaviour that triggered it by keeping a reference available under DepictionEngine.IScriptableBehaviour.originator.
 
bool OnDisposing ()
 
bool UpdateDisposingContext (bool forceUpdate=false)
 This is where you clear or dispose any remaining references. It will be called automatically by DepictionEngine.DisposeManager immediately after DepictionEngine.IDisposable.OnDisposing unless the object was Destroyed as a result of an Editor action.
 
void OnDisposeInternal (DisposeContext disposeContext)
 
virtual bool OnDispose (DisposeContext disposeContext)
 This is where you dispose any remaining dependencies.
 
void OnDestroy ()
 This is where you destroy any remaining dependencies.
 
virtual void OnBeforeSerialize ()
 
virtual void OnAfterDeserialize ()
 
virtual void OnValidate ()
 
bool Equals (Disposable.Null value)
 
override bool Equals (object value)
 
override int GetHashCode ()
 
- Public Member Functions inherited from DepictionEngine.IScriptableBehaviour
InitializationContext GetInitializeContext ()
 
void Originator (Action callback, IScriptableBehaviour originator)
 Provides the code executed in this callback information about the DepictionEngine.IScriptableBehaviour that triggered it by keeping a reference available under DepictionEngine.IScriptableBehaviour.originator.
 
int GetInstanceID ()
 
void OnDestroy ()
 This is where you destroy any remaining dependencies.
 
void Initialized (InitializationContext initializingContext)
 Acts as a reliable constructor and will always by called unlike Awake which is sometimes skipped during Undo / Redo operations.
 
void Recycle ()
 Resets the fields to their default value so the object can be reused again. It will be called by the DepictionEngine.PoolManager if the object is being recycled from the pool.
 
bool Initialize ()
 Needs to be called before the object can be used. Objects created through the DepictionEngine.InstanceManager should automatically Initialize the object.
 
bool IsDisposing ()
 Is the object disposing?.
 
bool IsDisposed ()
 Has the object been disposed?
 
bool OnDisposing ()
 
bool OnDispose (DisposeContext disposeContext)
 This is where you dispose any remaining dependencies.
 
void OnDisposeInternal (DisposeContext disposeContext)
 
bool UpdateDisposingContext (bool forceUpdate=false)
 This is where you clear or dispose any remaining references. It will be called automatically by DepictionEngine.DisposeManager immediately after DepictionEngine.IDisposable.OnDisposing unless the object was Destroyed as a result of an Editor action.
 
bool Equals (Disposable.Null value)
 

Static Public Member Functions

static bool InitValueInternal< T > (Action< T > callback, T defaultValue, Func< T > duplicateValue, InitializationContext initializingContext)
 
static bool InitValueInternal< T > (Action< T > callback, T defaultValue, InitializationContext initializingContext)
 
static bool operator!= (MonoBehaviourDisposable lhs, Disposable.Null rhs)
 
static bool operator== (MonoBehaviourDisposable lhs, Disposable.Null _)
 

Protected Member Functions

virtual void Awake ()
 
bool IsDuplicateInitializing ()
 
virtual void DestroyAfterFailedInitialization ()
 
virtual void Initializing ()
 The first step of the initialization process.
 
virtual void InitializeUID (InitializationContext initializingContext)
 Initializes the object's unique identifiers.
 
virtual bool AddToInstanceManager ()
 Add the object to the DepictionEngine.InstanceManager if possible.
 
virtual bool Initialize (InitializationContext initializingContext)
 The main initialization function.
 
virtual bool IsValidInitialization (InitializationContext initializingContext)
 Provides the ability to interrupt the initialization.
 
bool InitValue< T > (Action< T > callback, T defaultValue, InitializationContext initializingContext)
 
bool InitValue< T > (Action< T > callback, T defaultValue, Func< T > duplicateValue, InitializationContext initializingContext)
 
virtual bool IsFullyInitialized ()
 
virtual bool UpdateAllDelegates ()
 Function to initialize event handlers.
 
virtual void Saving (UnityEngine.SceneManagement.Scene scene, string path)
 
virtual void Saved (UnityEngine.SceneManagement.Scene scene)
 
virtual bool LateInitialize (InitializationContext initializingContext)
 Every other objects are initialized at this point.
 
virtual bool PostLateInitialize (InitializationContext initializingContext)
 Every other objects are initialized at this point.
 
bool IsFallbackValues ()
 
bool IsNotFallbackValues ()
 
bool IsDestroying ()
 Is the object destroying?
 
virtual bool UpdateHideFlags ()
 
virtual DisposeContext GetDisposingContext ()
 
virtual void OnEnable ()
 
virtual void OnDisable ()
 

Properties

bool wasFirstUpdated [get]
 
bool initialized [get]
 Has the object been initialized.
 
bool instanceAdded [get, set]
 
bool isFallbackValues [get]
 Was this component created by a DepictionEngine.FallbackValues.
 
IScriptableBehaviour originator [get]
 Which DepictionEngine.IScriptableBehaviour triggered the current code execution if any at all.
 
DisposeContext disposingContext [get]
 The DepictionEngine.DisposeContext under which the object was destroyed.
 
bool poolComplete [get, set]
 Is the object done disposing.
 
Action< IDisposableInitializedEvent [get, set]
 Dispatched after the object as been initialized.
 
Action< IDisposable, DisposeContextDisposedEvent [get, set]
 Dispatched during the DepictionEngine.MonoBehaviourDisposable.OnDispose, DepictionEngine.ScriptableObjectDisposable.OnDispose or DepictionEngine.Disposable.OnDispose.
 
SceneManager sceneManager [get]
 
InstanceManager instanceManager [get]
 
DatasourceManager datasourceManager [get]
 
TweenManager tweenManager [get]
 
InputManager inputManager [get]
 
CameraManager cameraManager [get]
 
PoolManager poolManager [get]
 
RenderingManager renderingManager [get]
 
- Properties inherited from DepictionEngine.IScriptableBehaviour
string name [get, set]
 
bool isFallbackValues [get]
 Was this component created by a DepictionEngine.FallbackValues.
 
IScriptableBehaviour originator [get]
 Which DepictionEngine.IScriptableBehaviour triggered the current code execution if any at all.
 
- Properties inherited from DepictionEngine.IDisposable
Action< IDisposableInitializedEvent [get, set]
 Dispatched after the object as been initialized.
 
Action< IDisposable, DisposeContextDisposedEvent [get, set]
 Dispatched during the DepictionEngine.MonoBehaviourDisposable.OnDispose, DepictionEngine.ScriptableObjectDisposable.OnDispose or DepictionEngine.Disposable.OnDispose.
 
bool initialized [get]
 Has the object been initialized.
 
bool poolComplete [get, set]
 Is the object done disposing.
 
DisposeContext disposingContext [get]
 The DepictionEngine.DisposeContext under which the object was destroyed.
 

Member Function Documentation

◆ AddComponent< T >() [1/2]

T DepictionEngine.MonoBehaviourDisposable.AddComponent< T > ( bool  initialize,
InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
Type Constraints
T :Component 

◆ AddComponent< T >() [2/2]

T DepictionEngine.MonoBehaviourDisposable.AddComponent< T > ( InitializationContext  initializingContext = InitializationContext::Programmatically,
JSONObject  json = null,
List< PropertyModifier propertyModifiers = null,
bool  isFallbackValues = false 
)
Type Constraints
T :Component 

◆ AddToInstanceManager()

virtual bool DepictionEngine.MonoBehaviourDisposable.AddToInstanceManager ( )
protectedvirtual

Add the object to the DepictionEngine.InstanceManager if possible.

Returns
True if the instance was added successfully.

Reimplemented in DepictionEngine.PropertyMonoBehaviour, and DepictionEngine.Object.

◆ Equals()

bool DepictionEngine.MonoBehaviourDisposable.Equals ( Disposable::Null  value)

◆ GetInitializeContext()

InitializationContext DepictionEngine.MonoBehaviourDisposable.GetInitializeContext ( )

◆ Initialize() [1/2]

bool DepictionEngine.MonoBehaviourDisposable.Initialize ( )

Needs to be called before the object can be used. Objects created through the DepictionEngine.InstanceManager should automatically Initialize the object.

Returns
False if the object is already initializing or initialized.

In some edge cases, in the editor, the Initialize may not be called immediately after the object is instantiated.

Implements DepictionEngine.IDisposable.

◆ Initialize() [2/2]

virtual bool DepictionEngine.MonoBehaviourDisposable.Initialize ( InitializationContext  initializingContext)
protectedvirtual

The main initialization function.

Parameters
initializingContext
Returns
False if the initialization failed.

Reimplemented in DepictionEngine.JsonMonoBehaviour, DepictionEngine.PropertyMonoBehaviour, DepictionEngine.Object, and DepictionEngine.PersistentMonoBehaviour.

◆ Initialized()

virtual void DepictionEngine.MonoBehaviourDisposable.Initialized ( InitializationContext  initializingContext)
virtual

◆ InitializeUID()

virtual void DepictionEngine.MonoBehaviourDisposable.InitializeUID ( InitializationContext  initializingContext)
protectedvirtual

Initializes the object's unique identifiers.

Parameters
initializingContext

Reimplemented in DepictionEngine.PropertyMonoBehaviour.

◆ Initializing()

virtual void DepictionEngine.MonoBehaviourDisposable.Initializing ( )
protectedvirtual

The first step of the initialization process.

Reimplemented in DepictionEngine.JsonMonoBehaviour, and DepictionEngine.PropertyMonoBehaviour.

◆ IsDestroying()

bool DepictionEngine.MonoBehaviourDisposable.IsDestroying ( )
protected

Is the object destroying?

Returns
True if the object as already been destroyed.

◆ IsDisposed()

bool DepictionEngine.MonoBehaviourDisposable.IsDisposed ( )

Has the object been disposed?

Returns
True if the object as already been disposed / destroyed.

Implements DepictionEngine.IDisposable.

◆ IsDisposing()

bool DepictionEngine.MonoBehaviourDisposable.IsDisposing ( )

Is the object disposing?.

Returns
True if the object is being disposed / destroyed or as already been disposed / destroyed.

Implements DepictionEngine.IDisposable.

◆ IsValidInitialization()

virtual bool DepictionEngine.MonoBehaviourDisposable.IsValidInitialization ( InitializationContext  initializingContext)
protectedvirtual

Provides the ability to interrupt the initialization.

Parameters
initializingContext
Returns
False to interrupt the initialization.

Reimplemented in DepictionEngine.Object.

◆ LateInitialize()

virtual bool DepictionEngine.MonoBehaviourDisposable.LateInitialize ( InitializationContext  initializingContext)
protectedvirtual

Every other objects are initialized at this point.

Returns

Reimplemented in DepictionEngine.Level, DepictionEngine.Object, DepictionEngine.FallbackValues, DepictionEngine.LoaderBase, and DepictionEngine.TransformBase.

◆ OnDestroy()

void DepictionEngine.MonoBehaviourDisposable.OnDestroy ( )

This is where you destroy any remaining dependencies.

Implements DepictionEngine.IScriptableBehaviour.

◆ OnDispose()

◆ OnDisposeInternal()

void DepictionEngine.MonoBehaviourDisposable.OnDisposeInternal ( DisposeContext  disposeContext)

◆ OnDisposing()

bool DepictionEngine.MonoBehaviourDisposable.OnDisposing ( )

◆ Originator()

void DepictionEngine.MonoBehaviourDisposable.Originator ( Action  callback,
IScriptableBehaviour  originator 
)

Provides the code executed in this callback information about the DepictionEngine.IScriptableBehaviour that triggered it by keeping a reference available under DepictionEngine.IScriptableBehaviour.originator.

Parameters
callback
originator

Implements DepictionEngine.IScriptableBehaviour.

◆ PostLateInitialize()

virtual bool DepictionEngine.MonoBehaviourDisposable.PostLateInitialize ( InitializationContext  initializingContext)
protectedvirtual

Every other objects are initialized at this point.

Returns

Reimplemented in DepictionEngine.ReferenceBase.

◆ Recycle()

◆ UpdateAllDelegates()

◆ UpdateDisposingContext()

bool DepictionEngine.MonoBehaviourDisposable.UpdateDisposingContext ( bool  forceUpdate = false)

This is where you clear or dispose any remaining references. It will be called automatically by DepictionEngine.DisposeManager immediately after DepictionEngine.IDisposable.OnDisposing unless the object was Destroyed as a result of an Editor action.

Parameters
forceUpdate
Returns
True if disposing, False if the object is already disposing or was disposed.

Implements DepictionEngine.IDisposable.

Property Documentation

◆ DisposedEvent

◆ disposingContext

DisposeContext DepictionEngine.MonoBehaviourDisposable.disposingContext
get

The DepictionEngine.DisposeContext under which the object was destroyed.

Implements DepictionEngine.IDisposable.

◆ initialized

bool DepictionEngine.MonoBehaviourDisposable.initialized
get

Has the object been initialized.

Implements DepictionEngine.IDisposable.

◆ InitializedEvent

Action<IDisposable> DepictionEngine.MonoBehaviourDisposable.InitializedEvent
getset

Dispatched after the object as been initialized.

Implements DepictionEngine.IDisposable.

◆ isFallbackValues

bool DepictionEngine.MonoBehaviourDisposable.isFallbackValues
get

Was this component created by a DepictionEngine.FallbackValues.

Implements DepictionEngine.IScriptableBehaviour.

◆ originator

IScriptableBehaviour DepictionEngine.MonoBehaviourDisposable.originator
get

Which DepictionEngine.IScriptableBehaviour triggered the current code execution if any at all.

Implements DepictionEngine.IScriptableBehaviour.

◆ poolComplete

bool DepictionEngine.MonoBehaviourDisposable.poolComplete
getset

Is the object done disposing.

Implements DepictionEngine.IDisposable.


The documentation for this class was generated from the following file: