Add require Actor attribute

This commit is contained in:
Chandler Cox
2023-11-16 21:25:40 -06:00
parent c4c3a3a5e8
commit 44e55cc8b6
2 changed files with 80 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
using System;
namespace FlaxEngine;
/// <summary>
/// This attribute is used to check for if a script requires an Actor type.
/// </summary>
[Serializable]
[AttributeUsage(AttributeTargets.Class)]
public class RequireActorAttribute : Attribute
{
/// <summary>
/// The required type.
/// </summary>
public Type RequiredType;
/// <summary>
/// Initializes a new instance of the <see cref="RequireActorAttribute"/> class.
/// </summary>
/// <param name="type">The required type.</param>
public RequireActorAttribute(Type type)
{
RequiredType = type;
}
}