Xcode loads the same image for two different lines

I have two images in the asset folder, which is called like this:

backgroundImage = @"background.wood";
backgroundImageLight = @"background.wood.lighting";

The names in the asset folder match the names of these lines. When I try to load these images, no matter which backgroundLight always loads the background image. I needed to change the name in the assets folder and in the line from "background.wood.lighting" to "somedifferentstring" in order to actually load the correct image. Is this a bug with Xcode? Why does it load the same image for these different lines? Is this related to the fact that the undertakings are similar? I tried to clear the cache manually to make sure the image was not preloaded, but that didn't help either.

UPDATE:

Code for displaying / downloading images:

SKSpriteNode *background = [SKSpriteNode spriteNodeWithImageNamed:backgroundImage];
background.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMidY(self.frame));
background.size = self.frame.size;
background.zPosition = background_z_order;

SKSpriteNode *backgroundLight = [SKSpriteNode spriteNodeWithImageNamed:backgroundImageLight];
NSLog(@"%@, %@", backgroundImage, backgroundImageLight);
backgroundLight.position = CGPointMake(CGRectGetMidX(self.frame),CGRectGetMidY(self.frame));
backgroundLight.size = self.frame.size;
backgroundLight.zPosition = background_z_order;

[mainView addChild:background];
[mainView addChild:backgroundLight];

2:

, , , ".". idk:

monster.boss.one
monster.fire.redsun
monster.lightning.yellowjaw
monster.normal.greenslither 
+4
1

"." . , , , @"myImage.jpg", , myImage. , . .lightning background.wood - .

, , . .

+1

Source: https://habr.com/ru/post/1650097/


All Articles