Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


DiagnosticParameterAttribute

Used to mark an integer field in an class that inherits from ModuleAnalyzer as being a Diagnostic Parameter.
Read time 4 minutesLast updated 11 days ago

Definition

[AttributeUsage(AttributeTargets.Field)]public class DiagnosticParameterAttribute : Attribute

Remarks

Diagnostic Parameters are used to define threshold values against which to compare other values when an Analyzer is deciding whether or not something constitutes a reportable issue. Whilst Analyzers are free to use hard-coded constants as threshold values, Diagnostic Parameters allow you to change values in Settings > Project Auditor as a project's requirements evolve, or to set different values for different target platforms.
Diagnostic Parameters and their default values are automatically registered in the DiagnosticParams object held by ProjectAuditorSettings, where their values can be customized if required. When ProjectAuditor initializes prior to running analysis, the values in the DiagnosticParams held by AnalysisParams are automatically cached back in their corresponding fields which can be used during analysis.

Constructors

Properties

Property

Description

DefaultValueThe default value for this parameter.
MaxValueThe maximum value for this parameter.
MinValueThe minimum value for this parameter.
NameThe Diagnostic Parameter's name. This name should uniquely identify this parameter within a project.
TooltipText about this DiagnosticParameter to show as a tooltip in Project Settings.
UserFriendlyNameThe Diagnostic Parameter's user friendly name as will be seen in Project Settings.

Inheritance

Inherited Members