finalpets
finalpets

Reputation: 281

cocos2dx- 3.7 and 3.7.1 cocos studio don't work

Hello I'm working on cocos2dx-3.7.1 and I want to create an Scene on cocos studio, when I try to import the csb file only whit the template Helloworld.png works, but if I add a new Image and place it on the Scene(cocos studio) and publish, when I run the program I only see the helloworld.png.

Here is my code:

    #include "GS_MissionSelect.h"
    #include "Game.h"
    #include "cocostudio/CocoStudio.h"
    #include "ui/CocosGUI.h"
    USING_NS_CC;
bool GS_MissionSelect::init()
{
    //////////////////////////////
    // 1. super init first
    if (!Layer::init())
    {
        return false;
    }

    auto rootNode = CSLoader::createNode("CS_MainMenu/MainScene.csb");
    this->addChild(rootNode);
return true;
}

I don't know what I need to do, I can't add more resources on Android studio and publish, only see Helloworld.png (default img of cocostudio).

Upvotes: 0

Views: 484

Answers (2)

Filled Stacks
Filled Stacks

Reputation: 4346

I have had this problem before, and it happened because I only copied the .csb file published in the res folder, instead of copying all the files in the res folder as it is. You have to stick to the structure of your cocostudio project within your resource folder.

Just check the following please. Have you copied your entire publish folder into your resources folder? If not you should. Also could you edit your answer and put your directory structure for your published folder as well as your cocostudio content folder within the cocostudio editor and also the directory structure of your resource folder. It's just to rule out that your structure is correct and the problem lies in cocos.

Upvotes: 0

Ottter923
Ottter923

Reputation: 11

I happen to meet same situation. I deleted cocos 3.7.1 and have downgraded cocos 2dx to 3.4. It solved publish problem.

Upvotes: 1

Related Questions