Class ToggleAndNumberFieldAttribute
- Namespace
- JLChnToZ.VRC.Foundation
Attach this attribute to an int field to display it as a toggle and a number field in the inspector. If the toggle is off, the number field will be disabled and display a custom text.
public class ToggleAndNumberFieldAttribute : PropertyAttribute
- Inheritance
-
ToggleAndNumberFieldAttribute
- Extension Methods
Remarks
This is for integer fields that can be toggled on or off, where the value is non-negative when toggled on and -1 when toggled off.
Constructors
ToggleAndNumberFieldAttribute()
public ToggleAndNumberFieldAttribute()
Properties
DisabledText
The text to display in the number field when the toggle is off. If not set, it defaults to an empty string.
public string DisabledText { get; set; }