Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EditorBrowsable(Never) attribute onto fields do not want to use #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Runtime/Agents/TerminateAgent.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -42,6 +43,10 @@ public class TerminateAgent : AbstractAgent
/// Exit Code when terminated by this Agent.
/// When using it from within code, use the <code>ExitCode</code> property.
/// </summary>
/// <remarks>
/// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public ExitCodeByTerminateAgent exitCode = ExitCodeByTerminateAgent.Normally;

/// <summary>
Expand Down
17 changes: 17 additions & 0 deletions Runtime/Settings/AutopilotSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -80,6 +81,10 @@ public class AutopilotSettings : ScriptableObject
/// Custom name of this setting used by Reporter.
/// When using it from within code, use the <code>Name</code> property.
/// </summary>
/// <remarks>
/// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public new string name;

/// <summary>
Expand Down Expand Up @@ -121,6 +126,10 @@ public class AutopilotSettings : ScriptableObject
/// Autopilot exit code options when lifespan expired.
/// When using it from within code, use the <code>ExitCode</code> property.
/// </summary>
/// <remarks>
/// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public ExitCodeWhenLifespanExpired exitCode = ExitCodeWhenLifespanExpired.Normally;

/// <summary>
Expand Down Expand Up @@ -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 <code>OutputRootPath</code> property.
/// </summary>
/// <remarks>
/// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public string outputRootPath = "Logs";

/// <summary>
Expand All @@ -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 <code>ScreenshotsPath</code> property.
/// </summary>
/// <remarks>
/// I want to deny access (e.g., internal accessor), but it is inconvenient for testing, so still public.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
public string screenshotsPath = "Screenshots";

/// <summary>
Expand Down