Is it safe to ignore this warning ? setContentSize : Sprite::setContentSize() doesn't stretch the sprite when using QUAD_BATCHNODE or POLYGON render modes

Is it safe to ignore this warning ? setContentSize : Sprite::setContentSize() doesn't stretch the sprite when using QUAD_BATCHNODE or POLYGON render modes
0

#1

Hello, ever since I implemented spritesheets in my game ‘polygon’ trim mode I’ve got these warnings in my console, but I dont call “setContentSize” anywhere in my game, would it be safe to ignore these warnings ? I think the only way to get rid of these warnings is by changing the trim mode but I wanted to use polygon trim mode for max optimization and not draw transparent pixels

setContentSize : Sprite::setContentSize() doesn’t stretch the sprite when using QUAD_BATCHNODE or POLYGON render modes


#2

How did you implement the spritesheets?


#3

In my first scenes init method

SpriteFrameCache* cache = SpriteFrameCache::getInstance();
    cache->addSpriteFramesWithFile("Level1.plist");
    cache->addSpriteFramesWithFile("backgrounds.plist");

#4

Sorry, I mean what tools are you using?


#5

texture packer


#6

ok, cool, let us ask @AndreasLoew for his input. I don’t experience this error, so it must be related to a TP setting, perhaps?


#7

yes it is related to the “polygon” setting in trim mode, when I change Trim Mode to trim the error goes away, but I wanted to use the “polygon” trim mode instead. when I keep polygon setting the warnings appear but everything appears to render fine, even on difference device sizes


#8

Well… search for that message and set a break-point to find out who is calling it…


#9

I did do that and it is something to do when the buttons are being layed out