Function fileExistsInSearchPaths

#include <Geode/utils/cocos.hpp>boolfileExistsInSearchPaths(
charconst*filename
)

Checks if a given file exists in CCFileUtils search paths.

Parameters

filename

File to check
Return value
True if file exists
Examples1
if (fileExistsInSearchPaths("mySprite.png"_spr)) {
CCSprite::create("mySprite.png"_spr);
} else {
CCSprite::create("fallback.png");
}