Photon Quantum 3.0.0

Public Member Functions | Properties | List of all members
Quantum.QuantumGlobalScriptableObjectResourceAttribute Class Reference

If applied at the assembly level, allows QuantumGlobalScriptableObject<T> to be loaded with Resources. There is a default registration for this attribute, which attempts to load the asset from Resources using path from QuantumGlobalScriptableObjectAttribute. More...

Inheritance diagram for Quantum.QuantumGlobalScriptableObjectResourceAttribute:
Quantum.QuantumGlobalScriptableObjectSourceAttribute

Public Member Functions

 QuantumGlobalScriptableObjectResourceAttribute (Type objectType, string resourcePath="")
 
override QuantumGlobalScriptableObjectLoadResult Load (Type type)
 Loads the asset from Resources synchronously. More...
 
- Public Member Functions inherited from Quantum.QuantumGlobalScriptableObjectSourceAttribute
 QuantumGlobalScriptableObjectSourceAttribute (Type objectType)
 
Parameters
objectTypeType or the base type of QuantumGlobalScriptableObject that this loader supports.

 

Properties

bool InstantiateIfLoadedInEditor = true [get, set]
 If loaded in the editor, should the result be instantiated instead of returning the asset itself? The default is true. More...
 
string ResourcePath [get]
 Path in Resources. More...
 
- Properties inherited from Quantum.QuantumGlobalScriptableObjectSourceAttribute
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

If applied at the assembly level, allows QuantumGlobalScriptableObject<T> to be loaded with Resources. There is a default registration for this attribute, which attempts to load the asset from Resources using path from QuantumGlobalScriptableObjectAttribute.

Constructor & Destructor Documentation

◆ QuantumGlobalScriptableObjectResourceAttribute()

Quantum.QuantumGlobalScriptableObjectResourceAttribute.QuantumGlobalScriptableObjectResourceAttribute ( Type  objectType,
string  resourcePath = "" 
)
inline
Parameters
objectTypeThe type this attribute will attempt to load.
resourcePathResources path or null/empty if path from QuantumGlobalScriptableObjectAttribute is to be used.

Member Function Documentation

◆ Load()

override QuantumGlobalScriptableObjectLoadResult Quantum.QuantumGlobalScriptableObjectResourceAttribute.Load ( Type  type)
inlinevirtual

Loads the asset from Resources synchronously.

Implements Quantum.QuantumGlobalScriptableObjectSourceAttribute.

Property Documentation

◆ ResourcePath

string Quantum.QuantumGlobalScriptableObjectResourceAttribute.ResourcePath
get

Path in Resources.

◆ InstantiateIfLoadedInEditor

bool Quantum.QuantumGlobalScriptableObjectResourceAttribute.InstantiateIfLoadedInEditor = true
getset

If loaded in the editor, should the result be instantiated instead of returning the asset itself? The default is true.