when I add CCSprite to CCPhysicalNode in a different thread than main, this CCSprite render in a black square like see in the image.
It's strange because the other CCSprite like Enemy or Hero are render ok like see in the image (Enemy is the colour Green and Hero is the colour red)
// in the method didLoadFromCCB Main Scene
-(void)didLoadFromCCB
{
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
,^(void){
[self buildGround];
});
}
// implements method buildGround
-(void)buildGround
{
while (i < WORLD_SIZE)
{
Ground *ground = (Ground*)[CCBReader load:[NSString stringWithFormat:@"nameGround%d",i]];
ground.physicsBody.collisionType = @"ground";
ground.position = ccp(lastPosition, 0);
[_ground addChild:ground];
Enemy *enemy = (Enemy*)[CCBReader load:@"Enemy"];
enemy.position = ccp(positionX , positionY);
enemy.physicsBody.collisionType = @"enemy";
[_ground addChild:enemy];
i++;
}
dispatch_async(dispatch_get_main_queue(), ^{
[_physicsNode addChild:_ground];
});
}

I solve my problem, the error was caused because the directory is not "Smart Sprite Sheet" in SpriteBuilder.
The solution was: