using System;
using UnityEngine;
namespace Funique
{
///
/// Disable inspect field interaction with condition
/// ------------------------------------------------
/// 關閉物件欄位互動 (判斷式)
///
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
public class DisableIf : PropertyAttribute
{
///
/// Target serialized object name for condition
/// This must point to a bool field
/// ------------------------------------------------
/// 目標 判斷式欄位名稱
/// 必須指向布林值欄位
///
public string Target;
///
/// What state of the boolean will causing disable
/// ------------------------------------------------
/// 什麼樣的布林值狀態會導致關閉互動
///
public bool DisabledState;
public DisableIf(bool state)
{
Target = string.Empty;
DisabledState = state;
}
public DisableIf(string targetName, bool state)
{
Target = targetName;
DisabledState = state;
}
}
}