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).

DeclarationBuilder

Provides methods for constructing Declaration objects.
public class DeclarationBuilder

Inherits from System.Object

To use this class, create an instance of it, and call the With-prefixed methods to set properties. When you're done, access the Declaration property to get the final, constructed Declaration.

#Properties

#Declaration

Gets the Declaration instance constructed by this DeclarationBuilder.
public Declaration Declaration { get; }

Type Declaration

#Methods

#WithDefaultValue(System.IConvertible)

Sets the DefaultValue of the Declaration.
public DeclarationBuilder WithDefaultValue(System.IConvertible defaultValue)

Parameters

  • defaultValueSystem.IConvertible
    The default value to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithDescription(string?)

Sets the Description of the Declaration.
public DeclarationBuilder WithDescription(string? description)

Parameters

  • descriptionstring
    The description to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithImplicit(bool)

Sets the IsImplicit of the Declaration.
public DeclarationBuilder WithImplicit(bool isImplicit)

Parameters

  • isImplicitbool
    The is-implicit value to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithName(string)

Sets the Name of the Declaration.
public DeclarationBuilder WithName(string name)

Parameters

  • namestring
    The name to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithRange(Yarn.Compiler.Range)

Sets the Range of the Declaration.
public DeclarationBuilder WithRange(Yarn.Compiler.Range range)

Parameters

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithSourceFileName(string)

Sets the SourceFileName of the Declaration.
public DeclarationBuilder WithSourceFileName(string sourceFileName)

Parameters

  • sourceFileNamestring
    The source file name to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithSourceNodeName(string)

Sets the SourceNodeName of the Declaration.
public DeclarationBuilder WithSourceNodeName(string sourceNodeName)

Parameters

  • sourceNodeNamestring
    The source node name to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

#WithType(IType)

Sets the Type of the Declaration.
public DeclarationBuilder WithType(IType type)

Parameters

  • The type to apply to the Declaration.

Returns DeclarationBuilder: The DeclarationBuilder instance that received this method call.

Generated from Yarn Spinner for Unity 3.3.