Skip to main content

Play with a device

Gamium connection is possible not only on the editor but also on the actual device.

Build

First, build it with the gamium engine sdk included and make an executable file. For example, please create an executable file with the following file extension

PlatformFile Extension
Windows.exe
macOS.app
Android.apk .aab
iOS.ipa

Prepare connect

Port forward

In an environment where the gamium client and the app run on the same device, forward is not required. ( ex. Windows, macOS )

However, mobile devices such as Android and iOS need port forwarding to connect to the network. This will be explained in the following sections.

Android

Device to PC

  • Please connect the Android device and PC with a USB cable, and keep it connected.
  • Please use a USB cable that supports data transfer.
  • Enable Developer Options
  • Enable USB Debugging
  • When the message "Do you want to allow USB debugging?" appears on the Android device screen, always check Allow on this computer and click OK to accept it.

Install adb

You need a tool called adb. If you already have adb installed, you can skip this course. If not please install Android Platform Tools on your PC.

  • Run a shell such as CMD, Terminal, etc. on your PC.

  • Navigate to the decompressed platform tools folder

  • Please check if the connected device comes out when executing the command below

    ./adb devices

    If the output is as shown below, the device connection is successful.

    List of devices attached
    SOMETHING_LIKE_ID device

adb forward

  • Please execute the command below to port forward.

    ./adb forward tcp:50061 tcp:50061
  • Please check whether port forward is completed

    ./adb forward --list

    If it's printed as below, it's done.

    SOMETHING_LIKE_ID tcp:50061 tcp:50061
iOS
caution

iOS devices can only be connected if the PC is macOS.

Device to PC

  • Please connect the iOS device and macOS PC with a USB cable, and keep it connected.
  • Please use a USB cable that supports data transfer.

Install mobiledevice

There may be various methods for iOS port forwarding, but we prefer to use the mobiledevice. If you already have mobiledevice installed, you can skip this course. If not please install mobiledevice on your PC.

  • Run a shell such as Terminal, etc. on your PC.

  • Please check if the connected device comes out when executing the command below

    mobiledevice list_devices

    If the output is as shown below, the device connection is successful.

    SOMETHING_LIKE_ID

mobiledevice forward

  • Please execute the command below to port forward.

    ./mobiledevice tunnel 50061 50061

    If it is printed as below, the forwarding is in progress. Please keep the window without closing the terminal. Closing the window interrupts forwarding.

    Tunneling from local port 50061 to device port 50061...

Connect to the engine

Install the built executables and run them on the machine. (For example, run .exe for Windows, and run the app after installing .apk for Android)

After that, it's the same process that we did at Quickstart

  • Clone the gamium-unity-samples git repository.
  • Open the gamium-unity-samples/client/typescript directory with Visual Studio Code.
  • Open the terminal and execute the following command.
    • This command initializes the automation script project, connects to the running gamium engine, and runs the automation script.
yarn install
yarn run:DoguRpgSample
tip

If the connection is not working properly. Please check the log. The message "Gamium Engine Update Running" should be printed.
The log path for programs built through Unity can be found in here. Check out "Player-related log locations" section