Hi!
Currently, I'm working on my little game with simple Spine animation.
My colleague made 7 different animations for a character.
Among them, 2 animations makes a problem.
Weird thing is...
With iPhone 5S or later devices, everything works well.
But with iPhone 5/iPod Touch 5th gen devices, those tricky two animations stuck in
line 369 of CCRenderer.cpp
CCASSERT(command->getType() != RenderCommand::Type::UNKNOWN_COMMAND, "Invalid Command Type");
or, keep making a error log from
line 503 of CCRenderer.cpp
CCLOGERROR("Unknown commands in renderQueue");
Has anyone seen this before?
I'm using Cocos2d-x 3.4 as a game engine with a latest Spine Runtime.(https://github.com/EsotericSoftware/spine-runtimes/tree/master/spine-cocos2dx)
+
Here's what I looked out so far:
I made a log at SkeletonRenderer.cpp as follows:
void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t transformFlags) {
log("%d", _drawCommand.getType()); // <- log RenderCommand type
_drawCommand.init(_globalZOrder);
_drawCommand.func = CC_CALLBACK_0(SkeletonRenderer::drawSkeleton, this, transform, transformFlags);
renderer->addCommand(&_drawCommand);
}
And it makes a log with 2 which is CUSTOM_COMMAND with regular animations.
But soon after I changed the character's state to questionable animation,
it makes a log with 0 which is UNKNOWN_COMMAND.
I know it's not a good way, but I tried to change CustomCommand.cpp as follows, and it worked:
void CustomCommand::init(float globalOrder)
{
_type = RenderCommand::Type::CUSTOM_COMMAND; // RenderCommand type re-initialization
_globalOrder = globalOrder;
}
I'm not so sure why the RenderCommand type has been changed.
Can anyone clarify this?
Any help is appreciated!