1、在unity中 animations中,拖入對應的對象到 scene
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIiNx8FesU2cfdGLwczX0xiRGZkRGZ0Xy9GbvNGL0EzXlpXazxSMohVY0QXbihmSupVQClGVF5UMR9Fd4VGdsATNfd3bkFGazxycykFaKdkYzZUbapXNXlleSdVY2pESa9VZwlHdssmch1mclRXY39CXldWYtlWPzNXZj9mcw1ycz9WL49zZuBnL5EzN3MjNyMTM5ETOwEjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
2、把對應的動畫檔案拖入對象
3、部分紋理偏暗
調整下unity中的顔色亮度
4、在laya中導入,注意檔案目錄
(1)
this.resource = [
"res/LayaScene_SampleScene/Conventional/Chick_Animations.lh"
]
Laya.loader.create(this.resource, Laya.Handler.create(this, this.onPreLoadFinish));
(2)使用動畫
var playerSp = Laya.Loader.getRes("res/LayaScene_SampleScene/Conventional/Chick_Animations.lh")
this.player = this._scene.addChild(playerSp);
this.player.transform.position = new Laya.Vector3(0,1,-3)
this.ani= this.player.getComponent(Laya.Animator);
this.ani.play("Swim/Fly");