Add RequireInterfaceAttibute
This commit is contained in:
parent
f30c5cd5cf
commit
6c6ef9ad0d
17
RequireInterfaceAttribute.cs
Normal file
17
RequireInterfaceAttribute.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
/// <summary>
|
||||||
|
/// Attribute that require implementation of the provided interface.
|
||||||
|
/// </summary>
|
||||||
|
public class RequireInterfaceAttribute : PropertyAttribute
|
||||||
|
{
|
||||||
|
// Interface type.
|
||||||
|
public System.Type requiredType { get; private set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Requiring implementation of the <see cref="T:RequireInterfaceAttribute"/> interface.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="type">Interface type.</param>
|
||||||
|
public RequireInterfaceAttribute(System.Type type)
|
||||||
|
{
|
||||||
|
this.requiredType = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user