Search Results for

    Show / Hide Table of Contents

    Class ActivatableSection

    Section that can be activated or deactivated thanks to a checkbox inside the header.

    Inheritance
    Object
    SimpleControl
    PropertyControl
    Section
    ActivatableSection
    Implements
    IControlContainer
    INonAnimatableProperty
    IAdditionalProperties
    Namespace: VRLabs.SimpleShaderInspectors.Controls.Sections
    Syntax
    public class ActivatableSection : Section, IControlContainer, INonAnimatableProperty, IAdditionalProperties
    Remarks

    This more advanced version of Section has in addition one checkbox to enable/disable the content of the section. When disabled the content is still visible, but cannot be edited.

    This section requires at least one material property to drive the enabled/disabled state, and it will use this material property name as alias.

    Examples

    Example usage:

    // Add an activatable section
    this.AddActivatableSection("_EnableProperty"); 
    
    // Add an activatable section, the property will have the values of 2 and 4 when off and on respectively
    this.AddActivatableSection("_EnableProperty", 2, 4); 
    
    // Add an activatable section with the show state being driven by a property
    this.AddActivatableSection("_EnableProperty", "_ShowProperty");
    
    // Add an activatable section, the properties will have set values when on and off, 2/4 for the enable one and 0/1 of the show one.
    this.AddActivatableSection("_EnableProperty", "_ShowProperty", 2, 4, 0, 1); 

    Constructors

    Name Description
    ActivatableSection(String, Single, Single)

    Default constructor of ActivatableSection.

    ActivatableSection(String, String, Single, Single, Single, Single)

    Constructor of ActivatableSection used when creating a property driven ActivatableSection.

    Fields

    Name Description
    disableValue

    Float value that the Show bool gets converted if false.

    enableValue

    Float value that the Show bool gets converted if true.

    Properties

    Name Description
    AdditionalProperties

    Extra properties array. Implementation needed by IAdditionalProperties.

    Enabled

    Boolean indicating if the section is enabled or not.

    HasActivatePropertyUpdated

    Has the property been updated this cycle?

    Methods

    Name Description
    ControlGUI(MaterialEditor)

    Draws the control represented by this object.

    Extension Methods

    Chainables.AddPropertyControl(IControlContainer, String)
    Chainables.Alias<T>(T, String)
    Chainables.SetVisibility<T>(T, Boolean)
    Chainables.SetEnabled<T>(T, Boolean)
    Chainables.AddColorControl(IControlContainer, String, Boolean)
    Chainables.AddControlContainer(IControlContainer)
    Chainables.AddEnumControl<TEnum>(IControlContainer, String)
    Chainables.AddGradientTextureControl(IControlContainer, String, String)
    Chainables.AddKeywordToggleControl(IControlContainer, String)
    Chainables.AddKeywordToggleListControl(IControlContainer, String)
    Chainables.AddLabelControl(IControlContainer, String)
    Chainables.AddLightmapEmissionControl(IControlContainer)
    Chainables.AddSpaceControl(IControlContainer, Int32)
    Chainables.AddTextureControl(IControlContainer, String, String, String)
    Chainables.AddTextureGeneratorControl(IControlContainer, String, String, String)
    Chainables.AddTextureGeneratorControl(IControlContainer, ComputeShader, String, String, String, String)
    Chainables.AddTilingAndOffsetControl(IControlContainer, String)
    Chainables.AddToggleControl(IControlContainer, String, Single, Single)
    Chainables.AddToggleListControl(IControlContainer, String, Single, Single)
    Chainables.AddVectorControl(IControlContainer, String, Boolean, Boolean, Boolean, Boolean)
    Chainables.AddVertexStreamsControl(IControlContainer, String)
    Chainables.AddActivatableSection(IControlContainer, String, String, Single, Single, Single, Single)
    Chainables.AddActivatableSection(IControlContainer, String, Single, Single)
    Chainables.AddOrderedSectionGroup(IControlContainer, String)
    Chainables.AddSection(IControlContainer, String, Single, Single)
    Chainables.AddSection(IControlContainer)
    Chainables.SetLabelStyle<T>(T, GUIStyle)
    Chainables.SetBackgroundStyle<T>(T, GUIStyle)
    Chainables.SetAreControlsInHeader<T>(T, Boolean)
    Chainables.SetIsPropertyAnimatable<T>(T, Boolean)
    Chainables.SetShowFoldoutArrow<T>(T, Boolean)
    Chainables.SetBackgroundColor<T>(T, Color)
    In This Article
    Back to top Copyright © VRLabs.
    Generated by DocFX