Skip to content

Commit

Permalink
Animator editor (#475)
Browse files Browse the repository at this point in the history
* fix: bugfix
  • Loading branch information
luzhuang authored Sep 2, 2021
1 parent 8fccb26 commit 74c11e6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ export class AnimatorControllerResource extends SchemaResource {
}

_initAnimatorController(animatorControllerData) {
const { animations } = this.gltf;
const { animations } = this.gltf || {};
const { layers } = animatorControllerData;
if (!animations || !layers) return;
this._resource.clearLayers();
for (let i = 0, length = layers.length; i < length; ++i) {
const { name, blending, weight, stateMachine: stateMachineData } = layers[i];
Expand Down

0 comments on commit 74c11e6

Please sign in to comment.