Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.ScriptableObjectDisposable 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.
 
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 operator!= (ScriptableObjectDisposable lhs, Disposable.Null rhs)
 
static bool operator== (ScriptableObjectDisposable lhs, Disposable.Null _)
 

Protected Member Functions

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, T duplicateValue, InitializationContext initializingContext)
 
virtual bool UpdateAllDelegates ()
 Function to initialize event handlers.
 
virtual void Saving (UnityEngine.SceneManagement.Scene scene, string path)
 
bool HasChanged (object newValue, object oldValue, bool forceChangeDuringInitializing=true)
 Are the two objects equals?
 
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

◆ AddToInstanceManager()

virtual bool DepictionEngine.ScriptableObjectDisposable.AddToInstanceManager ( )
protectedvirtual

Add the object to the DepictionEngine.InstanceManager if possible.

Returns
True if the instance was added successfully.

Reimplemented in DepictionEngine.PropertyScriptableObject.

◆ Equals()

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

◆ GetInitializeContext()

InitializationContext DepictionEngine.ScriptableObjectDisposable.GetInitializeContext ( )

◆ HasChanged()

bool DepictionEngine.ScriptableObjectDisposable.HasChanged ( object  newValue,
object  oldValue,
bool  forceChangeDuringInitializing = true 
)
protected

Are the two objects equals?

Parameters
newValue
oldValue
forceChangeDuringInitializingWhen true, the function will always return true if the object is not initialized.
Returns
True of the objects are the same.

List's will compare their items not the collection reference.

◆ Initialize() [1/2]

bool DepictionEngine.ScriptableObjectDisposable.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.ScriptableObjectDisposable.Initialize ( InitializationContext  initializingContext)
protectedvirtual

The main initialization function.

Parameters
initializingContext
Returns
False if the initialization failed.

Reimplemented in DepictionEngine.JsonScriptableObject, DepictionEngine.PropertyScriptableObject, DepictionEngine.QuadMesh, and DepictionEngine.PersistentScriptableObject.

◆ Initialized()

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

Acts as a reliable constructor and will always by called unlike Awake which is sometimes skipped during Undo / Redo operations.

Parameters
initializingContext

Implements DepictionEngine.IDisposable.

Reimplemented in DepictionEngine.JsonScriptableObject.

◆ InitializeUID()

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

Initializes the object's unique identifiers.

Parameters
initializingContext

Reimplemented in DepictionEngine.PropertyScriptableObject.

◆ Initializing()

virtual void DepictionEngine.ScriptableObjectDisposable.Initializing ( )
protectedvirtual

The first step of the initialization process.

Reimplemented in DepictionEngine.JsonScriptableObject, and DepictionEngine.PropertyScriptableObject.

◆ IsDestroying()

bool DepictionEngine.ScriptableObjectDisposable.IsDestroying ( )
protected

Is the object destroying?

Returns
True if the object as already been destroyed.

◆ IsDisposed()

bool DepictionEngine.ScriptableObjectDisposable.IsDisposed ( )

Has the object been disposed?

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

Implements DepictionEngine.IDisposable.

◆ IsDisposing()

bool DepictionEngine.ScriptableObjectDisposable.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.ScriptableObjectDisposable.IsValidInitialization ( InitializationContext  initializingContext)
protectedvirtual

Provides the ability to interrupt the initialization.

Parameters
initializingContext
Returns
False to interrupt the initialization.

◆ OnDestroy()

void DepictionEngine.ScriptableObjectDisposable.OnDestroy ( )

This is where you destroy any remaining dependencies.

Implements DepictionEngine.IScriptableBehaviour.

◆ OnDispose()

virtual bool DepictionEngine.ScriptableObjectDisposable.OnDispose ( DisposeContext  disposeContext)
virtual

This is where you dispose any remaining dependencies.

Parameters
disposeContextThe context under which the object is being destroyed.
Returns
False if the object was already disposed otherwise True.

Implements DepictionEngine.IDisposable.

Reimplemented in DepictionEngine.MultithreadSafeScriptableObject, DepictionEngine.DatasourceOperationBase, DepictionEngine.Tween, DepictionEngine.LoadScope, DepictionEngine.PropertyScriptableObject, DepictionEngine.Mesh, DepictionEngine.Texture, and DepictionEngine.PersistentScriptableObject.

◆ OnDisposeInternal()

void DepictionEngine.ScriptableObjectDisposable.OnDisposeInternal ( DisposeContext  disposeContext)

◆ OnDisposing()

bool DepictionEngine.ScriptableObjectDisposable.OnDisposing ( )

◆ Originator()

void DepictionEngine.ScriptableObjectDisposable.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.

◆ Recycle()

virtual void DepictionEngine.ScriptableObjectDisposable.Recycle ( )
virtual

◆ UpdateAllDelegates()

virtual bool DepictionEngine.ScriptableObjectDisposable.UpdateAllDelegates ( )
protectedvirtual

Function to initialize event handlers.

Returns

◆ UpdateDisposingContext()

bool DepictionEngine.ScriptableObjectDisposable.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.ScriptableObjectDisposable.disposingContext
get

The DepictionEngine.DisposeContext under which the object was destroyed.

Implements DepictionEngine.IDisposable.

◆ initialized

bool DepictionEngine.ScriptableObjectDisposable.initialized
get

Has the object been initialized.

Implements DepictionEngine.IDisposable.

◆ InitializedEvent

Action<IDisposable> DepictionEngine.ScriptableObjectDisposable.InitializedEvent
getset

Dispatched after the object as been initialized.

Implements DepictionEngine.IDisposable.

◆ isFallbackValues

bool DepictionEngine.ScriptableObjectDisposable.isFallbackValues
get

Was this component created by a DepictionEngine.FallbackValues.

Implements DepictionEngine.IScriptableBehaviour.

◆ originator

IScriptableBehaviour DepictionEngine.ScriptableObjectDisposable.originator
get

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

Implements DepictionEngine.IScriptableBehaviour.

◆ poolComplete

bool DepictionEngine.ScriptableObjectDisposable.poolComplete
getset

Is the object done disposing.

Implements DepictionEngine.IDisposable.


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