How to do version management in UnrealEngine Unreal Engine

The division of labor and collaboration in the project team is essential, and version control in the UE project is very necessary. UE supports the use of Perforce and SVN for version management. Here, I choose the SVN I am familiar with.


1. Use SVN for source code management

Enable source control through the Editor Preferences window (Edit > Editor Preferences > Loading & Saving).
insert image description here

Select source code management in the level editor window, enter the SVN repository address, user name and password, etc., and select "Accept Settings" to start using source code management.
insert image description here

After the source code management is set, click "Source Code Management - Submit to Source Code Management".

insert image description here

You can see the list of files to be submitted. Different icons represent different states, which is consistent with the representation of other SVN plug-ins. Enter the description of the change list, which is required, and then click Submit.
insert image description here

After setting up the source code management, you can also submit the UE project files to the remote code base through "File-Submit to Source Code Management".
insert image description here

2. Content that needs to be included in source code management

UE projects are relatively large in size, especially after one pass operation, it is normal to have several gigabytes. Most of them are temporary files, and it is unrealistic to submit all of them to the SVN repository. On the one hand, it is necessary to make full use of the SVN source code management function that comes with the UE engine, and on the other hand, it is also necessary to have a detailed grasp of the file directory structure of the UE project.

There are the following common directories in the UE project, and their functions are described as follows:

  • Binaries - Contains executables or other files created during compilation.

  • Build - Contains the files needed to compile the engine or game, including those needed to create builds of the project for certain platforms.

  • Config - A configuration file that contains parameters that can be used to control the behavior of the engine. Values ​​you set in the game project Config file will override values ​​set in the Engine\Config directory.

  • Content - Holds engine or in-game content such as asset packs, textures.

  • DerivedDataCache - Contains derived data files. This data is generated specifically for the referenced content and is generated at load time. If the referenced content has not generated a cache file, the loading time will increase significantly.

  • Intermediate - Contains temporary files generated when compiling the engine or game. In the game directory, shaders are also saved in the Intermediate directory.

  • Saved - Contains autosave files, configuration (.ini) files, and log files. Additionally, the Engine > Saved directory contains crash logs, hardware information, and Swarm options and data.

  • Source - Contains all source files of the engine or game, including engine source code, tools and game classes, etc.

    • Engine - The source files in the Engine directory are organized as follows:

      • Developer - Files used by both the editor and the engine.

      • Editor - Files for editor use only.

      • Programs - External tools used by the engine or editor.

      • Runtime - Files used only by the engine.

    • Game - The source files in the game project directory are grouped by modules, one directory per module. Each module contains the following:

      • Classes - Contains all header files (.h).

      • Private - Contains all .cpp files, including game logic classes and implementation files for various modules.

      • Public - Contains the module's header files.

After the source code management configuration is complete, the contents submitted to the SVN repository by default include the following directories.
insert image description here

3. Source code management when developing with VisualStudio

Since UE supports development using blueprints and C++ classes, C++ developers can use VisualStudio to participate in project development collaboration.

Taking VS2022 as an example, the prerequisite for UE project development is to enable "game development using C++" and install a series of components.

insert image description here

In addition, if you select a blueprint project when creating a UE project, there is no C++ solution file (sln), and you need to convert the blueprint project into a C++ code project.

Select "File - New C++ Class", select "None" as the parent class, and click "Next" to confirm the save path.
insert image description here

Click "Create Class", the UE engine starts to create and compile the class, and after the compilation is completed, a VS solution file will be generated in the project root directory.

insert image description here

Use VS to open the C++ code project, and you can also use the SVN plug-in for source code management.

insert image description here

Guess you like

Origin blog.csdn.net/lordwish/article/details/128369910