DiagnosticDescriptor
Describes a diagnostic message with a unique code and template.
public abstract class DiagnosticDescriptorInherits from System.Object
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.
#Nested Types
- DiagnosticDescriptor0 classDescribes a diagnostic message with a unique code and template.
- DiagnosticDescriptor1 classDescribes a diagnostic message with a unique code and template.
- DiagnosticDescriptor2 classDescribes a diagnostic message with a unique code and template.
- DiagnosticDescriptor3 classDescribes a diagnostic message with a unique code and template.
- DiagnosticDescriptor4 classDescribes a diagnostic message with a unique code and template.
#Properties
#Code
Gets the unique error code for this diagnostic (e.g., "YS0001").
public string Code { get; }Type String
#DefaultSeverity
Gets the default severity for this diagnostic.
public Diagnostic.DiagnosticSeverity DefaultSeverity { get; }Type DiagnosticSeverity
#Description
Gets a brief description of what this diagnostic means.
public string Description { get; }Type String
#MessageTemplate
Gets the message template for this diagnostic.
public string MessageTemplate { get; }Type String
The template may contain placeholders like {0}, {1}, etc. for
string formatting.
#MinimumSeverity
Gets the minimum severity for this diagnostic. Diagnostics produced
from this descriptor may not have a severity less than this value.
public Diagnostic.DiagnosticSeverity MinimumSeverity { get; }Type DiagnosticSeverity
#Methods
#FormatMessage(object[])
Formats the message template with the provided arguments.
public string FormatMessage(params object[] args)Parameters
argsobject[]Arguments to format the message template with.
Returns String: The formatted message.
#GetDescriptor(string)
Gets a diagnostic descriptor by its code.
public static DiagnosticDescriptor? GetDescriptor(string code)Parameters
codestringThe diagnostic code to look up.
Returns DiagnosticDescriptor: The descriptor, or null if not found.
Generated from Yarn Spinner for Unity 3.3.