Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

GeneratedVariableStorageExtensions

public static class GeneratedVariableStorageExtensions

Inherits 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.Enum

Type Parameters

  • T
    The enum type

Parameters

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 : IConvertible

Type Parameters

  • T
    The type of the parameter to get a value for.

Parameters

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 : IConvertible

Type Parameters

  • T
    The new values type

Parameters

Exceptions

  • System.ArgumentOutOfRangeException
    If the value is an unexpected type

Generated from Yarn Spinner for Unity 3.3.