From 7ff44f0247fc910b52b9baba299dae448c3fde22 Mon Sep 17 00:00:00 2001 From: Koji Hasegawa Date: Fri, 29 Nov 2024 23:06:07 +0900 Subject: [PATCH] Add EditorBrowsable(Never) attribute onto fields do not want to use --- Runtime/Agents/TerminateAgent.cs | 5 +++++ Runtime/Settings/AutopilotSettings.cs | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Runtime/Agents/TerminateAgent.cs b/Runtime/Agents/TerminateAgent.cs index 3ab489c..be0699a 100644 --- a/Runtime/Agents/TerminateAgent.cs +++ b/Runtime/Agents/TerminateAgent.cs @@ -1,6 +1,7 @@ // Copyright (c) 2023-2024 DeNA Co., Ltd. // This software is released under the MIT License. +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Threading; using Cysharp.Threading.Tasks; @@ -42,6 +43,10 @@ public class TerminateAgent : AbstractAgent /// Exit Code when terminated by this Agent. /// When using it from within code, use the ExitCode property. /// + /// + /// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public. + /// + [EditorBrowsable(EditorBrowsableState.Never)] public ExitCodeByTerminateAgent exitCode = ExitCodeByTerminateAgent.Normally; /// diff --git a/Runtime/Settings/AutopilotSettings.cs b/Runtime/Settings/AutopilotSettings.cs index 5d59ecc..1d46d3a 100644 --- a/Runtime/Settings/AutopilotSettings.cs +++ b/Runtime/Settings/AutopilotSettings.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; @@ -80,6 +81,10 @@ public class AutopilotSettings : ScriptableObject /// Custom name of this setting used by Reporter. /// When using it from within code, use the Name property. /// + /// + /// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public. + /// + [EditorBrowsable(EditorBrowsableState.Never)] public new string name; /// @@ -121,6 +126,10 @@ public class AutopilotSettings : ScriptableObject /// Autopilot exit code options when lifespan expired. /// When using it from within code, use the ExitCode property. /// + /// + /// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public. + /// + [EditorBrowsable(EditorBrowsableState.Never)] public ExitCodeWhenLifespanExpired exitCode = ExitCodeWhenLifespanExpired.Normally; /// @@ -168,6 +177,10 @@ public ExitCode ExitCode /// This item can be overridden by the command line argument "-OUTPUT_ROOT_DIRECTORY_PATH". /// When using it from within code, use the OutputRootPath property. /// + /// + /// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public. + /// + [EditorBrowsable(EditorBrowsableState.Never)] public string outputRootPath = "Logs"; /// @@ -185,6 +198,10 @@ public ExitCode ExitCode /// This item can be overridden by the command line argument "-SCREENSHOTS_DIRECTORY_PATH". /// When using it from within code, use the ScreenshotsPath property. /// + /// + /// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public. + /// + [EditorBrowsable(EditorBrowsableState.Never)] public string screenshotsPath = "Screenshots"; ///