using System; using System.Runtime.InteropServices; using UnityEngine; namespace Invector { [AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = true)] public class vButtonAttribute : PropertyAttribute { public readonly string label; public readonly string function; public readonly int id; public readonly Type type; public readonly bool enabledJustInPlayMode; /// /// Create a button in Inspector /// /// button label /// function to call on press /// parent class type button /// button is enabled just in play mode public vButtonAttribute(string label, string function, Type type, bool enabledJustInPlayMode = true) { this.label = label; this.function = function; this.type = type; this.enabledJustInPlayMode = enabledJustInPlayMode; } } }