Howdy
I have numerous scenarios where the Skeleton from a SkeletonAnimation is null:
_skeleton = _skeletonAnimation.skeleton;
if (_skeleton == null)
{
Debug.LogError("Skeleton was null");
return;
}
A common case where this arises is if I have a Spine object that is starting off deactivated. I will activate it and do some stuff. However if I activate it, the frame it becomes active the Skeleton is always null.
If I hide the object and have it active when the scene loads, the Skeleton is not null.
Is there a way I can force load the Skeleton the first frame it becomes active?