Create separate assets for cocostudio scenes?

Hi,
Can create a separate assets for normal and retina using inside or for cocostudio scenes ?
As i don’t find anything related to such or there’s no need to create separate assets ??

Yes you can.
Create and load your assets in normal way.
(for example create a texture2d object from resource based on resolution).

When you load an asset from CocosStudio first its trying to load it from catch. (it exists if you create it before!)

Hi,
Thanks for the reply and sorry I didn’t got your approach.

So I have my scenes i coco studio with spite and all dropped into their properties respectively. I only load the .csb file’s how is that going to work out.

For example:
you have a sprite in .csb file and it’s name is mySprite.
mySprite has an image in CocosStudio and it’s name is myImage.png.

before loading .csb file you create a Texture2D object, name it myTexture and create this from myImage.png based on resolution.
this texture must retain in memory.

when you load a .csb file and load a mySprite from it. mySprite created from myTexture.
(because myImage.png was loaded in memory before)

in fact you have a multi resource for myImage.png.

Thanks will try this and confirm.

Not sure that manual loading of textures at runtime based on resolution is good approach.
I don’t see any convenient solutions like in CocosBuilder where multi-resolution supported by the editor itself.

With CocoStudio i can see only next 2 approaches:

  • disable images publishing (if possible);
  • save folders hierarchy, but now use ‘resolution’ folders:
    E.g. if in Cocostudio used next folders hierarchy:
Images
    MainMenu
    Support
    Game 

Now you publish your images manually:

Images
   MainMenu
        resources-small
        resourses-medium
        resources-large
        resources-xlarge
    Support
        ....

setup resolution search order for FileUtils in app delegate.

  • or use search-paths option and publish manually in next way:
Images-small
    MainMenu
    Support
    Game

Images-medium
    MainMenu
    Support
    Game
...

And setup search paths for FileUtils in app delegate.

Don’t forget to setup content scale factor for Director.

With a such approach you should only prepare your resources in a right way. And you shouldn’t do anything at runtime.