Renamed all attributes and drawers to have postfix of either Attribute or AttributeDrawer

This commit is contained in:
Anders Ejlersen 2021-12-04 12:47:44 +01:00
parent 81bac32538
commit dc15bfec81
161 changed files with 265 additions and 265 deletions

View file

@ -0,0 +1,14 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class DisableAttribute : AccessModifierPropertyAttribute
{
[Preserve]
public DisableAttribute()
{
}
}
}

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class ShowField : AccessModifierPropertyAttribute
public sealed class DisableFieldAttribute : AccessModifierPropertyAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public ShowField(string fieldName)
public DisableFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public ShowField(string fieldName, object fieldValue)
public DisableFieldAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -0,0 +1,14 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class DisableFieldInPlayModeAttribute : AccessModifierPropertyAttribute
{
[Preserve]
public DisableFieldInPlayModeAttribute()
{
}
}
}

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class DisableMethod : AccessModifierMethodAttribute
public sealed class DisableMethodAttribute : AccessModifierMethodAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public DisableMethod(string fieldName)
public DisableMethodAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public DisableMethod(string fieldName, object fieldValue)
public DisableMethodAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class EnableFieldInPlayMode : AccessModifierPropertyAttribute
public sealed class DisableMethodInPlayModeAttribute : AccessModifierMethodAttribute
{
[Preserve]
public EnableFieldInPlayMode()
public DisableMethodInPlayModeAttribute()
{
}
}

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class DisableField : AccessModifierPropertyAttribute
public sealed class EnableFieldAttribute : AccessModifierPropertyAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public DisableField(string fieldName)
public EnableFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public DisableField(string fieldName, object fieldValue)
public EnableFieldAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class EnableMethodInPlayMode : AccessModifierMethodAttribute
public sealed class EnableFieldInPlayModeAttribute : AccessModifierPropertyAttribute
{
[Preserve]
public EnableMethodInPlayMode()
public EnableFieldInPlayModeAttribute()
{
}
}

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class EnableMethod : AccessModifierMethodAttribute
public sealed class EnableMethodAttribute : AccessModifierMethodAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public EnableMethod(string fieldName)
public EnableMethodAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public EnableMethod(string fieldName, object fieldValue)
public EnableMethodAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class DisableMethodInPlayMode : AccessModifierMethodAttribute
public sealed class EnableMethodInPlayModeAttribute : AccessModifierMethodAttribute
{
[Preserve]
public DisableMethodInPlayMode()
public EnableMethodInPlayModeAttribute()
{
}
}

View file

@ -4,23 +4,23 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class HideField : AccessModifierPropertyAttribute
public sealed class HideFieldAttribute : AccessModifierPropertyAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
[Preserve]
public HideField()
public HideFieldAttribute()
{
}
public HideField(string fieldName)
public HideFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public HideField(string fieldName, object fieldValue)
public HideFieldAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = true, Inherited = true)]
public sealed class HideInNormalInspector : AccessModifierPropertyAttribute
public sealed class HideInNormalInspectorAttribute : AccessModifierPropertyAttribute
{
[Preserve]
public HideInNormalInspector()
public HideInNormalInspectorAttribute()
{
}
}

View file

