I just upgraded Spine from 3.6 to 3.7 and found that all my units are not rendering.
They all use RenderSeparator to separate character shadow and the character itself.
If I enable the main MechRenderer, it will show but of course with incorrect render order.
Below is the components setup that was working in 3.6 and not working after upgrade.
I was thinking if it is caused by using the old SkeletonAnimation class instead of SeletonMecaim class.
But than I have a few questions about changing the code to use SeletonMecaim.
- the new create instance method now accept a T and I am not sure if I am doing it right.
mSpineSkeleton = SkeletonAnimation.NewSkeletonAnimationGameObject(dataAsset); // 3.6
mSpineSkeleton = SkeletonMecanim.NewSpineGameObject<SkeletonMecanim>(dataAsset); // like this?
- the SkeletonAnimation has a AnimationState member that I can get and use it to control animations. e.g. SetAniamtion(), etc. Now it is gone. I don't know what to do about it.
mAnimState = mSpineSkeleton.AnimationState; // 3.6
I searched the code and found this from the runtime:
var animationStateComponent = (animator.GetComponent(typeof(IAnimationStateComponent))) as IAnimationStateComponent;
state = animationStateComponent.AnimationState;
I tried the following but with null error.
var animationStateComponent = (mSpineSkeleton.GetComponent(typeof(IAnimationStateComponent))) as IAnimationStateComponent;
mAnimState = animationStateComponent.AnimationState; // animationStateComponent is null
Also, is it normal to not seeing the character even in Editor (non-playing) state? I tested the separator renderer by hand and with separator renderers turned on and default renderer turned off, it doesn't show anything. Was it working before the upgrade? (3.6)