24 lines
621 B
C#
24 lines
621 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
/// <summary>
|
|
/// Attribute that require implementation of the provided interface.
|
|
/// </summary>
|
|
|
|
namespace NEG.Utils
|
|
{
|
|
public class RequireInterfaceAttribute : PropertyAttribute
|
|
{
|
|
/// <summary>
|
|
/// Requiring implementation of the <see cref="T:RequireInterfaceAttribute" /> interface.
|
|
/// </summary>
|
|
/// <param name="type">Interface type.</param>
|
|
public RequireInterfaceAttribute(Type type)
|
|
{
|
|
requiredType = type;
|
|
}
|
|
|
|
// Interface type.
|
|
public Type requiredType { get; private set; }
|
|
}
|
|
} |