diff options
author | chai <215380520@qq.com> | 2023-10-18 10:16:32 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-10-18 10:16:32 +0800 |
commit | 4ccd4bc6d126e0e0f51a50aa10c85b9bf48b1210 (patch) | |
tree | 9ac931da935b59a8d7c57ff0b6d90b88a0e5a479 /ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs |
+ init
Diffstat (limited to 'ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs')
-rw-r--r-- | ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs b/ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs new file mode 100644 index 0000000..e457e06 --- /dev/null +++ b/ActiveRagdoll/Assets/ThirdParty/SerializableCallback/Runtime/Attributes/TargetConstraintAttribute.cs @@ -0,0 +1,12 @@ +using UnityEngine; +using System; + +/// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary> +public class TargetConstraintAttribute : PropertyAttribute { + public Type targetType; + + /// <summary> Add to fields of your class extending SerializableCallbackBase<T,..> to limit which types can be assigned to it. </summary> + public TargetConstraintAttribute(Type targetType) { + this.targetType = targetType; + } +} |