FolderMoveValidator.cs
is a script for Unity designed to prevent users from accidentally moving folders within the Unity Editor. It does so by confirming user intent if the attempted move meets certain conditions.
- Folder move confirmation dialog for or quickly moved folders
- Customizable settings for threshold on file count and move speed
- Add the
FolderMoveValidator.cs
script into your Unity project'sEditor
folder. - If the
Editor
folder doesn't exist, create it in your project's root directory (Assets
) before adding the script.
After installation, you can configure the FolderMoveValidator settings:
- Open Unity and go to Edit > Preferences.
- Find the Folder Move Validator Settings in the Preferences window.
- Set the
Milliseconds Threshold
to your desired speed sensitivity. This determines how quickly consecutive clicks are interpreted as a possible accidental folder move. - Set the
File Threshold
to determine the minimum number of files in a folder and its subfolders for the confirmation dialog to appear.
When you attempt to move a folder that has more files than your File Threshold
within a shorter time than your Milliseconds Threshold
, Unity will prompt you with a confirmation dialog. If you confirm, the folder will be moved; otherwise, the move will be cancelled.
If you encounter issues or have questions, please submit them to the project's Issues section on GitHub.
This script is released under the GNU License.