GeneratedVariableStorageExtensions
public static class GeneratedVariableStorageExtensionsInherits from System.Object
#Methods
#GetEnumValueOrDefault<T>(IGeneratedVariableStorage, string)
attempts to get an enum value of the requested type from the requested variable
public static T? GetEnumValueOrDefault<T>(this IGeneratedVariableStorage storage, string variableName)
where T : System.EnumType Parameters
TThe enum type
Parameters
- the storage
variableNamestringthe variable name
Returns T
#GetValueOrDefault<T>(IGeneratedVariableStorage, string)
Gets a value for the variable
variableName from
storage, or else returns the default value of
T.public static T? GetValueOrDefault<T>(this IGeneratedVariableStorage storage, string variableName)
where T : IConvertibleType Parameters
TThe type of the parameter to get a value for.
Parameters
- The generated variable storage class to get the value from.
variableNamestringThe name of the variable to get a value for.
Returns T: The value of variableName, or the
default value of
T.
#SetValue<T>(IGeneratedVariableStorage, string, T)
Sets a value into the generated variable storage
public static void SetValue<T>(this IGeneratedVariableStorage storage, string v, T value)
where T : IConvertibleType Parameters
TThe new values type
Parameters
- the storage itself
vstringthe name of the variablevalueTthe value itself
Exceptions
System.ArgumentOutOfRangeExceptionIf the value is an unexpected type
Generated from Yarn Spinner for Unity 3.3.