Mechanism of Loading Resources


There are two different mechanisms of loading resources since cocos2d-2.1beta3-x-2.1.1:

  • distributed strategy
    This strategy is used in CocosBuilder. It put all retina resources into different directories. We will describe it in detail following.
  • centralized strategy
    This strategy put all retina resources into a separate directory.

Don't use two strategies together. If your project is not created by CocosBuilder. I sugget you use centralized strategy. Just use CCFileUtils::setSearchPath() (setResourceDirectory is deprecated) to set searching paths.

1. Distributed strategy

This strategy is used in cocos2d-iphone and CocosBuilder. The resource directory looks like


原文地址:https://www.cnblogs.com/yssgyw/p/3439194.html