Photon Fusion 2.0.3

Public Member Functions | Properties | List of all members
FusionGlobalScriptableObjectSourceAttribute Class Referenceabstract

Base class for all attributes that can be used to load FusionGlobalScriptableObject. 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 FusionGlobalScriptableObjectAttribute.DefaultPath: More...

Inherits Attribute.

Public Member Functions

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

 
abstract FusionGlobalScriptableObjectLoadResult 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 FusionGlobalScriptableObject 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 FusionGlobalScriptableObject. 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 FusionGlobalScriptableObjectAttribute.DefaultPath:

[assembly: Fusion.FusionGlobalScriptableObjectResource(typeof(Fusion.FusionGlobalScriptableObject), Order = 2000, AllowFallback = true)]

Member Function Documentation

◆ Load()

abstract FusionGlobalScriptableObjectLoadResult 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

Property Documentation

◆ AllowEditMode

bool AllowEditMode = false
getset

Can this loader be used in edit mode.

◆ AllowFallback

bool AllowFallback = false
getset

Does this loader allow fallback to the next loader?

◆ ObjectType

Type ObjectType
get

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

◆ Order

int Order
getset

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