We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efa59cb commit fb455ebCopy full SHA for fb455eb
1 file changed
Assets/Editor Toolbox/Scripts/Attributes/RegularAttributes/TypeConstraintAttribute.cs
@@ -28,6 +28,7 @@ protected TypeConstraintAttribute(Type assemblyType)
28
/// </summary>
29
public virtual List<Type> GetFilteredTypes()
30
{
31
+#if UNITY_EDITOR
32
var types = TypeCache.GetTypesDerivedFrom(AssemblyType).ToList();
33
for (var i = types.Count - 1; i >= 0; i--)
34
@@ -41,6 +42,9 @@ public virtual List<Type> GetFilteredTypes()
41
42
}
43
44
return types;
45
+#else
46
+ return new List<Type>();
47
+#endif
48
49
50
/// <summary>
0 commit comments