Quantum 3 3.0.5

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Quantum.Editor.QuantumCustomDependency Class Reference

A wrapper around Unity's custom dependencies. Allows refresh to be deferred (if circumstances permit) and works around issues with custom dependencies in MPPM. More...

Public Member Functions

 QuantumCustomDependency (string name, Func< Hash128?> getter)
 
void Refresh (bool forceImmediate=false)
 Refreshes the dependency. Under normal circumstances, this will enqueue the operation until the next EditorApplication.delayCall. The hash will be calculated immediately if any of these is true: More...
 

Public Attributes

readonly string Name
 Name of the dependency. More...
 

Static Public Attributes

static bool IsGlobalImmediateRefreshEnabled = false
 Global force immediate switch. Set to true to force all the refreshes to be synchronous. More...
 

Detailed Description

A wrapper around Unity's custom dependencies. Allows refresh to be deferred (if circumstances permit) and works around issues with custom dependencies in MPPM.

Constructor & Destructor Documentation

◆ QuantumCustomDependency()

Quantum.Editor.QuantumCustomDependency.QuantumCustomDependency ( string  name,
Func< Hash128?>  getter 
)
inline
Parameters
nameName of the dependency
getterHash value getter. If returns null, the dependency will not be updated.

Member Function Documentation

◆ Refresh()

void Quantum.Editor.QuantumCustomDependency.Refresh ( bool  forceImmediate = false)
inline

Refreshes the dependency. Under normal circumstances, this will enqueue the operation until the next EditorApplication.delayCall. The hash will be calculated immediately if any of these is true:

Note that if AssetDatabase.IsAssetImportWorkerProcess returns true, the immediate refresh will result with an error.

Parameters
forceImmediate

Member Data Documentation

◆ Name

readonly string Quantum.Editor.QuantumCustomDependency.Name

Name of the dependency.

◆ IsGlobalImmediateRefreshEnabled

bool Quantum.Editor.QuantumCustomDependency.IsGlobalImmediateRefreshEnabled = false
static

Global force immediate switch. Set to true to force all the refreshes to be synchronous.