AceLand Unity Packages
  • Home
  • Getting Started
    • Installation
    • Project Settings
    • Architecture Graph
    • Development Level
  • Tutorial
    • Create Your Package
    • Create Project Settings
  • Packages
    • Library
      • Change Log
      • Editor Tools
      • Mono
        • Follow Object
        • Singleton
      • Attributes
        • Conditional Show
        • Inspector Button
        • ReadOnly Field
      • Build Leveling
      • CVS
      • DataTools
      • Disposable Object
      • Extensions
      • Json
      • Kalman Filter
      • Optional
      • Project Setting
      • Serialization Surrogate
      • Utils
    • Event Driven
      • Change Log
      • Event Bus
      • Signal
    • Input
      • Change Log
    • Memento Service
      • Change Log
    • Node Framework
      • Change Log
      • Mono Node
    • Node For Mono (dev)
    • Player Loop Hack
      • Change Log
    • Pool
      • Change Log
    • Security (dev)
    • States
      • Change Log
    • Task Utils
      • Change Log
    • WebRequest
      • Change Log
Powered by GitBook
On this page
  1. Packages
  2. Library
  3. Attributes

Conditional Show

Customizing the inspector in most easiest way

ConditionalShow is more powerful than other ConditionalHide attribute. It is more flexible that supporting more conditions.

[SerializeField]
private bool isShow;
[SerializeField, ConditionalShow("isShow")]
private float showValue;
// single boolean
[ConditionalShow("isShow")]

// false as condition
[ConditionalShow("isHide", false)]

// multiple boolean
[ConditionalShow("isShow", "isReallyShow")]

// enum value
[ConditionalShow("myEnum", MyEnum.Show, ...)]

// invert enum value
[ConditionalShow("myEnum", true, MyEnum.NotShow, ...)]

// boolean and enum value
[ConditionalShow("isShow", "myEnum", MyEnum.Show, ...)]

// boolean and invert enum value
[ConditionalShow("isShow", "myEnum", true, MyEnum.NotShow, ...)]

Last updated 2 months ago