Wednesday, April 30, 2025
spot_img

Backbone with a number of json recordsdata – Cocos Creator


In Cocos Creator 3.8.3, I’ve a backbone asset which consist of 1 backbone.atlas file, one backbone.png file and a number of json recordsdata like spine1.json, spine2.json and spine3.json.

I’m encountering error when importing the backbone asset resulting from cocos editor tries to search out spine1.atlas, spine2.atlas and spine3.atlas. I used to be ready to do that in cocos 2.4 by altering spine-meta.js within the engine however I wasn’t capable of find the identical file or its counterpart in 3.8.3. Is there any manner I can customise the trail of the atlas to load?

Error messages:
[Assets] Importer exec failed: /Customers/person/Paperwork/Initiatives/Cocos/TestSpine/belongings/spine1.json
[Assets] Can’t discover /Customers/person/Paperwork/Initiatives/Cocos/TestSpine/belongings/spine1.atlas

Hello, whether it is not possible please let me know. Thanks.

might you please present the demo for us to verify?

Please verify on this demo. It is possible for you to to see the next errors when opening the challenge.

[Assets] Importer exec failed: /Customers/person/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/belongings/spineboy-pro_atlas_gun.json

[Assets] Can’t discover /Customers/person/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/belongings/spineboy-pro_atlas_gun.atlas

[Assets] Importer exec failed: /Customers/person/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/belongings/spineboy-pro_atlas_portal.json

[Assets] Can’t discover /Customers/person/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/belongings/spineboy-pro_atlas_portal.atlas

What I need to obtain is to detect the file title of the json file with ‘_atlas’ then get the string earlier than the ‘_atlas’ textual content and cargo the atlas file with the string.

If the above talked about is achieved on this demo, when the json file spineboy-pro_atlas_portal.json is loaded, the ‘_atlas’ string within the file title is discovered so it would load spineboy-pro.atlas as a substitute of spineboy-pro_atlas_portal.atlas.

I used to be capable of customise this in cocos 2.4.7 by altering the contents in spine-meta.js however I couldn’t discover its counterpart in cocos 3.8.3.

en , How do you customized this in Cocos 2.4.7 to make it out there?

Sorry for the late reply. I used to be capable of obtain this by altering the searchAtlas operate in spine-meta.ts in Cocos 2.4.7, I modify the worth of the path variable with circumstances.

Hello @Tom_k , any replace on this?

You cant not customized the trail of the atlas to load in 383. sorry for that.

might you please present the e-mail to me?

I feel you possibly can simply clone the backbone.atlas file to a number of recordsdata and rename these recordsdata to spine1.atlas, spine2.atlas,… That could be a work round for me

Thanks, I’m conscious of this strategy and it’s what I’m attempting to keep away from as there isn’t a level having a number of atlas recordsdata once they have the identical content material.



1 Like

I’m simply conscious this strategy doesn’t work on native Android construct. It can trigger the sport crash in cocos ver 3.8.3

spine-cocos2dx.cpp:110: digital void backbone::Cocos2dTextureLoader::load(backbone::AtlasPage &, const backbone::String &): assertion "(texture)!=(nullptr)" failed

Do your group conscious of this challenge @Tom_k ?

That is the best way to implement to trigger the crash on Android?

Sure, the android crash with the error I submit above, the net model work wonderful

We’ll mounted it in 386. At the moment you possibly can create one particular person png and atlas for every json.



1 Like

I’ve tried 386 and it work. Nevertheless there’s a minor challenge on native android. In the event you picture have .jpg extension in file title it would crash the app. I’ve to rename it again to .png to work round this.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles