Integrating SDK

Last updated: 2021-08-11 10:48:17

    This document describes how to configure a Unity project for the GME APIs for Unity.

    Downloading SDK

    1. Download the applicable demo and SDK. For more information, please see SDK Download Guide.
    2. Locate the SDK resources for Unity on the page.
    3. Click Download. After decompression, the downloaded SDK resources include the following files:
      File Name Description Role
      Plugins SDK library files Stores library files for each platform
      GMESDK SDK code files Provides APIs
    Platforms supported by SDK for Unity

    SDK for Unity has integrated Windows, Mac, Android, and iOS platform architectures at the same time.

    Project Configuration

    Step 1: import Plugins files

    Copy the files from the Plugins folder in the SDK to the folder under Plugins > Assets > Plugins as shown below:


    If you don't need to export executables in the Win32 architecture, delete the x86 folder under the Plugins folder.

    Step 2: import code files

    Copy the files in the Scripts folder in the SDK to the folder used to store code in your Unity project as shown below:

    Audio Settings

    In the Unity editor, go to Edit > Project Settings > Audio and use the default system settings. If you make a change to the settings, Unity playback sound effect will be interrupted due to the hardware buffer set on the iOS device, as shown below:

    Unity Audio Setting

    Please do not set the Audio module in Project Settings.

    If the settings are as follows, Unity playback sound effect will be interrupted due to the hardware buffer set on the iOS device:

    Operations on macOS

    If you use Unity to access the GME SDK on macOS 10.15.x, an error shows that the file is corrupted during the execution due to the attribute.

    The most direct solution is to delete the attribute, as shown below:

    1. Run the cd command in terminal to go to the Unity_OpenSDK_Audio/Assets/Plugins/ folder in the project.
    2. Run the following command.
      $ xattr -d gmesdk.bundle

    This operation is risky. It is recommended to use a lower version of macOS for access.