Search Results for

    Show / Hide Table of Contents

    Class EnumControl<TEnum>

    Represents a control with options based on an enum

    Inheritance
    Object
    SimpleControl
    PropertyControl
    EnumControl<TEnum>
    Namespace: VRLabs.SimpleShaderInspectors.Controls
    Syntax
    public class EnumControl<TEnum> : PropertyControl where TEnum : Enum
    Type Parameters
    TEnum

    Type of enum used by the control

    Remarks

    With this control you can make selectors that are based on an enum, without the need to have an array of strings for options, since the enum name will be used instead.

    Examples

    Example usage:

    //...
    public enum ExampleEnum
    {
        Option1,
        Option2,
        Option3
    }
    //...
    // Inside the controls declarations
    this.AddEnumControl<ExampleEnum>("_ExampleProperty");

    The value of the material property will be the index of the enum.

    Constructors

    Name Description
    EnumControl(String)

    Default constructor of EnumControl<TEnum>

    Properties

    Name Description
    SelectedOption

    Option currently selected.

    Methods

    Name Description
    ControlGUI(MaterialEditor)

    Draws the control represented by this object.

    Extension Methods

    Chainables.Alias<T>(T, String)
    Chainables.SetVisibility<T>(T, Boolean)
    Chainables.SetEnabled<T>(T, Boolean)
    In This Article
    Back to top Copyright © VRLabs.
    Generated by DocFX