With the now.gg Utility module for Unity, you can implement the now.gg Utility functions within your game on Unity.
To implement the Utility module:
The now.gg Utility module for Unity is included as a Unity package file nowgg-utility.unitypackage
.
Add the module to your Unity project:
nowgg-utility.unitypackage
that you previously downloaded.Once all the module files have been imported, a folder named ‘NowGGSdk‘ will be added to your project. You can find this folder at the root of the Assets folder.
Note: Please do not modify the NowGGSdk folder, as it contains all the assets related to now.gg Utility module.
The following sections illustrate the implementation of the now.gg Utility module.
Once the now.gg Utility Module has been imported; you can now implement it.
Start by creating a class that contains the now.gg Utility module implementation and attach it to a game object that you can use to call the Utility functions.
The Utility module includes the following methods:
The GetDeviceType()
method lets you detect the user’s device type.
The device types include:
To get the device type, call the GetDeviceType()
method, as illustrated below:
DeviceType deviceType = NowGGUtilitySdkManager.GetInstance().GetDeviceType();
Reference – You can refer to the GetDeviceType reference here.
The OpenUrl()
method lets you open a URL in a new browser window of the user’s device. The following sample code illustrates this implementation.
NowGGUtilitySdkManager.GetInstance().OpenUrl("<your_url_here>");
Reference – You can refer to the OpenUrl() reference here.
The IsRunningOnNowGG
method enables you to identify if your application is running on the now.gg platform or not. The following sample code illustrates this implementation.
NowGGUtilitySdkManager.GetInstance().IsRunningOnNowGG()
true
, If the application is running on now.gg.Reference – You can refer to the IsRunningOnNowGG() reference here.
Utility Module
Utility Module
Document Rev. 1.0