Version
- iOS
The Wwise-GME Unity integration requires specific settings for Android.
The plug-in is distributed as a dynamic library. The following table shows the expected paths. Ensure that the various GME libraries are in the appropriate locations.
Platform |
GME libraries |
Path |
---|---|---|
Android |
|
|
In the Assets\GMESDK\Plugins\Android
folder, there are files required
for the Android platform. To
include everything required in the final APK, you must maintain the default folder hierarchy, including the following
files:
AndroidManifest.xml
: Adds the related permissions for GME.
This file is combined with the final Application
AndroidManifest.xml
generated by Unity.
gmesdk.jar
: Dependency Java class library for GME.
libs
folder: Contains the gmesdk.so
dependency.
Use the provided AndroidManifest.xml file as a reference, because permissions should only be requested at runtime according to the Android guidelines.
Refer to Requesting Permissions for Unity-specific instructions.
Because GME native code needs to call the Java API, pass the Application context before the initialization of GME In-Game Voice Chat. We recommend that you do this as early as possible in the game code to avoid a null pointer error during the plug-in initialization. The relevant sample code is available in Assets\GMESDK\GMEInit.cs
:
var jcUnityPlayer = new UnityEngine.AndroidJavaClass("com.unity3d.player.UnityPlayer"); var jcGMESDK = new UnityEngine.AndroidJavaClass("com.gme.GME.GMESDK"); var currentActivity = jcUnityPlayer.GetStatic<UnityEngine.AndroidJavaObject>("currentActivity"); jcGMESDK.CallStatic<int>("setApplicationContext", currentActivity);
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise