-
- All Implemented Interfaces:
public class UnityServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumUnityServices.UnityServicesError
-
Field Summary
Fields Modifier and Type Field Description private final static BooleanisSupportedprivate final static BooleanisInitializedprivate final static Stringversionprivate static BooleandebugModepublic final static UnityServicesINSTANCE
-
Method Summary
Modifier and Type Method Description final static Unitinitialize(Context context, String gameId, Boolean testMode, IUnityAdsInitializationListener initializationListener)Initializes Unity Ads. final static BooleangetIsSupported()final static BooleangetIsInitialized()final static StringgetVersion()final static BooleangetDebugMode()Get current debug mode status final static UnitsetDebugMode(static Boolean debugMode)Toggles debug mode on/off -
-
Method Detail
-
initialize
final static Unit initialize(Context context, String gameId, Boolean testMode, IUnityAdsInitializationListener initializationListener)
Initializes Unity Ads. Unity Ads should be initialized when app starts.
- Parameters:
context- Current Android application context of calling appgameId- Unique identifier for a game, given by Unity Ads admin tools or Unity editortestMode- If true, only test ads are showninitializationListener- Listener for IUnityAdsInitializationListener callbacks
-
getIsSupported
final static Boolean getIsSupported()
-
getIsInitialized
final static Boolean getIsInitialized()
-
getVersion
final static String getVersion()
-
getDebugMode
final static Boolean getDebugMode()
Get current debug mode status
-
setDebugMode
final static Unit setDebugMode(static Boolean debugMode)
Toggles debug mode on/off
- Parameters:
debugMode- If true, debug mode is on and there will be lots of debug output from Unity Services.
-
-
-
-