Cocosbuilder on Cocos2d-x 2.02 multi-resolution system?

Hi,

Cocosbuilder should allow us to design screens with multiple resolutions in just one place. But Cocos2d-x recently changed the way of how multi-resolution resources are distributed, so I have no idea on how should I load a cbb file and make sure it loads the correct assets.

Any idea?

Thanks.

You can put the same resolution resource in a directory, and use the CCFileUtils::addResourceDirectory() to add the directory. Cocos2d-x will find resource from the directory set, it it is not found, it will find the resource without the directory.

You can refer TestCpp for detail information.

Minggo Zhang wrote:

You can put the same resolution resource in a directory, and use the CCFileUtils::addResourceDirectory() to add the directory. Cocos2d-x will find resource from the directory set, it it is not found, it will find the resource without the directory.
>
You can refer TestCpp for detail information.

no such function in 2.0.4? When publish from cocosbuilder, it removes the relative dir, for example, the sprite ref png “npc/monster1.png”, “npc” relative to parent “resource”, when read by ccbreader, only get “monster1.png”, and we can only set resourcedir to “resource”, and assert occurs. That confused me, any suggestion?

I have the same question.