Wednesday, November 6, 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 consequence 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 method I can customise the trail of the atlas to load?

Error messages:
[Assets] Importer exec failed: /Customers/consumer/Paperwork/Initiatives/Cocos/TestSpine/property/spine1.json
[Assets] Cannot discover /Customers/consumer/Paperwork/Initiatives/Cocos/TestSpine/property/spine1.atlas

Hello, whether it is unattainable please let me know. Thanks.

may you please present the demo for us to test?

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

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

[Assets] Cannot discover /Customers/consumer/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/property/spineboy-pro_atlas_gun.atlas

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

[Assets] Cannot discover /Customers/consumer/Paperwork/Initiatives/Cocos3.0/TestSpineCyka/property/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 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 accessible?

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

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles