Hello,
I faced the problem with unity UI skeleton graphic - there is no skins somehow. At SkeletonGraphic all looks fine. In ui case if I try set skins through code - I've get nullref exception when try find skin by name. How I can fix that?
Thanks!


Hello,
I faced the problem with unity UI skeleton graphic - there is no skins somehow. At SkeletonGraphic all looks fine. In ui case if I try set skins through code - I've get nullref exception when try find skin by name. How I can fix that?
Thanks!


As far as i can see we have single atlas

`
[SerializeField] private SkeletonGraphic skeletonAnimation;
private void SetupSkin(IEnumerable<string> _skins, WorkerTools _tool)
{
var skeleton = skeletonAnimation.Skeleton;
var skeletonData = skeleton.Data;
var animName = _tool.ToolToAnimation(Directions.None);
fullSkin = new Skin("FullSkin");
foreach (var skin in _skins)
{
fullSkin.AddSkin(skeletonData.FindSkin(skin));
}
skeleton.SetSkin(fullSkin);
skeleton.SetSlotsToSetupPose();
skeletonAnimation.startingAnimation = animName;
}
`
@dreding Then there is perhaps something wrong with your logic, getting the wrong SkeletonData or something like that (having the wrong GameObject assigned at skeletonAnimation). SkeletonAnimation.Skeleton and SkeletonGraphic.Skeleton access the same skeleton object which is generated equally for any skeleton renderer. Same applies for Skeleton.SkeletonData. If you are sure that everything is named as it should, you can send us a minimal Unity project which reproduces this issue. You can sent it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread so that we know the context. Then we can have a look at it.
dreding I am afraid that even if we can confirm that the names of the skeleton data assets set in the Inspector window match, the skeleton data assets refer to other files to manage the skeleton information, so it is not possible to determine whether your skeleton data is correct or not. Please send us a minimal Unity project that reproduces this problem as described by Harald.
dreding As you can see in my origin post on screenshots that I've attached - there is same SkeletonData Asset, but even in unity editor in SkeletonAnimation in Skin Dropdown there a lot of things and in UI version this dropdown is empty
Are you sure that both components are referencing the same SkeletonDataAsset, did you check with the Project panel? If so, please send us a minimal Unity project as mentioned above.