Based on your description, this sounds like a setup issue rather than a bug. Here are the most likely causes and solutions:
Bone Hierarchy Requirements
The issue is most likely related to how the bone hierarchy is set up in Unity. When controlling bones programmatically in Unity, you need to ensure that:
- The bone hierarchy in Unity mirrors the skeleton's bone hierarchy correctly
- All parent bones between the root and the eye controller bone are included in the hierarchy
- You're not skipping any bones in the chain
If you're using SkeletonUtilityBone components, note that they rely on local transform values and require a complete hierarchy. The recommended way to create this hierarchy is via the SkeletonUtility component rather than setting it up manually.
Animation Override
Another common cause is that your animations might be keying the eye bone values and overriding the programmatic bone positions. When you switch animations or play certain animations, they could be setting the bone transforms back to their animated values, which would override any manual positioning your programmer is doing.
Skin Bones Consideration
Regarding your question about putting the controller in a skin: No, you typically don't need to put controller bones inside skins. Skin bones are primarily used for performance optimization (to disable bone calculations when a skin is inactive) and to organize your rig in the editor. The eye controller should work regardless of which skin is active, as long as the attachments (eye and iris) are properly weighted to that bone.
What to Check
Make sure that:
- The eye and iris attachments are properly weighted to the eye controller bone in Spine
- The animation being played isn't overriding the eye controller bone's transform
- The bone hierarchy is complete if using SkeletonUtilityBone
Could you verify if the bone control works when no animation is playing? This would help determine if it's an animation override issue.