Kongregate Mobile Unity API
Public Member Functions | List of all members
Kongregate.IMobile Interface Reference

This interface handles mobile-specific issues such as UI and opening the Kongregate panel. More...

Public Member Functions

Texture2D ButtonGetTexture ()
 Retrieve a texture for the Kongregate button. More...
 
void ButtonShow ()
 Hides the Kongregate Button if using native rendering.
 
void ButtonHide ()
 Hides the Kongregate button if using native rendering.
 
void ButtonSetX (int x)
 Set the X coordinate of the Kongregate button. More...
 
void ButtonSetY (int y)
 Set the Y coordinate of the Kongregate button. More...
 
void ButtonSetSize (int size)
 Set the size of the Kongregate button. More...
 
void TrackPurchase (string productID, int quantity)
 
Rect ButtonGetRect ()
 Returns the Rect of the Kongregate button. More...
 
bool ButtonIsHidden ()
 Determines if the Kongregate button is hidden. More...
 
bool ButtonIsNativeRendering ()
 Determines if the Kongregate button is being rendered natively. More...
 
void ButtonSetNativeRendering (bool nativeRendering)
 Sets whether native button rendering is enabled. More...
 
void OpenKongregateWindow ()
 Opens the Kongregate window.
 
void CloseKongregateWindow ()
 Close the Kongregate window.
 
void OpenKongregateWindow (string target)
 Opens the Kongregate window to target. More...
 
void OpenKongregateWindow (string target, string id)
 Opens the Kongregate window to a specific item on the target page. More...
 
string GetOpenURL ()
 Return the URL used to open the app when launched using a deep link. More...
 
void Trigger (string name)
 Triggers an event from the game to the Kongregate SDK. More...
 

Detailed Description

This interface handles mobile-specific issues such as UI and opening the Kongregate panel.

Member Function Documentation

◆ ButtonGetRect()

Rect Kongregate.IMobile.ButtonGetRect ( )

Returns the Rect of the Kongregate button.

Returns
The Rect containing the bounds of the button

◆ ButtonGetTexture()

Texture2D Kongregate.IMobile.ButtonGetTexture ( )

Retrieve a texture for the Kongregate button.

Returns
The Texture2D representation of the Kongregate button

◆ ButtonIsHidden()

bool Kongregate.IMobile.ButtonIsHidden ( )

Determines if the Kongregate button is hidden.

Returns
True if the button is hidden

◆ ButtonIsNativeRendering()

bool Kongregate.IMobile.ButtonIsNativeRendering ( )

Determines if the Kongregate button is being rendered natively.

Returns
True if native rendering is enabled

◆ ButtonSetNativeRendering()

void Kongregate.IMobile.ButtonSetNativeRendering ( bool  nativeRendering)

Sets whether native button rendering is enabled.

If enabled, the SDK will handle rendering of the button. Otherwise you must handle drawing and handling clicks on your own.

Parameters
nativeRenderingFlag determining whether native rendering is enabled

◆ ButtonSetSize()

void Kongregate.IMobile.ButtonSetSize ( int  size)

Set the size of the Kongregate button.

Parameters
sizeThe size (32,48,64)

◆ ButtonSetX()

void Kongregate.IMobile.ButtonSetX ( int  x)

Set the X coordinate of the Kongregate button.

Parameters
xThe X coordinate

◆ ButtonSetY()

void Kongregate.IMobile.ButtonSetY ( int  y)

Set the Y coordinate of the Kongregate button.

Parameters
yThe Y coordinate

◆ GetOpenURL()

string Kongregate.IMobile.GetOpenURL ( )

Return the URL used to open the app when launched using a deep link.

The KongregateAPI::KONGREGATE_EVENT_OPEN_DEEP_LINK will be fired as well. Will return null or empty string for standard app launches.

◆ OpenKongregateWindow() [1/2]

void Kongregate.IMobile.OpenKongregateWindow ( string  target)

Opens the Kongregate window to target.

Parameters
targetthe page to open to (e.g. Mobile.TARGET_MORE_GAMES)

◆ OpenKongregateWindow() [2/2]

void Kongregate.IMobile.OpenKongregateWindow ( string  target,
string  id 
)

Opens the Kongregate window to a specific item on the target page.

For example a topic.

Parameters
targetthe page to open to (e.g. Mobile.TOPICS)
idthe id on the page to open to (e.g. 1234)

◆ TrackPurchase()

void Kongregate.IMobile.TrackPurchase ( string  productID,
int  quantity 
)
Deprecated:
use Analytics.FinishPurchase instead

◆ Trigger()

void Kongregate.IMobile.Trigger ( string  name)

Triggers an event from the game to the Kongregate SDK.

Parameters
name

The documentation for this interface was generated from the following file: