5 namespace Essentials.EssentialsSettings.UnityConfigurationModifications
8 public class SuppressionOfWarningCS0649 : Adjustment
13 public override void Apply()
15 File.WriteAllText(
"Assets/csc.rsp",
"#\"This file disables the warning 'CS0649: Field 'var' is never assigned to, and will always have its default value null.'\"\n-nowarn:0649");
16 AssetDatabase.Refresh();
18 Debug.Log(
"Warning CS0649 disabled.");
24 public override void Revert()
26 File.Delete(
"Assets/csc.rsp.meta");
27 File.Delete(
"Assets/csc.rsp");
28 AssetDatabase.Refresh();
30 Debug.Log(
"Warning CS0649 enabled.");
33 public override string title {
get =>
"Disable warning CS0649"; }
34 public override string revertButtonText {
get =>
"Revert"; }
35 public override string infoURL {
get =>
"https://answers.unity.com/questions/60461/warning-cs0649-field-is-never-assigned-to-and-will.html"; }
36 public override string applyButtonText {
get =>
"Apply"; }
38 public override string applyAdjustmentShortExplanation {
get =>
"Disable the warning CS069 creating a file named csc.rsp in the project folder."; }
39 public override string revertAdjustmentShortExplanation {
get =>
"Enable the warning CS069 by removing a file named csc.rsp in the project folder."; }
41 public override bool showInSettingsWindow =>
false;