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

Position

Represents a position in a multi-line string.
public class Position

Inherits from System.Object

#Constructors

#Position()

Initialises a new instance of the Position class.
public Position()

#Position(int, int)

Initialises a new instance of the Position class with the specified line and character.
public Position(int line, int character)

Parameters

  • lineint
    The zero-indexed line number.
  • characterint
    The zero-index character number.

#Fields

#InvalidPosition

Represents the default value for a Position.
public static readonly Position InvalidPosition = new(-1, -1);

Type Position

#Properties

#Character

Gets or sets the zero-indexed character number of this position.
public int Character { get; private set; }

Type Int32

#IsValid

Gets a value indicating whether this position has a zero or positive line and character number.
public bool IsValid { get }

Type Boolean

#Line

Gets or sets the zero-indexed line of this position.
public int Line { get; private set; }

Type Int32

#Methods

#Equals(object)

public override bool Equals(object obj)

Parameters

  • objobject

Returns Boolean

#GetHashCode()

public override int GetHashCode()

Returns Int32

#ToString()

public override string ToString()

Returns String

#Operators

#op_Addition(Position, Position)

Adds two positions by component and returns the result.
(no declaration available)

Parameters

  • a(unknown)
    The first position.
  • b(unknown)
    The second position.

Returns Position: The resulting combined position.

#op_Equality(Position, Position)

Compares two Position objects and returns true if they represent the same position.
(no declaration available)

Parameters

  • a(unknown)
    The first position.
  • b(unknown)
    The second position.

Returns Boolean: true if the positions are identical.

#op_GreaterThanOrEqual(Position, Position)

Compares two positions and returns true if a is equal to or after b.
(no declaration available)

Parameters

  • a(unknown)
    The first position.
  • b(unknown)
    The second position.

Returns Boolean: true if a is after or equal to b; false otherwise.

#op_Inequality(Position, Position)

Compares two Position objects and returns true if they do not represent the same position.
(no declaration available)

Parameters

  • a(unknown)
    The first position.
  • b(unknown)
    The second position.

Returns Boolean: true if the positions are not identical.

#op_LessThanOrEqual(Position, Position)

Compares two positions and returns true if a is equal to or before b.
(no declaration available)

Parameters

  • a(unknown)
    The first position.
  • b(unknown)
    The second position.

Returns Boolean: true if a is before or equal to b; false otherwise.

Generated from Yarn Spinner for Unity 3.3.