Skip to content

Commit fb455eb

Browse files
committed
Hotfix non-stripping Editor-based code
1 parent efa59cb commit fb455eb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Assets/Editor Toolbox/Scripts/Attributes/RegularAttributes/TypeConstraintAttribute.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ protected TypeConstraintAttribute(Type assemblyType)
2828
/// </summary>
2929
public virtual List<Type> GetFilteredTypes()
3030
{
31+
#if UNITY_EDITOR
3132
var types = TypeCache.GetTypesDerivedFrom(AssemblyType).ToList();
3233
for (var i = types.Count - 1; i >= 0; i--)
3334
{
@@ -41,6 +42,9 @@ public virtual List<Type> GetFilteredTypes()
4142
}
4243

4344
return types;
45+
#else
46+
return new List<Type>();
47+
#endif
4448
}
4549

4650
/// <summary>

0 commit comments

Comments
 (0)