Custom Preview Template - Cant find /assets/resources/config.json

I was just running the ‘Custom Preview Template’ example and I couldn’t figure out why exactly the main test.fire scene doesn’t run when you hit the preview button. I thought it might be designed that way for the example, (so it just shows the loading screen and nothing else) but when I check the browser console there is the error:

Can’t find resource /assets/resources/config.json

Is this just something I’m missing or everyone else?

Edit: Just to add to this, I tried creating a new preview-templates folder in a project that was working fine…I adjusted some of the html and now when I run it (after editor restart) the project always gives me the error above (missing config.json). Also, if I try it in simulator it crashes straight away and the simulator is closed with the following errors:

  • Simulator: cocos2d::GLFWEventHandler::setGLView [0x006A48A5+2870933]

  • Simulator: cocos2d::GLFWEventHandler::setGLView [0x00443AAB+376987]

  • Simulator: 43A475+338533]

  • Simulator: cocos2d::GLFWEventHandler::setGLView [0x004156B6+187558]

  • Simulator: decrypt [0x00720265+4037]

  • Simulator: BaseThreadInitThunk [0x776A6359+25]

  • Simulator: RtlGetAppContainerNamedObjectPath [0x77A87C24+228]

This is all definitely to do with the preview-templates folder because as soon as I remove it and restart the editor the preview works fine again. But what exactly is the problem with the preview templates because I just took a direct copy of the preview-template folder from Creator\2.4.2\resources\templates\

Cheers

Thanks for your feedback, the ‘Custom Preview Template’ example do have issues and we will fix them in the upcoming v2.4.3 release.

@Grimmy We have updated the ‘Custom Preview Template’ example, which you can download from the GitHub repository to use: https://github.com/cocos-creator/preview-template/tree/v2.4.0

That works perfectly. Thank You!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.