Git
The VCSIntegration Plugin provides Git integration. It tracks changes made to assets in UnigineEditor and updates their statues in the repository automatically via the Git client.VCSIntegration 插件提供Git集成。 它跟踪对UnigineEditor中的资源所做的更改,并通过Git客户端自动更新存储库中的资源。
Setting Up Environment设置环境#
For VCSIntegration Plugin to operate with Git correctly, you should prepare the environment:为了使VCSIntegration 插件正确地与Git一起操作,您应该准备环境:
- Make sure git and git-lfs are installed on your computer. If the plugin can't locate a Git executable (git.exe is unavailable), it will provide you with the error message. The same will be displayed in the console. In this case, install the client and proceed with setting up the environment. 确保您的计算机上安装了git和git-lfs。 如果插件无法找到Git可执行文件(git.exe不可用),它将为您提供错误消息。 同样会显示在控制台中。 在这种情况下,安装客户端并继续设置环境。
-
Add the path to the git.exe file to the PATH environment variable. You can do that as follows:将git.exe文件的路径添加到PATH环境变量中。 您可以这样做:
-
Type Advanced System Settings in the search bar next to the Start button and click on the matching option.在Start按钮旁边的搜索栏中键入Advanced System Settings,然后单击匹配选项。
-
In the window that opens, click Environment Variables...在打开的窗口中,单击Environment Variables...
-
Select the system variable PATH from the list and click Edit...从列表中选择系统变量PATH,然后单击Edit...
-
In the window that opens, click New, add the path, and click OK. By default, it will be C:\Program Files\Git\cmd.在打开的窗口中,单击New,添加路径,然后单击OK。 默认情况下,它将是C:\Program Files\Git\cmd。
-
Now you can configure your project to use the VCSIntegration plugin and allow tracking changes.现在您可以配置您的项目以使用VCSIntegration 插件并允许跟踪更改。
Plugin Operation插件操作#
Adding New Asset添加新资源#
The user imports a new asset pedestal.fbx to the data directory. The new FBX asset, its metadata, and all runtime files with their metafiles will be displayed in the Git Commit. All files will have the Added status.用户将新资源pedestal.fbx导入到data目录。 新的FBX资源、其元数据以及所有运行时文件及其元文件都将显示在Git Commit中。 所有文件都将具有Added状态。
Renaming Asset重命名资源#
The user renames an asset from cube.png to sphere.png. The texture asset and its metadata with the new name will show up as Renamed in Git Commit. The previous names of the files will be displayed in the parentheses right after the new names.用户将资源从cube.png重命名为sphere.png。 具有新名称的纹理资源及其元数据将在Git Commit中显示为Renamed。 文件的先前名称将显示在新名称后面的括号中。
The status of the runtime file metadata will be set as Modified.运行时文件元数据的状态将设置为Modified。
Moving Asset移动资源#
The user moves a non-native asset helicopter_simple.fbx from one directory to another. The asset and its metadata added to the new directory will be displayed in Git Commit with the Renamed status. The previous paths to the files will be displayed in the parentheses right after the new paths.用户将非本机资源helicopter_simple.fbx从一个目录移动到另一个目录。 添加到新目录的资源及其元数据将以Renamed状态显示在Git Commit中。 以前的文件路径将显示在新路径后面的括号中。
Deleting Asset删除资源#
The user deletes a non-native asset helicopter_simple.fbx. The asset, its metadata, and all runtime files with their metadata will have the Deleted status within Git Commit.用户删除非本机资源helicopter_simple.fbx。 资源、其元数据以及所有运行时文件及其元数据的状态将在Git Commit内具有Deleted。