Skip to content

Commit 01e2d62

Browse files
committed
Merge pull request #149 from lvlonggame/v3
Fix bug: load sprite3D from cache, the attach node will be discarded.
2 parents 7cf5b50 + 799f375 commit 01e2d62

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cocos/3d/CCSprite3D.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ bool Sprite3D::loadFromCache(const std::string& path)
9292
}
9393
}
9494

95+
for(const auto& it : spritedata->nodedatas->skeleton)
96+
{
97+
if(it)
98+
{
99+
createAttachSprite3DNode(it,*(spritedata->materialdatas));
100+
}
101+
}
102+
95103
for (ssize_t i = 0; i < _meshes.size(); i++) {
96104
_meshes.at(i)->setGLProgramState(spritedata->glProgramStates.at(i));
97105
}

0 commit comments

Comments
 (0)