0

新しいディレクトリをいくつか追加した後、cocosbuilder プロジェクトを再度開くと、次のようなダイアログが表示されます。

ディレクトリが多すぎる

非常に多くのサブディレクトリを含むディレクトリにあるプロジェクトを作成または開いています。プロジェクト ファイルは、プロジェクトで使用するリソースと一緒にディレクトリに保存してください。

ディレクトリが多すぎるためだと思います。

しかし、新しく追加したディレクトリを削除する以外に、この問題を解決できる方法が他にあるのではないかと思います。

ありがとう。

4

1 に答える 1

2

github バージョンを使用している場合は、いつでも CocosBuilder ソースで直接警告を削除して再構築できます。

それ以外の場合は、MK によって要求された変更を github で請願することができます。

問題のコードはCocosBuilderAppDelegate.m、行 ~ 1155 付近にあります。

[[CocosBuilderAppDelegate appDelegate] modalDialogTitle:@"Too Many [...]

少なくとも 2 つの場所でこの行を削除する必要があります。

- (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に変更するだけで、問題を解決できます。

于 2013-04-09T13:27:22.073 に答える