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

DiagnosticDescriptor.DiagnosticDescriptor4

Describes a diagnostic message with a unique code and template.
public sealed class DiagnosticDescriptor4 : DiagnosticDescriptor

Inherits from Yarn.Compiler.DiagnosticDescriptor

This class ensures that diagnostic codes and their descriptions are always paired correctly, preventing typos and mismatches. All diagnostics should be created using the predefined descriptors in this class.

#Methods

#Create(string, Antlr4.Runtime.IToken, string, string, string, string)

public Diagnostic Create(string sourceFile, Antlr4.Runtime.IToken token, string message1, string message2, string message3, string message4);

Parameters

  • sourceFilestring
  • tokenAntlr4.Runtime.IToken
  • message1string
  • message2string
  • message3string
  • message4string

Returns Diagnostic

#Create(string, Antlr4.Runtime.ParserRuleContext, string, string, string, string)

public Diagnostic Create(string sourceFile, Antlr4.Runtime.ParserRuleContext context, string message1, string message2, string message3, string message4);

Parameters

  • sourceFilestring
  • contextAntlr4.Runtime.ParserRuleContext
  • message1string
  • message2string
  • message3string
  • message4string

Returns Diagnostic

#Create(string, Range, string, string, string, string)

Creates a new Diagnostic using this descriptor.
public Diagnostic Create(string sourceFile, Range range, string message1, string message2, string message3, string message4);

Parameters

  • sourceFilestring
    The name of the file in which this error occurred.
  • The range of the file associated with this error.
  • args(unknown)
    The arguments to use when composing the diagnostic's message.
  • message1string
  • message2string
  • message3string
  • message4string

Returns Diagnostic: The diagnostic.

#Create(string, string, string, string, string)

Creates a new Diagnostic using this descriptor.
public Diagnostic Create(string sourceFile, string message1, string message2, string message3, string message4);

Parameters

  • sourceFilestring
    The name of the file in which this error occurred.
  • args(unknown)
    The arguments to use when composing the diagnostic's message.
  • message1string
  • message2string
  • message3string
  • message4string

Returns Diagnostic: The diagnostic.

Generated from Yarn Spinner for Unity 3.3.