public class UnityServices
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UnityServices.UnityServicesError |
| Constructor and Description |
|---|
UnityServices() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
getDebugMode()
Get current debug mode status
|
static java.lang.String |
getVersion() |
static void |
initialize(android.app.Activity activity,
java.lang.String gameId,
IUnityServicesListener listener,
boolean testMode,
boolean enablePerPlacementLoad)
Initializes Unity Ads.
|
static boolean |
isInitialized() |
static boolean |
isSupported() |
static void |
setDebugMode(boolean debugMode)
Toggles debug mode on/off
|
public static void initialize(android.app.Activity activity,
java.lang.String gameId,
IUnityServicesListener listener,
boolean testMode,
boolean enablePerPlacementLoad)
activity - Current Android activity of calling appgameId - Unique identifier for a game, given by Unity Ads admin tools or Unity editorlistener - Listener for IUnityAdsListener callbackstestMode - If true, only test ads are shownenablePerPlacementLoad - If true, disables automatic requests, and allows the load() function to request placements insteadpublic static boolean isSupported()
public static boolean isInitialized()
public static java.lang.String getVersion()
public static void setDebugMode(boolean debugMode)
debugMode - If true, debug mode is on and there will be lots of debug output from Unity Services. If false, there will be only some short log messages from Unity Services.public static boolean getDebugMode()