Assignment Goals

The primary goal of this assignment is:

  1. Get your own working version of Unreal compiled from source.

Assignment 6b will extend this to making changes to your version of the engine code.

Part A details

System

Ideally, you'll use the PC or Mac you have been using the rest of the semester. If it is short on cores or memory such that you want to use something faster, there are three 24-core computers in ENG 005a which you could use with your personal SSD. Everyone in the class should have card swipe access to this lab. Expect that the build could take up about an additional 170 GB on your drive, 270 GB if you haven't run the Setup script yet. Be sure you have enough free disk space before you start. Running out of space mid-compile will leave partial broken files, and it is likely you will need to restart the build from the beginning.

Directory limits

By default, Windows has a 260-character maximum path length. If your g4g2026 directory already has a long path, directories deep in the build will be too long. Either make sure your g4g2026 directory is near the root of the drive (almost certain if it is on its own SSD), remap the g4g2026 directory to its own drive letter with the 'subst' command, or enable long path support in the Windows registry and Unreal build settings. Look online for more info on the second two options.

Some of the Unreal build scripts do not handle non-ASCII characters well, and I'd be wary of having any spaces in the path as well. If you normally have unicode characters or spaces in your path, you should probably move the g4g2026 location on your disk to avoid those before you start.

Ensure you have the non-github large files

  1. (Re)run the Setup script in your g4g2026 directory. ⏱
    • Setup.bat for windows, Setup.command for Mac, Setup.sh for Linux
    • If you have not done this yet, this will download about 97 GB of additional large files that are not in the git repository. If your internet connection is slow, it can take a while.

Build UE5

  1. Run the GenerateProjectFiles script (bat for Windows, command for Mac, or sh for Linux).
    • You will only need to re-run this again when you add or remove source files.
  2. Open the generated build file (The newly created UE5.sln Visual Studio solution or "UE5 (Mac).xcworkspace" XCode project).
  3. Do a build. ⏱⏱⏱
    • In Visual Studio:
      • Right click on UE5 in the Solution Explorer window, and choose "Set As Startup Project".
      • Make sure the configuration boxes in the toolbar just below the menus are set to Development Editor, Win64, and UE5 (they should be already).
      • Build just UE5, not the entire solution, either by pressing the play button in the top menu bar (this will start the next step as well when the build is done), from the menu that pops up when you right click on UE5 in the Solutuion Explorer, from the Build menu, or using Ctrl+B when UE5 is selected in the solution explorer menu. Building the entire solution includes dozens of additional auxilliary tools that we do not need that will make the already long build time even longer.
      • Watch the Output window for progress.
      • If build errors happen, it will switch to an error list window, but usually the full message in the build Output window is more useful for figuring out what went wrong. At this stage, this is most likely running out of disk space or path problems, though it is possible you could have a message indicating something else should be installed to complete the build on your computer.
    • In Xcode:
      • Select UnrealEditor in the toolbar box at the top of the XCode window.
      • Build just UE5, either by pressing the play button in the top menu bar (which will also start running when the build is done), from the Product menu, or using ⌘B
      • Follow the build progress by opening the Build window in the Report Navigator (last tab icon just below the play button)
    • This will likely take at least an hour, and quite possibly many hours. Fortunately, you will not need to do a full build often.
  4. Run the UE5 Editor to make sure it worked. ⏱⏱

Create an Unreal Project

  1. Using your new UE5 Editor, create a new blank C++ project. Call the project "proj6" (not proj6a, we'll be using the same project for the second part), and save it at the top level of your g4g2026 directory (so it'll be g4g2026/proj6).
    • I'll be able to tell from the uproject file that it was created using a source build rather than the installed binary release of the Unreal Engine we have been using the rest of the semester.
  2. Once created, it'll show up in the Games section of your UE5.sln Visual Studio solution / XCode project, and you can launch it from there. Unlike our earlier projects, you'll want to launch from the top-level engine build file (UE5.sln / UE5 (Mac).xcworkspace), not from the proj6 directory
    • In Visual Studio, set the proj6 project as your startup project, then hit the play button
    • In XCode, pick proj6Editor in the active project drop-down at the top of the window, then hit play
  3. Commit and push this project to github

Submitting

Add a proj6a.txt file. Describe your test computer (at least OS and number of cores), and approximately how long your build took.

Make sure everything is submitted and tagged with an proj6a tag.

For this part of assignment 6, you do not need to worry about multiple git commits or screen shots.