Photon Quantum 3.0.0

Public Member Functions | Properties | List of all members
Quantum.QuantumGlobalScriptableObjectSourceAttribute Class Referenceabstract

Base class for all attributes that can be used to load QuantumGlobalScriptableObject. Attributes need to be registered at the assembly level. For instance, this snippet is used to register a default loader, that attempts to load from Resources based on QuantumGlobalScriptableObjectAttribute.DefaultPath: More...

Inheritance diagram for Quantum.QuantumGlobalScriptableObjectSourceAttribute:
Quantum.QuantumGlobalScriptableObjectAddressAttribute Quantum.QuantumGlobalScriptableObjectResourceAttribute

Public Member Functions

 QuantumGlobalScriptableObjectSourceAttribute (Type objectType)
 
Parameters
objectTypeType or the base type of QuantumGlobalScriptableObject that this loader supports.

 
abstract QuantumGlobalScriptableObjectLoadResult Load (Type type)
 Attempt to load the object of the specified type. Return default if the object cannot be loaded. More...
 

Properties

bool AllowEditMode = false [get, set]
 Can this loader be used in edit mode. More...
 
bool AllowFallback = false [get, set]
 Does this loader allow fallback to the next loader? More...
 
Type ObjectType [get]
 Type or the base type of QuantumGlobalScriptableObject that this loader supports. More...
 
int Order [get, set]
 Order in which this loader will be executed. Lower values are executed first. More...
 

Detailed Description

Base class for all attributes that can be used to load QuantumGlobalScriptableObject. Attributes need to be registered at the assembly level. For instance, this snippet is used to register a default loader, that attempts to load from Resources based on QuantumGlobalScriptableObjectAttribute.DefaultPath:

[assembly: Quantum.QuantumGlobalScriptableObjectResource(typeof(Quantum.QuantumGlobalScriptableObject), Order = 2000, AllowFallback = true)]

See also
QuantumGlobalScriptableObjectAddressAttribute, QuantumGlobalScriptableObjectResourceAttribute

Member Function Documentation

◆ Load()

abstract QuantumGlobalScriptableObjectLoadResult Quantum.QuantumGlobalScriptableObjectSourceAttribute.Load ( Type  type)
pure virtual

Attempt to load the object of the specified type. Return default if the object cannot be loaded.

Parameters
typeThe requested type

Implemented in Quantum.QuantumGlobalScriptableObjectResourceAttribute, and Quantum.QuantumGlobalScriptableObjectAddressAttribute.

Property Documentation

◆ ObjectType

Type Quantum.QuantumGlobalScriptableObjectSourceAttribute.ObjectType
get

Type or the base type of QuantumGlobalScriptableObject that this loader supports.

◆ Order

int Quantum.QuantumGlobalScriptableObjectSourceAttribute.Order
getset

Order in which this loader will be executed. Lower values are executed first.

◆ AllowEditMode

bool Quantum.QuantumGlobalScriptableObjectSourceAttribute.AllowEditMode = false
getset

Can this loader be used in edit mode.

◆ AllowFallback

bool Quantum.QuantumGlobalScriptableObjectSourceAttribute.AllowFallback = false
getset

Does this loader allow fallback to the next loader?