using System; using UnityEngine; namespace RebootKit.Engine.Foundation { [Serializable] public struct ConstsProperty { [SerializeField] T m_InlineValue; [SerializeField] ConstantsAsset m_Asset; [SerializeField] bool m_UseInlineValue; public ConstsProperty(T value) { m_InlineValue = value; m_Asset = null; m_UseInlineValue = true; } public ConstsProperty(ConstantsAsset asset) { m_InlineValue = default; m_Asset = asset; m_UseInlineValue = false; } public T Value { get { if (m_UseInlineValue) { return m_InlineValue; } if (m_Asset != null) { return m_Asset.Value; } return default; } } } }