Getting Started

Unity client


  • Unity 2019.04 LTS

First run

Open the UnityClient project by going to the project directory (by default %USERPROFILE%\Hadean\Aether Engine Examples\PhysicsDemo\UnityClient) and double-clicking the main scene file, located in UnityClient\Assets\Scenes/physx-demo.unity:

scene folder

Once opened, the project should look like the screenshot below:

scene view

To test the client you need to have the simulation running in the background:

cd PhysicsDemo\Simulation
aether run

Once the simulation is running, click the play button in the Unity editor to start the client.

If the simulation isn't running while you start the client, an error will appear in the console view on the bottom left of the project window:

connection failure

Otherwise, the client should connect successfully and show a couple of bouncing cubes:

scene view running

Once connected the following controls are available:

  • Left mouse button spawns a cube in random location
  • W, A, S and D move the camera
  • Mouse rotates the camera

While in the Unity editor, a debug view can be enabled which displays the Aether simulation's cells. To enable the debug gizmos view select the Gizmos view in the menu on the top right of the editor view:

scene view debug

Configuring a Script Editor

The UnityClient projects contains multiple C# script files which are used to render the simulation. The Unity editor doesn't have built-in support for changing these files, but lets you configure an external editor. This guide recommends using Visual Studio Community 2019, as it has full and accurate IntelliSense support once configured.

To set up Visual Studio Community 2019 as the script editor:

  1. Install Visual Studio Community 2019

  2. In Visual Studio go to Tools -> Get Tools and Features -> Install "Game development with Unity" Workload.

    visual studio modify install
  3. In Unity go to Editor -> Preferences -> Change the External Script Editor to Visual Studio 2019 (Community). Make sure "Editor Attaching" is selected.

    unity editor external tools dialog
  4. Double clicking on a C# file in Unity will now open Visual Studio with IntelliSense properly configured. To test this, open a script file in Unity for example Assets/Scripts/GameSystem.cs:

    unity editor project scripts
  5. The opened project should look like the following. Notice that there are no errors about missing libraries or unknown references:

    visual studio source view

OpenGL client

For details on building and starting OpenGL client, look at our Getting Started section.

Once the client is started, the following controls are available:

  • left mouse button clicks will cause additional cubes to be spawned
  • mouse movement will rotate the camera position around the origin
  • mouse scrolling and the keys W and S will change the distance of the camera from the origin
  • the A and D keys will move the camera horizontally
  • the SPACE and left Ctrl keys will move the camera vertically
  • the Esc and Q keys will exit the client