Skip to content

Instantly share code, notes, and snippets.

View emadkhezri's full-sized avatar
Learning...

Emad emadkhezri

Learning...
View GitHub Profile
@deebrol
deebrol / ShowWhenAttribute.cs
Last active February 25, 2024 23:53
Property Drawer for Unity used to show or hide the Field depending on certain conditions
// DONT PUT IN EDITOR FOLDER
using System;
using UnityEngine;
/// <summary>
/// Attribute used to show or hide the Field depending on certain conditions
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public class ShowWhenAttribute : PropertyAttribute {