[unity] Fixed SpineAtlasRegionDrawer label error, closes #1245

This commit is contained in:
Harald Csaszar 2019-01-09 14:15:51 +01:00
parent c054f2ea2b
commit 08b5418185

View File

@ -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!");
}