@ -4,23 +4,23 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class HideMethod : AccessModifierMethodAttribute
public sealed class HideMethodAttribute : AccessModifierMethodAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
[Preserve]
public HideMethod()
public HideMethodAttribute()
{
}
public HideMethod(string fieldName)
public HideMethodAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public HideMethod(string fieldName, object fieldValue)
public HideMethodAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class EnableField : AccessModifierPropertyAttribute
public sealed class ShowFieldAttribute : AccessModifierPropertyAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public EnableField(string fieldName)
public ShowFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public EnableField(string fieldName, object fieldValue)
public ShowFieldAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -3,18 +3,18 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class ShowMethod : AccessModifierMethodAttribute
public sealed class ShowMethodAttribute : AccessModifierMethodAttribute
{
public readonly string fieldName;
public readonly bool useFieldValue;
public readonly object fieldValue;
public ShowMethod(string fieldName)
public ShowMethodAttribute(string fieldName)
{
this.fieldName = fieldName;
}
public ShowMethod(string fieldName, object fieldValue)
public ShowMethodAttribute(string fieldName, object fieldValue)
{
this.fieldName = fieldName;
this.fieldValue = fieldValue;

View file

@ -5,16 +5,16 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class HorizontalLine : PropertyAttribute
public sealed class HorizontalLineAttribute : PropertyAttribute
{
public readonly string title;
[Preserve]
public HorizontalLine()
public HorizontalLineAttribute()
{
}
public HorizontalLine(string title)
public HorizontalLineAttribute(string title)
{
this.title = title;
}

View file

@ -4,16 +4,16 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class MethodHeader : DecoratorMethodAttribute
public sealed class MethodHeaderAttribute : DecoratorMethodAttribute
{
public readonly string title;
[Preserve]
public MethodHeader()
public MethodHeaderAttribute()
{
}
public MethodHeader(string title)
public MethodHeaderAttribute(string title)
{
this.title = title;
}

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class QuaternionToEuler : DrawerPropertyAttribute
public sealed class EnumFlagAttribute : DrawerPropertyAttribute
{
[Preserve]
public QuaternionToEuler()
public EnumFlagAttribute()
{
}
}

View file

@ -3,17 +3,17 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class FilePath : DrawerPropertyAttribute
public sealed class FilePathAttribute : DrawerPropertyAttribute
{
public readonly bool useAbsolute;
public readonly string extension = "*";
public FilePath(bool useAbsolute = false)
public FilePathAttribute(bool useAbsolute = false)
{
this.useAbsolute = useAbsolute;
}
public FilePath(string extension, bool useAbsolute = false)
public FilePathAttribute(string extension, bool useAbsolute = false)
{
this.extension = extension;
this.useAbsolute = useAbsolute;

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class FolderPath : DrawerPropertyAttribute
public sealed class FolderPathAttribute : DrawerPropertyAttribute
{
public readonly bool useAbsolute;
public FolderPath(bool useAbsolute = false)
public FolderPathAttribute(bool useAbsolute = false)
{
this.useAbsolute = useAbsolute;
}

View file

@ -3,11 +3,11 @@ using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class IntToAnimatorParameter : DrawerPropertyAttribute
public sealed class IntToAnimatorParameterAttribute : DrawerPropertyAttribute
{
public readonly string animatorFieldName;
public IntToAnimatorParameter(string animatorFieldName)
public IntToAnimatorParameterAttribute(string animatorFieldName)
{
this.animatorFieldName = animatorFieldName;
}

View file

@ -5,7 +5,7 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class IntToEnum : DrawerPropertyAttribute
public sealed class IntToEnumAttribute : DrawerPropertyAttribute
{
private Type type;
@ -13,14 +13,14 @@ namespace Module.Inspector
private bool hasTriedFetchReplaceType;
[Preserve]
public IntToEnum(Type type)
public IntToEnumAttribute(Type type)
{
this.type = type;
hasTriedFetchReplaceType = true;
}
[Preserve]
public IntToEnum(Type type, string strTypeReplaceWith)
public IntToEnumAttribute(Type type, string strTypeReplaceWith)
{
this.type = type;
this.strTypeReplaceWith = strTypeReplaceWith;

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class EnumFlag : DrawerPropertyAttribute
public sealed class IntToLayerAttribute : DrawerPropertyAttribute
{
[Preserve]
public EnumFlag()
public IntToLayerAttribute()
{
}
}

View file

@ -4,16 +4,16 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class MethodButton: DrawerMethodAttribute
public sealed class MethodButtonAttribute: DrawerMethodAttribute
{
public readonly string name;
[Preserve]
public MethodButton()
public MethodButtonAttribute()
{
}
public MethodButton(string name)
public MethodButtonAttribute(string name)
{
this.name = name;
}

View file

@ -3,7 +3,7 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Naming : DrawerPropertyAttribute
public sealed class NamingAttribute : DrawerPropertyAttribute
{
public enum EPatternType : byte
{
@ -35,7 +35,7 @@ namespace Module.Inspector
public readonly EPatternType type;
public Naming(EPatternType type)
public NamingAttribute(EPatternType type)
{
this.type = type;
}

View file

@ -0,0 +1,14 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class PercentageAttribute : DrawerPropertyAttribute
{
[Preserve]
public PercentageAttribute()
{
}
}
}

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class StringToField : DrawerPropertyAttribute
public sealed class PopupFromConstAttribute : DrawerPropertyAttribute
{
public readonly Type type;
public StringToField(Type type)
public PopupFromConstAttribute(Type type)
{
this.type = type;
}

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class DisableFieldInPlayMode : AccessModifierPropertyAttribute
public sealed class QuaternionToEulerAttribute : DrawerPropertyAttribute
{
[Preserve]
public DisableFieldInPlayMode()
public QuaternionToEulerAttribute()
{
}
}

View file

@ -1,14 +0,0 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class SceneDropdown : DrawerPropertyAttribute
{
[Preserve]
public SceneDropdown()
{
}
}
}

View file

@ -0,0 +1,14 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class SceneDropdownAttribute : DrawerPropertyAttribute
{
[Preserve]
public SceneDropdownAttribute()
{
}
}
}

View file

@ -1,14 +0,0 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Slider : DrawerPropertyAttribute
{
[Preserve]
public Slider()
{
}
}
}

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class IntToLayer : DrawerPropertyAttribute
public sealed class SliderAttribute : DrawerPropertyAttribute
{
[Preserve]
public IntToLayer()
public SliderAttribute()
{
}
}

View file

@ -3,11 +3,11 @@ using System;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class StringToAnimatorParameter : DrawerPropertyAttribute
public sealed class StringToAnimatorParameterAttribute : DrawerPropertyAttribute
{
public readonly string animatorFieldName;
public StringToAnimatorParameter(string animatorFieldName)
public StringToAnimatorParameterAttribute(string animatorFieldName)
{
this.animatorFieldName = animatorFieldName;
}

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class PopupFromConst : DrawerPropertyAttribute
public sealed class StringToFieldAttribute : DrawerPropertyAttribute
{
public readonly Type type;
public PopupFromConst(Type type)
public StringToFieldAttribute(Type type)
{
this.type = type;
}

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class StringToType : DrawerPropertyAttribute
public sealed class StringToTypeAttribute : DrawerPropertyAttribute
{
public readonly Type assignableFrom;
public StringToType(Type assignableFrom)
public StringToTypeAttribute(Type assignableFrom)
{
this.assignableFrom = assignableFrom;
}

View file

@ -1,14 +0,0 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Tag : DrawerPropertyAttribute
{
[Preserve]
public Tag()
{
}
}
}

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Disable : AccessModifierPropertyAttribute
public sealed class TagAttribute : DrawerPropertyAttribute
{
[Preserve]
public Disable()
public TagAttribute()
{
}
}

View file

@ -1,14 +0,0 @@
using System;
using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class UrlGoTo : DrawerPropertyAttribute
{
[Preserve]
public UrlGoTo()
{
}
}
}

View file

@ -4,10 +4,10 @@ using UnityEngine.Scripting;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class Percentage : DrawerPropertyAttribute
public sealed class UrlGoToAttribute : DrawerPropertyAttribute
{
[Preserve]
public Percentage()
public UrlGoToAttribute()
{
}
}

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class ArrayIndex : ValueModifierPropertyAttribute
public sealed class ArrayIndexAttribute : ValueModifierPropertyAttribute
{
public readonly string fieldName;
public ArrayIndex(string fieldName)
public ArrayIndexAttribute(string fieldName)
{
this.fieldName = fieldName;
}

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class LargerThanField : ValueModifierPropertyAttribute
public sealed class LargerThanFieldAttribute : ValueModifierPropertyAttribute
{
public readonly string fieldName;
public LargerThanField(string fieldName)
public LargerThanFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}

View file

@ -4,18 +4,18 @@ using UnityEngine;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class MaxValue : ValueModifierPropertyAttribute
public sealed class MaxValueAttribute : ValueModifierPropertyAttribute
{
public readonly int intValue;
public readonly float floatValue;
public MaxValue(int value)
public MaxValueAttribute(int value)
{
intValue = value;
floatValue = value;
}
public MaxValue(float value)
public MaxValueAttribute(float value)
{
intValue = Mathf.RoundToInt(value);
floatValue = value;

View file

@ -4,18 +4,18 @@ using UnityEngine;
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class MinValue : ValueModifierPropertyAttribute
public sealed class MinValueAttribute : ValueModifierPropertyAttribute
{
public readonly int intValue;
public readonly float floatValue;
public MinValue(int value)
public MinValueAttribute(int value)
{
intValue = value;
floatValue = value;
}
public MinValue(float value)
public MinValueAttribute(float value)
{
intValue = Mathf.RoundToInt(value);
floatValue = value;

View file

@ -3,11 +3,11 @@
namespace Module.Inspector
{
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = true)]
public sealed class SmallerThanField : ValueModifierPropertyAttribute
public sealed class SmallerThanFieldAttribute : ValueModifierPropertyAttribute
{
public readonly string fieldName;
public SmallerThanField(string fieldName)
public SmallerThanFieldAttribute(string fieldName)
{
this.fieldName = fieldName;
}