Quantcast
Channel: Cocos中文社区 - 最新帖子
Viewing all articles
Browse latest Browse all 495283

编辑器模式下动态加载资源的解决方案

$
0
0

编辑器模式下,不支持动态加载。建议采用类似方法:

var uuid = Editor.assetdb.remote.urlToUuid('db://assets/resources/test.xxx');
cc.loader.load(
                {
                    id: uuid,
                    type: 'uuid',
                    uuid: uuid
                },
                function (err, asset) {
                     // ....
                }
            );

Viewing all articles
Browse latest Browse all 495283

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>