当我在添加了一些新目录后再次打开cocosbuilder项目时,它会弹出一个对话框,该对话框如下:
目录太多 您已经创建或打开了一个项目,该项目位于一个包含许多子目录的目录中。请将您的项目文件与您在项目中使用的资源一起保存在目录中。
我知道这是因为目录太多了。
但是,我想知道除了删除我新添加的目录之外,是否还有其他方法可以解决这个问题。
谢谢。
发布于 2013-04-09 13:27:22
只要使用github版本,始终可以在CocosBuilder源中直接删除并重新构建警告。
否则,您可以在github上请求更改应MK要求。
违规代码位于CocosBuilderAppDelegate.m中,位于线~1155附近。
[[CocosBuilderAppDelegate appDelegate] modalDialogTitle:@"Too Many [...]您必须在至少两个地方删除这一行。
- (void) checkForTooManyDirectoriesInCurrentDoc
{
if (!currentDocument) return;
if ([ResourceManager sharedManager].tooManyDirectoriesAdded)
{
// Close document if it has too many sub directories
NSTabViewItem* item = [self tabViewItemFromDoc:currentDocument];
[tabView removeTabViewItem:item];
[ResourceManager sharedManager].tooManyDirectoriesAdded = NO;
// Notify the user
[[CocosBuilderAppDelegate appDelegate] modalDialogTitle:@"Too Many Directories" message:@"You have created or opened a file which is in a directory with very many sub directories. Please save your ccb-files in a directory together with the resources you use in your project."];
}
}
- (BOOL) checkForTooManyDirectoriesInCurrentProject
{
if (!projectSettings) return NO;
if ([ResourceManager sharedManager].tooManyDirectoriesAdded)
{
[self closeProject];
[ResourceManager sharedManager].tooManyDirectoriesAdded = NO;
// Notify the user
[[CocosBuilderAppDelegate appDelegate] modalDialogTitle:@"Too Many Directories" message:@"You have created or opened a project which is in a directory with very many sub directories. Please save your project-files in a directory together with the resources you use in your project."];
return NO;
}
return YES;
}更新:
在CocosBuilder/ccBuilder/ResourceManager.h中
马尔科的定义如下:
#define kCCBMaxTrackedDirectories 50因此,我们可以简单地将50更改为一个更大的数字,这个问题就可以解决了。
https://stackoverflow.com/questions/15877955
复制相似问题