Forums » C++ Framework » [bug] unnecessary path prepend in CCFileUtils::getFileData »
| Leo Lou | [bug] unnecessary path prepend in CCFileUtils::getFileData | ||
|---|---|---|---|
|
Added by Leo Lou over 1 year ago
I am using CCTextureCache::sharedTextureCache()->addPVRImage("/data/data/com.mycompany/a_texture_file"); It works in iOS, but not in android. |
||
| Bin Zhang | RE: [bug] unnecessary path prepend in CCFileUtils::getFileData | ||
|
Added by Bin Zhang over 1 year ago
Thanks for your feedback! Sorry that the methods in the engine only support read resource files in the assets directory of the apk file. If you want read resource files in the system folders but not in the apk file, you must use fopen/fclose to implement that! |
||
| Francisco Morais | RE: [bug] unnecessary path prepend in CCFileUtils::getFileData | ||
|
Added by Francisco Morais over 1 year ago
Hi Bin Zhang, I try load texture by fopen.... look this:
But, if i add sprite into layer, he dont appear..... I can solve this problem??? do you help me please? |
||
| Minggo Zhang | RE: [bug] unnecessary path prepend in CCFileUtils::getFileData | ||
|
Added by Minggo Zhang over 1 year ago
I think you should set the texture rect by CCSprite::setTextureRect(). |
(1-3/3)