Upgrade to 2022

Upgrading from realvirtual (game4automation) 2021 to 2022

In our latest release, realvirtual.io 2022, we have changed all previous naming conventions from "game4automation" to "realvirtual. As a result, upgrading to the new version may not be as straightforward as before. This upgrade guide will provide you with instructions on how to upgrade your projects to Version 2022. Unless necessary, we recommend using Version 2022 for new projects and keeping existing projects in Version 2021.

If you prefer Youtube, this tutorial is describing how to upgrade:


Before proceeding with the upgrade, ensure that all your custom scripts and components are located outside the "game4automation" folder.

Upgrade your existing Project to Unity 2022

Begin by upgrading your project to Unity 2022. Install the latest Unity 2022.3 release and open your existing project using the installed 2022.3 editor version. You will be prompted to confirm the editor version change. Your project should now open in Unity 2022, and you may encounter an error which can be ignored.

You will be asked to agree to changing the editor version. Your project should now open in Unity 2022. There might be an error which you can ignore.

Import realvirtual 2022

Next, import the latest realvirtual 2022 release by navigating to Assets > Import Custom Package. Select "Import" in the Import Package Window.

You will see several error messages in the console window, and the project structure will still contain the "game4automation" folder along with an additional "realvirtual" folder.

Delete game4automation folder

Although all necessary files have been imported and the references are intact, the project still contains outdated assembly definitions and the "game4automation" folder. Close Unity, delete the entire "game4automation" folder from the project, and then reopen Unity. When prompted with the Enter Safe Mode message, select "Ignore."

Import realvirtual 2022 once again.

Import the realvirtual 2022 package once again.

After the import, your project structure should resemble the following (with the possibility of additional custom folders you are having in the project), containing only the "realvirtual" folder.

You will now encounter several error messages related to your custom scripts. The primary reason for these errors is the namespace change from "game4automation" to "realvirtual" in the realvirtual package.

Cleaning up Package manager

In the event of numerous errors resulting from incorrectly referenced packages, follow these steps to resolve the issue:

  1. Delete the "Packages" Folder: If you encounter errors related to incorrectly referenced packages, the first step is to remove the existing "Packages" folder from your project. This folder contains the packages that may be causing issues.

  2. Replace with a Clean Copy: To ensure a clean start, obtain the "Packages" folder from an empty realvirtual 2022 project. This folder should be free from any conflicts or errors.

  3. Integration: Paste the "Packages" folder from the empty realvirtual 2022 project into the directory of the project that requires upgrading. This action should resolve any package-related errors, providing a smooth and error-free experience.

Changing the namespaces

To resolve the compile errors caused by your custom scripts, you need to replace all references to the "game4automation" namespace with "realvirtual" in your scripts.

Update the namespace declaration from "namespace game4automation" to "namespace realvirtual" and modify any "using game4automation" statements to "using realvirtual."

Upon completing these namespace changes, the console log should no longer display any compile errors caused by your custom scripts.

Upgrading the layers in your custom scenes

In addition to the namespace changes, the layer naming has been updated to a new standard (refer to the Physics section for details). Since your scenes might still utilize the old layer names, you need to update them to the new standard.

To ensure that the new layers exist in your project, select "realvirtual" followed by "Apply standard settings." This action will populate the new layers in the physics settings.

There may still be remnants of old layers (starting with "g4a"), which you can delete by selecting "Edit Layers."

Next, open your scene. To assist you in modifying the scene settings, an upgrade helper is provided. Choose "realvirtual" and then "Update Scene to 2022."

This action will update the most common layer settings in your scene. However, please double-check that all collider settings and layers in your scene align with the new layer naming convention

Last updated