Tuesday, November 5, 2024
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 as a result of cocos editor tries to seek 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 in a position to find the identical file or its counterpart in 3.8.3. Is there any approach I can customise the trail of the atlas to load?

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

Hello, whether it is inconceivable 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/Tasks/Cocos3.0/TestSpineCyka/belongings/spineboy-pro_atlas_gun.json

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

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

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

What I need to obtain is to detect the file identify 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 identify is discovered so it can load spineboy-pro.atlas as an alternative of spineboy-pro_atlas_portal.atlas.

I used to be in a position to 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 obtainable?

Sorry for the late reply. I used to be in a position to 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?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles