What's InRange
?
SetSkin
accepts a string
(the name of the skin specified in Spine editor) or a Skin
object.
Oh. And I think you need to call skeleton.SetToSetupPose()
after setting the skin. In general, the Spine runtime has a thing for not assuming you want changes to happen or to persist or whatever so you may need to tell it certain things explicitly in some cases. This was done for flexibility reasons.
But I'm not sure if you still need to do that. I think they were talking about whether or not that was needed before. Not sure what they decided on. Worth a try though.
You can also double-check if the skin exists by checking if
skeleton.data.FindSkin("name of your skin")
returns null.