How to use RTT4U

To use Real Time Testing for Unity (hereinafter referred to as RTT4U), you must follow the steps below.

  1. Build the RTT Client app (initially once or rebuild as necessary)
  2. Run Unity Editor Play Mode

RTT Client

RTT4U operates by building an app that applies the Hive SDK internally and then running it in the RTT Player, which is an Android emulator.

Therefore, to test any app implemented with the Hive SDK using RTT4U, the app must be built at least once. The built app is referred to as the RTT Client app. The RTT Client runs the Hive SDK Android library on the RTT Player and returns the execution results to the Unity Editor.

 

To build the RTT Client app, the following conditions must be met:

  • Complete all processes from installing and configuring the Hive SDK Unity Android to app development
  • Ensure that Android SDK and NDK are installed so that the app can be built correctly in Unity

 

There are two methods for building the RTT Client app: automatic and manual.

Automatic build (recommended)

The build process is as follows:

  1. Save the Unity project.
  2. Select Hive > RTT4U > Build RTT Client from the menu to start building the RTT Client.
  3. Once the build is complete, RTTClient.apk will be created in UNITY_PROJECT_DIRECTORY/Library/Builds/RTTClient. This is a temporary Unity project for the RTT Client.

 

If you change the contents of hive_config.xml or modify Android dependencies, you must rebuild the RTT Client.

Manual build

If the automatic build takes too long or RTTClient.apk is not created, try a manual build. Before attempting a manual build, check the following:

  1. Ensure that the Hive SDK is properly applied
  2. Confirm that the app can be built correctly in the Unity project

 

The manual build follows the steps below:

  1. Select Hive > RTT4U > Check RTT Client Project Path from the menu.
  2. Look for the log RTTClient Temp Project : {PROJECT_DIRECTORY} in the Unity Editor Console.
  3. Open the project located in PROJECT_DIRECTORY in the Unity Editor. This is a temporary Unity project for the RTT Client.
  4. Build the project directly by selecting File > Build Settings > Build. The project target should be Android.
  5. Resolve any issues that arise during the build.
  6. Apply the solutions found to the original Unity project you were working on.

Running Unity Editor Play Mode

After building the RTT Client app, follow the steps below to test the Hive SDK functionality in Unity Editor Play Mode.

1. Implement Plugin initialization in the Start Scene

Implement the Hive SDK Unity Plugin initialization (HIVEUnityPlugin.InitPlugin) in the Scene that starts the app. Ensure that the initialization code for the Hive SDK Unity Plugin is called after running the RTT Client app.

2. Activate RTT4U

Select Hive > RTT4U > RTT Enable from the menu to activate RTT4U.

3. Open RTTClientWaiter Scene

After saving the currently working Scene, select Hive > RTT4U > Open RTT Client Waiting Scene to open the RTTClientWaiter Scene.

4. Enter Play Mode

Click the Play button in the Unity Editor to enter Play Mode.

5. Wait for the RTT Client app to run

Once you enter Play Mode, the RTT Player and RTT Client app will automatically run. Wait until the RTT Client app is launched.

6. Test Hive SDK functionality

Test the Hive SDK functionality in the desired Scene. For example, in a game app, you can test the Hive SDK functionality in various Scenes such as login, game lobby, store, and battle. The Hive SDK UI will be displayed on the RTT Player, allowing you to test the Hive SDK from the displayed UI and return to the Unity Editor Player Mode to test the app.