Photon Quantum 3.0.0

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

Utility methods for working with QuantumGlobalScriptableObject. More...

Static Public Member Functions

static bool EnsureAssetExists< T > ()
 If the global asset does not exist, creates it based on the type's QuantumGlobalScriptableObjectAttribute. More...
 
static string GetGlobalAssetPath< T > ()
 Locates the asset that is going to be used as a global asset for the given type, that is an asset marked with the GlobalAssetLabel label. If there are multiple such assets, exception is thrown. If there are no such assets, empty string is returned. More...
 
static void SetDirty (this QuantumGlobalScriptableObject obj)
 Calls EditorUtility.SetDirty(UnityEngine.Object) on the object. More...
 
static bool TryGetGlobalAssetPath< T > (out string path)
 A wrapper around GetGlobalAssetPath<T> that returns a value indicating if it was able to find the asset. More...
 
static bool TryImportGlobal< T > ()
 Attempts to import the global asset for the given type. More...
 

Static Public Attributes

const string GlobalAssetLabel = "QuantumDefaultGlobal"
 The label that is assigned to global assets. More...
 

Detailed Description

Utility methods for working with QuantumGlobalScriptableObject.

Member Function Documentation

◆ SetDirty()

static void Quantum.Editor.QuantumGlobalScriptableObjectUtils.SetDirty ( this QuantumGlobalScriptableObject  obj)
inlinestatic

Calls EditorUtility.SetDirty(UnityEngine.Object) on the object.

Parameters
obj

◆ GetGlobalAssetPath< T >()

static string Quantum.Editor.QuantumGlobalScriptableObjectUtils.GetGlobalAssetPath< T > ( )
inlinestatic

Locates the asset that is going to be used as a global asset for the given type, that is an asset marked with the GlobalAssetLabel label. If there are multiple such assets, exception is thrown. If there are no such assets, empty string is returned.

Type Constraints
T :QuantumGlobalScriptableObject<T> 

◆ TryGetGlobalAssetPath< T >()

static bool Quantum.Editor.QuantumGlobalScriptableObjectUtils.TryGetGlobalAssetPath< T > ( out string  path)
inlinestatic

A wrapper around GetGlobalAssetPath<T> that returns a value indicating if it was able to find the asset.

Parameters
path
Template Parameters
T
Returns
true if the asset was found
Type Constraints
T :QuantumGlobalScriptableObject<T> 

◆ EnsureAssetExists< T >()

static bool Quantum.Editor.QuantumGlobalScriptableObjectUtils.EnsureAssetExists< T > ( )
inlinestatic

If the global asset does not exist, creates it based on the type's QuantumGlobalScriptableObjectAttribute.

Template Parameters
T
Returns
true If the asset already existed.
Type Constraints
T :QuantumGlobalScriptableObject<T> 

◆ TryImportGlobal< T >()

static bool Quantum.Editor.QuantumGlobalScriptableObjectUtils.TryImportGlobal< T > ( )
inlinestatic

Attempts to import the global asset for the given type.

Template Parameters
T
Returns
true if the asset was found and reimported
Type Constraints
T :QuantumGlobalScriptableObject<T> 

Member Data Documentation

◆ GlobalAssetLabel

const string Quantum.Editor.QuantumGlobalScriptableObjectUtils.GlobalAssetLabel = "QuantumDefaultGlobal"
static

The label that is assigned to global assets.