一:如何兼容使用龙骨动画 请参考https://www.cnblogs.com/NightFrost/p/9585296.html 插件下载地址https://github.com/DragonBones/DragonBonesCSharp/releases/tag/5.6.300
二:如何代码创建一个龙骨动画
public UnityDragonBonesData dragonBoneData;
void Start()
{
DragonBonesData _tigerData = UnityFactory.factory.LoadData(dragonBoneData);
UnityArmatureComponent TigerARmatureComponent = UnityFactory.factory.BuildArmatureComponent("tiger", "tigerObject");
TigerARmatureComponent.animation.Play("24DongWuXuanYun");
TigerARmatureComponent.name = "testName";
TigerARmatureComponent.transform.localPosition = new Vector3(0.15f, -2.34f, 1.0f);
}
![图1](https://img-blog.csdnimg.cn/385a921a876d4459941d6b8392ab86a5.jpg?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA56u55b-DX-m7juazog==,size_20,color_FFFFFF,t_70,g_se,x_16)
三:换装
Slot theSlot = TigerARmatureComponent.armature.GetSlot("TB");
UnityFactory.factory.ReplaceSlotDisplay("tigerObject", "tiger", "TB", "animal/TB/TB002", theSlot);
![图二](https://img-blog.csdnimg.cn/1f7340d4b1c543738add414126731e7c.jpg?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA56u55b-DX-m7juazog==,size_14,color_FFFFFF,t_70,g_se,x_16)
|