1. Getting started¶
Windows with installed Unity 64-bit Editor.
Unity versions: 2018 LTS, 2019.x or 2020.x.
API Compatibility Level (for Windows standalone players): .NET 4.x
1.2. Installing the plugin¶
The AGX Dynamics for Unity plugin is distributed as a Unity package and be downloaded here.
Import the package into your project.
Select the downloaded AGX Dynamics for Unity package and click Open then Import.
If Unity is catching DllNotFound exceptions of agxDotNetRuntime.dll - restart Unity.
If the API compatibility level is set to .NET Standard 2.0, AGX Dynamics for Unity will issue a warning to the console (or won’t compile in Unity 2017):
Change API Compatibility Level: Edit -> Project Settings… -> Player -> Other Settings -> Configuration -> Api Compatibility Level -> .NET 4.x.
1.3. Updating the plugin¶
From version 2.0.0-beta.8 there is built in functionality to check for new versions of AGX Dynamics for Unity. When a new version is detected the package can be downloaded and installed.
Open Check for Updates… window from the main menu.
When a new version is available, press Download to start the download of the new package. The package is downloaded to System.IO.Path.GetTempPath() and the package isn’t deleted in the update process.
When the package has been downloaded, press Install to to start the installation process.
Unity will be restarted during this update and all content in the
AGXUnityfolder will be deleted (except
agx.licand user preferences/settings). All other files and folders (under
AGXUnity) will be deleted. Make sure any additional files and/or local changes are backed up before updating.
After Unity has restarted the update will continue by removing all the files and folders under the
AGXUnitydirectory. Unity will recompile all scripts in the project several times during this process, and any script referencing
AGXUnityEditorwon’t temporarily compile (compile errors in the Console).
The new package is installed from script with
UnityEditor.AssetDatabase.ImportPackagewhich is asynchronous and not possible to track when it’s done. This means that AGX Dynamics for Unity won’t know if the update was successful or not.
1.3.1. Manual update¶
The native binaries of AGX Dynamics are loaded into the Unity process. This means that Unity has to be closed before these files can be deleted or modified and that’s why import custom package isn’t supported when AGX Dynamics for Unity already is installed in the project.
Backup any local changes and/or additional files located in the
AGXUnityfolder in the project
Reopen the project in Unity.
Perform Installing the plugin.
This software is dependent on the multi-purpose physics simulation engine AGX Dynamics and requires a valid license to run the simulations. Please contact sales to request an evaluation license or a price quote.
1.4.1. Activate AGX Dynamics for Unity using agx.lic¶
Copy agx.lic to one of AGX Dynamics resource paths, e.g.,
In a built application, AGX Dynamics resource paths are:
Path of the executable.
agx.lic should be placed in one of these directories.