shown in other instead.
SVN Plugin is designed to let the version control system (SVN) track all file changes performed in UNIGINE Editor. The plugin tracks all actions (with some exceptions) and processes them. All tracked actions go to SVN Commit via the SVN client, where they are assigned the corresponding status. This will help users avoid manual work.
What is SVN Plugin#
SVN Plugin has no interface and starts automatically after the Asset System is initialized and all assets are imported. Similar to other plugins, this plugin can be loaded and unloaded via the Editor Plugins window (Help -> Plugins). When the plugin is loaded and running, it receives data about every event in the Asset System (asset or directory adding/deleting/renaming or asset editing). For every such event the svn.exe console tool is called and the corresponding process with the required arguments is started.
The following is required for SVN Plugin correct operation:
The Subversion client (svn.exe) must be installed on the computer and it should have command-line tools. Make sure that the svn.exe is available, otherwise you will see the following error message:
[SVN Plugin] 'svn.exe' not found.
Run the SVN installer, click Modify, and then click on the command line client tools icon to install it.
Add the path to the svn.exe file to the PATH environment variable. You can do that as follows:
Type Advanced System Settings in the search bar next to the Start button and click on the matching option.
In the window that opens, select Environment Variables.
Select the system variable Path from the list and click Edit.
In the window that opens, select New and add the path. For TortoiseSVN it will have the default value: C:\Program Files\TortoiseSVN\bin.
Then select ОК.
Your working repository must be managed by SVN. Otherwise, an error message will appear in the console window:
[SVN Plugin] Start initialization…
[SVN Plugin] `D:/SVN/test path/data/` is not SVN repository.
SVN Plugin Limitations#
The plugin does not provide fully-fledged integration with version control systems and can't solve all issues. Its aim is to facilitate tracking of major content changes done by multiple developers working on the same project in the Editor and saving these changes to the repository. Therefore, be aware of the following restrictions:
The plugin only manages the /data directory. This means that the plugin can't track changes to directories or assets outside of that directory.
The plugin doesn't process unicode characters like: "لا أدري不知道боль". Therefore, only use English characters, numbers or space in file and directory names. Using other characters in the file and folder names may cause changing the recursive status to non-versioned. Howether, this restriction doesn't apply to the file content.
The Cleaner tool allows deleting lost runtime files (Lost Runimes), but this can't be handled by the SVN Plugin. Files deleted using this feature will have the missing status.
Editor plugins run after Asset System is initialized and all assets are imported. Therefore, if project files have been added or removed before the Editor is launched, SVN Plugin can't track these changes upon initialization, and they will have the non-versioned/missing status in SVN Commit.
The plugin doesn't track changes in the mounted directories (mount).
The plugin doesn't solve and doesn't simplify conflict solving. It only helps SVN to correctly determine the file status.
The TortoiseSVN Ignore list is not used by the plugin — such files still are tracked. Thus be aware that if such files and the directories containing them are changed, they will be added to the SVN Commit list. For example: when a texture is imported to a directory added to the Ignore list, the plugin will process it and mark it with the added status instead of ignoring that texture and mark it with non-versioned status. Make sure to exclude such files from the commit!
When the plugin is running, the Editor may slow down. This is caused by processing of all file interactions by SVN, which is time-consuming. The more files are affected by changes, the longer the processing is. This is especially obvious when adding or removing files, in other cases processing is rather quick.
How to Work With SVN Plugin#
From the user's point of view, the plugin operation has almost no effect on the Editor behavior — you won't observe any changes. You can delete, add, rename, edit, and create files and directories just the same way as you have done before, only with SVN Plugin tracking and processing all changes made by you.
The working pipeline basically is as follows:
Before getting started, update (SVN Update) and clean up (SVN Cleanup) the repository.
Run the Editor and work as usual (you can add and edit files as you did it before).
When you are done, save the project and close the Editor. We recommend closing the Editor because an update may be required before committing, and it can break everything.
Commit all your changes to the repository (SVN Commit). If conflicts arise, resolve them as you have done before. However be aware that all changes made without the Editor running (via File Explorer) will have an invalid status.
SVN Plugin Usage Examples#
Adding New Asset#
The user imports a new asset humanoid_run_forward.fbx to the directory. The new FBX asset, its metadata, and all runtime files with their metafiles will be displayed in the SVN Commit. All files will have the added status.
The user renames an asset from PNG.png to ddd.png. The texture asset and its metadata with the old name will show up as deleted in SVN Commit, the same files with the new name will be displayed as added(+).
The user moves a complex asset import_materials.fbx from one directory to another. The asset and its metadata will be displayed in SVN Commit, then the files from the old directory will have the deleted status, and those added to the new directory will be marked as added(+).
The user deletes a complex asset humanoid_run_forward.fbx. The asset, its metadata, and all runtime files with their metadata will have the deleted status within SVN Commit.
Changing Asset Import Parameters#
When an asset is re-imported with new parameters, its runtime files and metadata will have the modified status in SVN Commit. The asset itself remains unchanged.
Disabling SVN Plugin#
SVN Plugin is disabled the same way as other plugins in the Editor. Select Help → Plugins in the menu, find SVN Plugin in the list and click Unload. After that, the plugin will be disabled until the Editor is restarted or the Load button is clicked.