SuppressInvalidAttributeError is used on members to suppress the inspector error message you get when applying an attribute to a value that it's not supposed to work on.

This can be very useful for applying attributes to generic parameter values, when it only applies to some of the possible types that the value might become.

namespace Sirenix.OdinInspector
[AttributeUsageAttribute((AttributeTargets)32767, AllowMultiple = False, Inherited = True)]
public sealed class SuppressInvalidAttributeErrorAttribute : Attribute


Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector


The following example shows a case where the attribute might be useful.

public class NamedValue<T>
    public string Name;

    // The Range attribute will be applied if T is compatible with it, but if T is not compatible, an error will not be shown.
	[SuppressInvalidAttributeError, Range(0, 10)]
	public T Value;