Upgrading to the Latest Engine Release

Upgrading to the Latest Engine Release

Games with C++ code, like Lyra, require manual updates to work with new major Unreal Engine updates. Major engine upgrades may deprecate old features/settings and change functions/variables used by your project. Some game-specific code/data needs to be updated to work after the upgrade.

Let’s use Lyra as an example and follow these steps to update a game:

1. Start with a backup:

  • Back up your project before you attempt any upgradation.

2. Read Release Notes:

  • Review the release notes for the new engine version, note down any major changes and upgrade notes that may affect your game.

3. Create a New Git Branch:

  • Create a new branch in your git repository using:

    git checkout -b upgradeBranch
    

4. Install the New Engine Version:

  • Download and install the new engine version. You can install this to a different directory than your current engine version for comparison.

5. Update the Lyra Starter Game Sample:

  • Download and install the new version of the Lyra Starter Game sample that matches the new engine version. Install this to a different directory for comparison.

6. Migration Guide:

  • Refer to the Unreal Engine 5 migration guide to check compatibility with the newest engine version.

7. Load Your Project:

  • Load your project in your C++ code editor and attempt to compile it. This will likely fail since it’s yet to be updated for the new engine version.

8. Fix Depreciation Warnings:

  • Resolve any depreciation warnings as per the instructions included in the depreciation message.

9. Fix Invalid or Missing Classes:

  • For errors about invalid or missing classes or structs, add a new #include line to the top of the file.

10. Update Virtual Function Overrides:

  • For errors about virtual function overrides, update the parameters of your overridden function in both the header and .cpp file.

11. Update Access to Invalid Variables:

  • For errors about invalid variables on a class or struct, use a different method of accessing that variable, usually by calling an accessor function like Get() or GetVariableName().

12. Stage, Commit & Push Changes:

  • Once your engine update is stable, add, commit, and push your changes to the upgradeBranch:

    git add .
    git commit -m "Upgraded to the latest engine version."
    git push origin upgradeBranch
    

13. Merge the Changes:

  • If satisfied with the upgrades, create a pull request to merge your upgradeBranch into the main branch, or directly merge:

    git checkout main
    git merge upgradeBranch
    

14. Update Other Environments:

  • Lastly, pull the recent changes on all other environments to ensure they’re working with the updated code base:

    git pull origin main
    

Following these steps will minimize potential risks while upgrading to a much recent Unreal Engine Version ensuring efficient code health.