Cocos2d iphone COCOS2D2.1,文件加载返回null

Cocos2d iphone COCOS2D2.1,文件加载返回null,cocos2d-iphone,Cocos2d Iphone,这是我的密码。在COCOS2D2.0中工作,相同的代码在2.1beta中返回null const GLchar * fragmentSource = (GLchar*) [[NSString stringWithContentsOfFile:[CCFileUtils fullPathFromRelativePath:@"CSEGrass.fsh"] encoding:NSUTF8StringEncoding error:nil] UTF8String]; 已将CSEGrass.fsh添加到xc

这是我的密码。在COCOS2D2.0中工作,相同的代码在2.1beta中返回null

const GLchar * fragmentSource = (GLchar*) [[NSString stringWithContentsOfFile:[CCFileUtils fullPathFromRelativePath:@"CSEGrass.fsh"] encoding:NSUTF8StringEncoding error:nil] UTF8String];

已将CSEGrass.fsh添加到xcode目标。为什么返回null?

请检查文件是否在复制文件构建阶段中,先生…现在刚刚在复制捆绑资源中手动添加,并已运行。fullPathFromRelativePath已被删除…不知道有什么替代方案…fullPathForFilenameIgnoringResolutions没有名为fullPathForFilenameIgnoringResolutions的api