Parcourir la source

[unity] Fixed SpineAtlasRegionDrawer label error, closes #1245

Harald Csaszar il y a 6 ans
Parent
commit
5d50bf35b2

+ 2 - 1
spine-unity/Assets/Spine/Editor/spine-unity/Editor/SpineAttributeDrawers.cs

@@ -543,7 +543,8 @@ namespace Spine.Unity.Editor {
 			} else if (atlasProp.objectReferenceValue == null) {
 				EditorGUI.LabelField(position, "ERROR:", "Atlas variable must not be null!");
 				return;
-			} else if (atlasProp.objectReferenceValue.GetType() != typeof(AtlasAssetBase)) {
+			} else if (!atlasProp.objectReferenceValue.GetType().IsSubclassOf(typeof(AtlasAssetBase)) &&
+						atlasProp.objectReferenceValue.GetType() != typeof(AtlasAssetBase)) {
 				EditorGUI.LabelField(position, "ERROR:", "Atlas variable must be of type AtlasAsset!");
 			}