My question is :
When I change the weapon by SkeletonGraphic, then weapon pictures showed is not correct.
A is the SkeletonGraphic of the child of unity5's canvas.
B is the SkeletonAnimation of unity5.
A's code:
m_graphic = GetComponent<SkeletonGraphic> ();
string daggerName = "dagger";
Skin newSkin = m_graphic.Skeleton.UnshareSkin(true,false,m_animation.AnimationState);
Sprite equipSprite = Resources.Load<GameObject>(daggerName).GetComponent<SpriteRenderer>().sprite;
RegionAttachment newWeapon = equipSprite.ToRegionAttachmentPMAClone (Shader.Find("Spine/Skeleton"));
newWeapon.SetScale (1.5f, 1.5f);
newWeapon.UpdateOffset ();
int slotIndex = m_animation.Skeleton.FindSlotIndex (slot);
newSkin.AddAttachment (slotIndex, daggerName, newWeapon);
m_graphic.Skeleton.SetSkin (newSkin);
m_graphic.Skeleton.SetToSetupPose ();
m_graphic.Skeleton.SetAttachment (slot, daggerName);
How should I correct replacement weapons by SkeletonGraphic on canvas?