1 using System.Collections;
2 using System.Collections.Generic;
10 namespace AVR.Core.Attributes {
41 [AttributeUsage(AttributeTargets.Method, Inherited =
false, AllowMultiple =
true)]
53 public ConsoleCommand(
string command_string,
int min_args = 0,
string description =
"No description given.") {
54 this.command_string = command_string;
55 this.min_args = min_args;
56 this.desc = description;
66 this.command_string = command_string;
68 this.desc = description;
71 public string getCommandString() => command_string;
73 public int getMinArgs() => min_args;
75 public string getDescription() => desc;
88 [AttributeUsage(AttributeTargets.Class, Inherited =
true)]
127 [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple =
true)]
130 public enum compareType { EQUAL, BIGGER, SMALLER, BIGGEREQUAL, SMALLEREQUAL, UNEQUAL };
133 public string hideConditionPropertyName {
get;
private set; }
134 public bool invertCondition {
get;
private set; }
135 public float compareValue {
get;
private set; }
144 this.hideConditionPropertyName = hideConditionPropertyName;
145 this.invertCondition = invertCondition;
146 this.ctype = compareType.BIGGEREQUAL;
159 this.hideConditionPropertyName = hideConditionPropertyName;
160 this.invertCondition = invertCondition;
161 this.compareValue = compareValue;
174 this.hideConditionPropertyName = hideConditionPropertyName;
175 this.invertCondition = invertCondition;
176 this.compareValue = compareValue;
193 [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple =
true)]
205 this.group_id = group_id;
212 [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple =
true)]
DocumentationUrl(string url)
Defines the html file used for documentation for an AVR_Component. File relative to Packages/com...
FoldoutGroup(string group_id)
Assigns given attributes to a foldout group in the inspector.
ConsoleCommand(string command_string, string description)
Defines a method as a command vor the AVR_DevConsole. String which represents the command...
Makes a property of an object only show in the Network-behaviour window. Also works for private/prote...
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
Makes a field read-only in the inspector
Assigns given attributes to a foldout group in the inspector. The way these are drawn is determined b...
ShowInNetPrompt()
Makes a property of an object only show in the Network-behaviour window
This attribute can be used to easily make a function into a command runnable through the AVR_DevConso...
ConditionalHideInInspector(string hideConditionPropertyName, float compareValue, compareType ctype=compareType.EQUAL, bool invertCondition=false)
Hides a field in the Inspector if a given condition is true. The first parameter is always the name o...
ConditionalHideInInspector(string hideConditionPropertyName, bool invertCondition=false)
Hides a field in the Inspector if a given condition is true. The first parameter is always the name o...
Allows for simple hiding of properties in the UnityEditor depending on certain conditions. For instance, in the following example the "type" field will only be displayed in the inspector if the "tracking" field is set to true:
ConsoleCommand(string command_string, int min_args=0, string description="No description given.")
Defines a method as a command vor the AVR_DevConsole. String which represents the command...
string getDocumentationUrl()
ConditionalHideInInspector(string hideConditionPropertyName, int compareValue, compareType ctype=compareType.EQUAL, bool invertCondition=false)
Hides a field in the Inspector if a given condition is true. The first parameter is always the name o...