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

Range

Represents a range of text in a multi-line string.
public class Range

Inherits from System.Object

#Constructors

#Range(int, int, int, int)

Initializes a new instance of the Range class, given start and end information.
public Range(int startLine, int startCharacter, int endLine, int endCharacter)

Parameters

  • startLineint
    The zero-indexed line number of the start of the range.
  • startCharacterint
    The zero-indexed character number of the start of the range.
  • endLineint
    The zero-indexed line number of the end of the range.
  • endCharacterint
    The zero-indexed character number of the end of the range.
A range is comparable to a selection in an editor. Therefore, the end position is exclusive.

#Range(Position, Position)

Initializes a new instance of the Range class, given start and end information.
public Range(Position startPosition, Position endPosition)

Parameters

#Fields

#InvalidRange

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

Type Range

#Properties

#End

Gets or sets the end position of this range.
public Position End { get; private set; }

Type Position

#IsValid

Gets a value indicating whether this range is valid.
public bool IsValid { get; }

Type Boolean

A range is valid when its start and end positions are both valid, and the start position is not after the end position.

#Start

Gets or sets the start position of this range.
public Position Start { get; private set; }

Type Position

#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_Equality(Range, Range)

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

Parameters

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

Returns Boolean: true if the ranges are identical.

#op_Inequality(Range, Range)

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

Parameters

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

Returns Boolean: true if the ranges are not identical.

Generated from Yarn Spinner for Unity 3.3.