Textures loaded with NSOperation are blank
- by Omega
So I call this method:
-(void)beginExecution {
NSOperationQueue *queue = [NSOperationQueue new];
NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self
selector:@selector(execute)
object:nil];
[queue addOperation:operation];
[operation release];
}
Which triggers this:
-(void)execute {
[[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"MyTexture.plist"];
loaded = YES; // This tells me whenever loading is done.
}
However, when I create a sprite and try to use the texture MyTexture.png, the sprite is a blank canvas. Why is that?