21 lines
		
	
	
		
			614 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			614 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using UnityEngine;
 | |
| /// <summary>
 | |
| /// Attribute that require implementation of the provided interface.
 | |
| /// </summary>
 | |
| 
 | |
| namespace NEG.Utils
 | |
| {
 | |
|     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)
 | |
|         {
 | |
|             requiredType = type;
 | |
|         }
 | |
|     }
 | |
| } |