Version: 2022.1
언어: 한국어

ScriptCompilerOptions.RoslynAnalyzerRulesetPath

매뉴얼로 전환
public string RoslynAnalyzerRulesetPath ;

설명

Stores the path to the Roslyn ruleset file.

You can define your own rules on how to handle the various warnings and errors that Roslyn analyzers raise. You must put these rules inside a file with the .ruleset extension. Unity detects this .ruleset file, and stores its path inside RoslynAnalyzerRulesetPath.

In the root folder, you can store a ruleset file named "Default.ruleset". The rules defined in Default.ruleset apply to all predefined assemblies, as well as all assemblies that are built using .asmdef files.

To override the rules in Default.ruleset for a predefined assembly, create a .ruleset file in the root folder with the name [PredefinedAssemblyName].ruleset. For example, the rules in Assembly-CSharp.ruleset apply to Assembly-CSharp.dll.

Only these .ruleset files are permitted inside the root folder: - Default.ruleset - Assembly-CSharp.ruleset - Assembly-CSharp-firstpass.ruleset - Assembly-CSharp-Editor.ruleset - Assembly-CSharp-Editor-firstpass.ruleset

To override the rules in Default.ruleset for an assembly built using an .asmdef file, create a .ruleset file in the same folder as its .asmdef file. You can give it any name you like. The name of this ruleset file does not necessarily have to match the name of the assembly.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961