@@ -21,13 +21,21 @@ public sealed class DevConsoleCommandAttribute : Attribute
2121 /// <param name="name">Name used to call the command (e.g. "print").</param>
2222 /// <param name="aliases">Optional names that can be used to call the command, seperated by commas (e.g. "display,say").</param>
2323 /// <param name="helpText">Description of the command (e.g. "Display a message in the developer console").</param>
24+ /// <param name="onlyInDevBuild">Whether to only add the command if the project is a development build.</param>
2425 /// <param name="parameterHelpText">Descriptions of the parameters (e.g. "Message to display in the developer console").</param>
25- public DevConsoleCommandAttribute ( string name , string aliases , string helpText , params string [ ] parameterHelpText )
26+ public DevConsoleCommandAttribute ( string name , string aliases , string helpText , bool onlyInDevBuild , params string [ ] parameterHelpText )
2627 {
2728 Name = name ;
2829 Aliases = aliases . Split ( ',' ) ;
2930 HelpText = helpText ;
3031 ParameterHelpText = parameterHelpText ?? new string [ 0 ] ;
32+ OnlyInDevBuild = onlyInDevBuild ;
33+ }
34+
35+ /// <inheritdoc cref="DevConsoleCommandAttribute(string, string, string, bool, string[])" />
36+ public DevConsoleCommandAttribute ( string name , string aliases , string helpText , params string [ ] parameterHelpText )
37+ : this ( name , aliases , helpText , false , parameterHelpText )
38+ {
3139 }
3240
3341 #endregion
@@ -54,6 +62,8 @@ public DevConsoleCommandAttribute(string name, string aliases, string helpText,
5462 /// </summary>
5563 internal string [ ] ParameterHelpText { get ; }
5664
65+ internal bool OnlyInDevBuild { get ; }
66+
5767 #endregion
5868 }
5969}
0 commit comments