コード例 #1
0
 public ButtonAttribute(string methodName, string label = null,
                        ButtonActivityType type         = ButtonActivityType.Everything)
 {
     MethodName = methodName;
     Label      = label;
     Type       = type;
 }
コード例 #2
0
        private bool IsClickable(ButtonActivityType activityType)
        {
            switch (activityType)
            {
            case ButtonActivityType.Everything:
                return(true);

            case ButtonActivityType.Nothing:
                return(false);

            case ButtonActivityType.OnEditMode:
                return(!Application.isPlaying);

            case ButtonActivityType.OnPlayMode:
                return(Application.isPlaying);
            }

            return(true);
        }
コード例 #3
0
 public InstanceButtonAttribute(Type instanceType, string methodName, string label = null, ButtonActivityType type = ButtonActivityType.Everything) : base(methodName, label, type)
 {
     InstanceType = instanceType;
 }
コード例 #4
0
 public BroadcastButtonAttribute(string methodName, string label = null, ButtonActivityType type = ButtonActivityType.Everything)
     : base(methodName, label, type)
 {
 }
コード例 #5
0
 public EditorButtonAttribute(string methodName, string extraLabel = null, ButtonActivityType activityType = ButtonActivityType.Everything)
 {
     MethodName   = methodName;
     ExtraLabel   = extraLabel;
     ActivityType = activityType;
 }