Adding Automation Projects

How to add an automation project for AutomationTool.

Windows
MacOS
Linux
필요한 사전지식

이 글은 다음 주제에 대한 지식이 있는 분들을 대상으로 합니다. 계속하기 전 확인해 주세요.

You can implement project-specific automation scripts that will be compiled and loaded by AutomationTool by creating a new C# project in a location that AutomationTool can find it.

This requires using a source build of the engine (from GitHub or Perforce, rather than from the Epic Games launcher), and for the project to be in a location discoverable from a subdirectory listed in the UE4Games.uprojectdirs file. This file is located in the UE4 root directory.

Steps

  1. In Visual Studio, right click your project folder, and select Add > New Project...

  2. With the Add New Project menu open, select the Class Library (.NET Framework) Visual C# option, and for illustrative purposes, use the following settings:

    Setting

    Value

    Note

    Name

    SampleScript.Automation

    The project's generation script looks for a *.csproj file with the *.Automation.csproj extension.

    Location

    [ProjectDir]\Build

    [EngineDir]\Source\Programs

    You can save the project in a Build or Source directory.

    For Build directories, it needs to be within a directory alongside a discoverable *.uproject file, which means that the game is under one of the directories listed in the UE4Games.uprojectdirs file.

    Framework

    4.6.2

    The .NET framework we are using as of the time of this writing.

    The project cannot be in a folder with a *.build.cs or a *.target.cs file.

  3. For illustrative purposes, right click SampleScript.Automation > Class1.cs, select Rename, and name it SampleScript.cs.

Updating the Project's Settings

Now that the solution has a new automation project, it is time to set its build configuration and the project's build output path.

Rename the Release Build Configuration

With the SampleScript automation project selected:

  1. Open Build > Configuration Manager...

  2. Find the SampleScript.Automation project in the list, and select Edit... from the Configuration column.

  3. From the Edit Project Configurations window, select the Release configuration, and press the Rename button.

    1. Set the new name to Development.

  4. Close both windows.

Set the Project Build Output Path

With the Build tab selected in the project's property menu:

  1. Select All Configurations.

  2. Now, set the Output path: field to your project's automation script directory.

    • You can either use Browse... or you can type in the output path

    • The output path is relative to your project's root directory, so make sure to navigate through parent directories using '..'

    • If you do not set the project's output path properly, AutomationTool will not discover your automation commands

  3. Close Visual Studio and run GenerateProjectFiles.bat.

  4. To verify the setup, open the generated UE4.sln, and navigate to UE4 > Programs > Automation in the Solution Explorer to locate the newly added Automation project.

Adding the Required Assembly Reference

To use base functionality provided by AutomationTool, you need to add a reference to the AutomationUtils library:

  1. Locate your project in the Solution Explorer under Programs > Automation.

  2. Under the project folder, right click on References and select Add Reference....

  3. From the Reference Manager Projects menu, locate and select AutomationUtils.Automation before clicking OK.

End Result

Now that you have added an automation project with the appropriate settings and references, you are ready to learn how to add a command .

Select Skin
Light
Dark

새로운 언리얼 엔진 4 문서 사이트에 오신 것을 환영합니다!

문서 사이트에 대한 의견을 모을 수 있는 피드백 시스템을 포함해서 여러가지 새로운 기능을 준비하고 있습니다. 아래 Documentation Feedback 포럼(영문) 또는 언리얼 엔진 네이버 공식 카페(한글) 중 편하신 곳에 의견이나 문제점을 알려 주세요.

새 시스템이 준비되면 알려 드리겠습니다.

네이버 카페
공식 포럼