微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

跨平台 – cocostudio:如何使用导出的场景文件. CCSceneReader是否适用于任何人?

我在cocostudio中创建了一个新场景并将其导出.该导出包括场景的json文件和其他带图像的目录等等.我今天安装了cocostudio和cocos2dx 3.0.

我像代码一样继续运行:

CCSSceneReader::sharedSceneReader()->createNodeWithSceneFile("your_scene.json");

我在cocos2dx help docs(页面底部)和其他一些地方在网上看过它.

问题是没有一个名为CCSceneReader的类带有cocos2dx,我不知道在哪里可以找到它.

我对使用cocostudio导出的其他方法持开放态度,它不使用CCSceneReader,但我还没有找到任何有用的东西.有人有这个成功吗?

解决方法

erparkerthis comment离开了这个答案

figured it out eventually,just a result of being unfamiliar with cocos2dx. If anyone was wondering,you need to remove the “CCS” from scene reader and also add “cocostudio::” if you’re not already using the cocostudio namespace (which by default,you’re not” I also needed to add “#include “editor-support/cocostudio/CocoStudio.h” to my header file. So,by default your new cocos2dx project isn’t using cocostudio. You need to add it

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