From 6c6ef9ad0dc74585c78692d4cd7d6961ab8c584a Mon Sep 17 00:00:00 2001 From: Hubert Mattusch Date: Tue, 13 Sep 2022 13:08:31 +0200 Subject: [PATCH] Add RequireInterfaceAttibute --- RequireInterfaceAttribute.cs | 17 +++++++++++++++++ tmp.txt | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 RequireInterfaceAttribute.cs delete mode 100644 tmp.txt diff --git a/RequireInterfaceAttribute.cs b/RequireInterfaceAttribute.cs new file mode 100644 index 0000000..ba3c599 --- /dev/null +++ b/RequireInterfaceAttribute.cs @@ -0,0 +1,17 @@ +using UnityEngine; +/// +/// Attribute that require implementation of the provided interface. +/// +public class RequireInterfaceAttribute : PropertyAttribute +{ + // Interface type. + public System.Type requiredType { get; private set; } + /// + /// Requiring implementation of the interface. + /// + /// Interface type. + public RequireInterfaceAttribute(System.Type type) + { + this.requiredType = type; + } +} \ No newline at end of file diff --git a/tmp.txt b/tmp.txt deleted file mode 100644 index 8b13789..0000000 --- a/tmp.txt +++ /dev/null @@ -1 +0,0 @@ -