Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Reflection;
- public class InspectorMethodAttribute : PropertyAttribute
- {
- #region Public Variables
- public string methodName;
- public string buttonName;
- public bool useValue;
- public BindingFlags flags;
- #endregion Public Variables
- #region Constructors
- public InspectorMethodAttribute(string methodName, string buttonName, bool useValue, BindingFlags flags = BindingFlags.Public | BindingFlags.Instance)
- {
- this.methodName = methodName;
- this.buttonName = buttonName;
- this.useValue = useValue;
- this.flags = flags;
- }
- public InspectorMethodAttribute(string methodName, bool useParameterBelow, BindingFlags flags)
- : this(methodName, methodName, useParameterBelow, flags)
- {
- }
- public InspectorMethodAttribute(string methodName, bool useParameterBelow)
- : this(methodName, methodName, useParameterBelow)
- {
- }
- public InspectorMethodAttribute(string methodName, string buttonName, BindingFlags flags)
- : this(methodName, buttonName, false, flags)
- {
- }
- public InspectorMethodAttribute(string methodName, string buttonName)
- : this(methodName, buttonName, false)
- {
- }
- public InspectorMethodAttribute(string methodName, BindingFlags flags)
- : this(methodName, methodName, false, flags)
- {
- }
- public InspectorMethodAttribute(string methodName)
- : this(methodName, methodName, false)
- {
- }
- #endregion Constructors
- }//End of class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement