You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
590 B
19 lines
590 B
using Spine;
|
|
using Spine.Unity;
|
|
|
|
public static class SpineExtension
|
|
{
|
|
public static bool TryGetAnimation(this SkeletonAnimation skeletonAnimation, string animationName, out Spine.Animation animation)
|
|
{
|
|
var skeletonData = skeletonAnimation.skeletonDataAsset.GetSkeletonData(false);
|
|
animation = skeletonData.FindAnimation(animationName);
|
|
|
|
return animation != null;
|
|
}
|
|
|
|
public static bool TryGetSkin(this SkeletonData skeletonData, string skinName, out Skin skin)
|
|
{
|
|
skin = skeletonData.FindSkin(skinName);
|
|
return skin != null;
|
|
}
|
|
}
|