static void RenameDirectory( string directory, string newDirectory, bool recursive )

robot_2Generated
code_blocksInput

Description

The RenameDirectory method in the Editor.EditorUtility class is used to rename a directory within the editor environment. This method allows you to specify whether the renaming should be applied recursively to all subdirectories and files.

Usage

To use the RenameDirectory method, provide the current directory path, the new directory name, and a boolean indicating whether the operation should be recursive. This method is static and can be called directly on the Editor.EditorUtility class.

Example

// Example usage of RenameDirectory
string currentDirectory = "Assets/OldDirectoryName";
string newDirectoryName = "Assets/NewDirectoryName";
bool applyRecursively = true;

Editor.EditorUtility.RenameDirectory(currentDirectory, newDirectoryName, applyRecursively);