2018年6月25日
Creator 资源加载分析
不同场景之间的本地资源虽然存储在一起(即使放在了resources目录下),但是根据不同场景之间的引用不同,加载的资源过程中的资源处理也是不同的。
项目gitlab地址 :https://code.vipkid.com.cn/handongze/resources-load
点我下载:https://code.vipkid.com.cn/handongze/resources-load/repository/archive.zip?ref=master
为了验证效果做了如下实验,
为了明显看到效果,我的场景一跟场景二引用的图片资源不同,
首先是场景一:
场景二:
这时候看下浏览器控制台的效果
为了更深入效果这里我准备两份,一份打包前状态下,一份是打包后的效果
直接打开效果
打包后效果
结果显而易见,结论:无论是creator直接运行还是打包构建后的运行,它都会根据不同的场景加载对应场景所用到的资源,
1.如果你想跨场景加载请使用 cc.director.loadScene(“Main”); //main是场景名字
2.通过常驻节点进行场景资源管理和参数传递,
3.当切换场景时,默认会将场景内所有节点和其他实例销毁。如果我们需要用一个组件控制所有场景的加载,或在场景之间传递参数数据,就需要将该组件所在节点标记为「常驻节点」,使它在场景切换时不被自动销毁,常驻内存。
更多关于资源加载请前往creator文档中的资源加载:http://docs.cocos.com/creator/manual/zh/scripting/scene-managing.html?h=scene




Yoour syyle is reaqlly unique inn compwrison to other follks I’ve
read stuff from. Manny thajks for posting wwhen youu havge tthe opportunity, Guess I’ll juyst
bookmark thijs wweb site. ofvd9wuapt2okoqgocno
Jake gyllenhall sexyFree long hair sexPhotography nudist imageTonga treats hard candy stripsWww cartoon fucking comBlondes gagging sucking huge cocksSexy aviator couples costume xnxx Still dont give a fuck
lyricFree full length hairy vidsFree rockabilly pornCategories movies pornInspirational stories for teen boysFuck off shitheadEbont getting fuckedDaughter looks a mothers hairy cunt https://xxxxvideos.cc/ Free movies from daniella in pantyhoseAlison brie stripSmall old cocksAmeteur teen pornXxx animated emotionsFree vidoes of girls fuckingBreast feeding photo twinBurrnet teensClinon vs obama on gay
rightsToony tgp xnxx Looking for women in extreme bondageHumorous sex picFemale sexy anime artworkNormal guys fuckingPerfect face boobsRed tube erotic videeosPeepholes watching fuckingMovie pink porn vidsHot gayboy cumshot clipsCauses of vaginal sores