I copied all my asset folders into the “Assets” directory.
In visual studio 2013 I click on the assets folder in the solution folder → Add->Existing Item…, and then I choose each of the files.
I then clicked on each file-> Properties, and ensured that for “All Configurations”, “Excluded from Build” is set to “No”, “Content” is “Yes”, and I set the Item type.
I try to read files like:
std::string leveldata = FileUtils::getInstance()->getStringFromFile("levels.lvl");
But I get a message in the log:
cocos2d: fullPathForFilename: No file found at levels.lvl. Possible missing file.
Get data from file(levels.lvl) failed!
My leveldata string is blank because it can’t find the file.
My folder structure is:
Assets–>data–>levels.lvl
(Assets is the folder created automatically by the cocos tool)
How do I get this to work ?