Plugin for using GamePush in Unity games
Development and support of the current version of GamePush Unity plugin - Sceef
Creators of early versions of GamePush Unity plugin - Aristarkh Abramovsky , Dinar Shagidullin
Latest version of GamePush Unity plugin:
GamePush unitypackage
Examples for GamePush plugin modules:
GP_Examples
GamePush Web Template:
GP_Template
English and Russian tutorials
https://docs.gamepush.com/docs/get-start/
https://docs.gamepush.com/ru/docs/get-start/
Native UI overlays (Android / Windows)
On WebGL the GamePush JS SDK draws the achievement, leaderboard, chat, document, game collection,
feedback and confirm screens itself. On Android and Windows there is no JS SDK, so the plugin ships
its own uGUI screens and fetches the data straight from the GamePush GraphQL API.
Nothing changes in your code: GP_Achievements.Open(), GP_Channels.OpenChat(),
GP_Leaderboard.Open(), GP_Documents.Open(), GP_GamesCollections.Open(), GP_Feedbacks.Open()
and GP_Windows.ShowConfirm() now show a real screen instead of writing to the console.
Tools/GamePush → Native plugin :
Toggle
Effect
UI overlays
Turns the native screens on. Off restores the previous no-op behaviour.
Pause game on overlay
Sets Time.timeScale to 0 while any overlay is open, like ads do.
Open Configure next to UI overlays in Tools/GamePush. The window edits the shared
GP_OverlaySkin, previews all
screens with local mock data and can rebuild one or all generated prefabs. Preview does not call the
native API. The screens use TextMeshPro; import TMP Essential Resources before rebuilding.
Rebuild actions live in this window and overwrite only
Assets/Plugins/GamePush/Resources/GamePush/Overlays/.
All generated screens share one modular shell, component factory and GP_OverlaySkin. Changing the
palette, font, sprites, spacing or control states in the settings window applies the same design
tokens to every default overlay on the next rebuild.
Template — edit Resources/GamePush/GP_OverlaySkin.asset in the overlay settings window.
Custom prefab — select an overlay and press Create and assign custom copy . The copy is
stored at a project-owned path and assigned as customPrefab; rebuilding defaults neither
overwrites the copy nor clears its assignment. Keep the view's serialized references connected.
Runtime override — supply a prefab from code:
GP_Overlays .SetPrefab (GP_OverlayKind .Achievements , myPrefab );
GP_Overlays also exposes Open, Close, CloseTop, CloseAll, IsOpen, IsAnyOpen and the
OnOpen / OnClose / OnAnyOpenChanged events.
Panels are sized against the safe area rather than a fixed rectangle. Portrait uses a tall Compact
panel; desktop and sufficiently wide mobile landscape viewports use a bounded Wide panel. The mode
is selected from the final panel aspect, so resizing a desktop window and rotating a phone follow
the same rules.
Compact moves achievement groups to a horizontal strip, derives game/achievement grid columns from
available width, hides only dynamic leaderboard columns and swaps Chat/Feedbacks master-detail
panels at full width. Wide shows the achievement rail, extra leaderboard fields, channel members
beside chat messages and the feedback thread beside its list. Chat and Feedbacks composers account
for the mobile soft keyboard.
The GraphQL API exposes no subscription token for chat channels, so new messages are picked up by
re-reading the newest page every few seconds. NativeChannelsRealtime.Watch / Stop is the seam:
switching to a real Centrifugo subscription later only touches that file.
Assets/GP_Examples/NativeOverlays/NativeOverlaysDemo.cs — drop it on any GameObject to get a
launcher for every overlay plus a button that forces the screen orientation, which is the fastest
way to check both layouts on a device.
Play2Web — test the web SDK right in the Editor (beta)
Normally ads, purchases, the auth window and other GamePush popups can only be checked in a WebGL
build uploaded to the GamePush panel. Play2Web removes that loop: it runs the real GamePush JS SDK
in dev mode (isDev) next to the Unity Editor and draws its UI as a transparent overlay on top of
the Game view. Your game keeps running in Play Mode, while SDK calls go to the live SDK and
its windows (rewarded / fullscreen ads, purchase dialogs, popups) appear right over the game — no
WebGL build needed.
Any of these opens the Play2Web window:
Tools/GamePush → Editor Settings → Open Play2Web
Edit/Project Settings/GamePush → Editor → Open Play2Web
Add http://127.0.0.1:<port>/ as a test origin in the GamePush panel for your project. The
port is shown in the Play2Web window (default 8765; if it is busy, a free one is picked).
Press Play Test in the Play2Web window. The regular Play button does not start Play2Web.
Stop ends the session, Restart Play Test restarts it.
Play Test always boots the AwaitInit scene (build index 0), even if another scene is open; if the
scene is missing from Build Settings it is added as index 0. The scene opened in the Editor stays
as is.
The window shows the session state (Playing / Ready / Overlay), port, WebGL template, init scene
status and a log, which is the first place to look if something does not start.
A local HTTP server on 127.0.0.1 serves a page composed from your WebGL template plus a small
Unity bridge script (Temp/GamePushPlay2Web/www).
The page is shown in a separate borderless browser window glued to the Game view: WebView2 on
Windows, WKWebView on macOS. A separate process means a browser fault cannot crash the Editor.
The page background is transparent, so only the SDK UI is visible over the game.
Windows (WebView2 Runtime) or macOS. On macOS the overlay host is compiled locally on first run
and needs Xcode Command Line Tools: xcode-select --install.
The test origin above added in the GamePush panel.
Achievements documentation
Method name
Method parameters
Return value
Open
Action onOpen = null, Action onClose = null
void
Fetch
void
void
Unlock
string idOrTag, Action<string> onUnlock = null, Action<string> onUnlockError = null
void
SetProgress
string idOrTag, int progress, Action<string> onProgress = null, Action onProgressError = null
void
Has
string idOrTag
void
GetProgress
string idOrTag
void
Action name
Return value
OnAchievementsOpen
void
OnAchievementsClose
void
OnAchievementsFetch
List <AchievementsFetch>
OnAchievementsFetchError
void
OnAchievementsFetchGroups
List<AchievementsFetchGroups>
OnAchievementsFetchPlayer
List<AchievementsFetchGroups>
OnAchievementsUnlock
string
OnAchievementsUnlockError
string
OnAchievementsProgress
string
OnAchievementsProgressError
void
public class AchievementsFetch
{
public int id ;
public string tag ;
public string name ;
public string description ;
public string icon ;
public string iconSmall ;
public string lockedIcon ;
public string lockedIconSmall ;
public string rare ;
public int maxProgress ;
public int progressStep ;
public bool lockedVisible ;
public bool lockedDescriptionVisible ;
}
public class AchievementsFetchGroups
{
public int id ;
public string tag ;
public string name ;
public string description ;
public int [] achievements ;
}
public class AchievementsFetchPlayer
{
public int achievementId ;
public string createdAt ;
public int progress ;
public bool unlocked ;
}
Ads documentation
Method name
Method parameters
Return value
ShowFullscreen
Action onFullscreenStart = null, Action<bool> onFullscreenClose = null
void
ShowRewarded
string idOrTag = "COINS", Action<string> onRewardedReward = null, Action onRewardedStart = null, Action<bool> onRewardedClose = null
void
ShowPreloader
Action onPreloaderStart = null, Action<bool> onPreloaderClose = null
void
ShowSticky
void
void
CloseSticky
void
void
RefreshSticky
void
void
IsAdblockEnabled
void
bool
IsStickyAvailable
void
bool
IsFullscreenAvailable
void
bool
IsRewardedAvailable
void
bool
IsPreloaderAvailable
void
bool
IsStickyPlaying
void
bool
IsFullscreenPlaying
void
bool
IsRewardPlaying
void
bool
IsPreloaderPlaying
void
bool
IsCountdownOverlayEnabled
void
bool
IsRewardedFailedOverlayEnabled
void
bool
CanShowFullscreenBeforeGamePlay
void
bool
Action name
Return value
OnAdsStart
void
OnAdsClose
bool
OnFullscreenStart
void
OnFullscreenClose
bool
OnPreloaderStart
void
OnPreloaderClose
bool
OnRewardedStart
void
OnRewardedClose
bool
OnRewardedReward
string
OnStickyStart
void
OnStickyClose
void
OnStickyRefresh
void
OnStickyRender
void
Analytics documentation
Method name
Method parameters
Return value
Hit
string url
void
Goal
string eventName, string value
void
Goal
string eventName, int value
void
Application documentation
Method name
Method parameters
Return value
Title
void
string
Description
void
string
GetImage
Image image
void
ImageUrl
void
string
Url
void
string
ReviewRequest
Action<int> onReviewResult = null, Action<string> onReviewClose = null
void
IsAlreadyReviewed
void
bool
CanReview
void
bool
AddShortcut
Action<bool> onAddShortcut = null
void
CanAddShortcut
void
bool
Action name
Return value
OnReviewResult
int
OnReviewClose
string
OnAddShortcut
bool
Method name
Method parameters
Return value
Current
void
string
Change
GeneratorType generator
void
Action name
Return value
OnChange
string
public enum GeneratorType : byte
{
dicebear_retro ,
dicebear_identicon ,
dicebear_human ,
dicebear_micah ,
dicebear_bottts ,
icotar ,
robohash_robots ,
robohash_cats ,
}
Channels documentation
Channels (and multiplayer rooms built on them) live in regional hubs: AUTO, RU, EU, NA,
APAC. Set location in FetchChannelsFilter / FetchMoreChannelsFilter to search a single hub;
leave it empty to search all hubs. GP_Player.GetLocation() returns the hub the SDK picked for the
current player (empty before SDK initialization).
var filter = new FetchChannelsFilter { location = GP_Player .GetLocation () };
GP_Channels .FetchChannels (filter );
Method name
Method parameters
Return value
OpenChat
Action onOpen = null, Action onClose = null, Action onOpenError = null
void
OpenChat
int channel_ID, string tags, Action onOpen = null, Action onClose = null, Action onOpenError = null
void
OpenPersonalChat
int player_ID, string tags, Action onOpen = null, Action onClose = null, Action onOpenError = null
void
OpenFeed
int player_ID, string tags, Action onOpen = null, Action onClose = null, Action onOpenError = null
void
IsMainChatEnabled
void
bool
MainChatId
void
int
Join
int channel_ID
void
Join
int channel_ID, string password
void
CancelJoin
int channel_ID
void
Leave
int channel_ID
void
Kick
int channel_ID, int player_ID
void
Mute
int channel_ID, int player_ID, int seconds
void
Mute
int channel_ID, int player_ID, string unmuteAT
void
UnMute
int channel_ID, int player_ID
void
SendInvite
int channel_ID, int player_ID
void
CancelInvite
int channel_ID, int player_ID
void
AcceptInvite
int channel_ID
void
RejectInvite
int channel_ID
void
FetchInvites
int limit = 50, int offset = 0
void
FetchMoreInvites
int limit = 50
void
FetchChannelInvites
int channel_ID, int limit = 50, int offset = 0
void
FetchMoreChannelInvites
int channel_ID, int limit = 50
void
FetchSentInvites
int channel_ID, int limit = 50, int offset = 0
void
FetchMoreSentInvites
int channel_ID, int limit = 50
void
AcceptJoinRequest
int channel_ID, int player_ID
void
RejectJoinRequest
int channel_ID, int player_ID
void
FetchJoinRequests
int channel_ID, int limit = 50, int offset = 0
void
FetchMoreJoinRequests
int channel_ID, int limit = 50
void
FetchSentJoinRequests
int limit = 50, int offset = 0
void
FetchMoreSentJoinRequests
int limit = 50
void
SendMessage
int channel_ID, string text, string tags = ""
void
SendPersonalMessage
int player_ID, string text, string tags = ""
void
SendFeedMessage
int player_ID, string text, string tags = ""
void
EditMessage
string message_ID, string text
void
DeleteMessage
string message_ID
void
FetchMessages
int channel_ID, string tags, int limit = 50, int offset = 0
void
FetchPersonalMessages
int player_ID, string tags, int limit = 50, int offset = 0
void
FetchFeedMessages
int player_ID, string tags, int limit = 50, int offset = 0
void
FetchMoreMessages
int channel_ID, string tags, int limit = 50
void
FetchMorePersonalMessages
int player_ID, string tags, int limit = 50
void
FetchMoreFeedMessages
int player_ID, string tags, int limit = 50
void
DeleteChannel
int channel_ID
void
FetchChannel
int channel_ID
void
CreateChannel
CreateChannelFilter filter
void
UpdateChannel
UpdateChannelFilter filter
void
FetchChannels
FetchChannelsFilter filter — filter.location selects a regional hub
void
FetchMoreChannels
FetchMoreChannelsFilter filter — filter.location selects a regional hub
void
FetchMembers
FetchMembersFilter filter
void
FetchMoreMembers
FetchMoreMembersFilter filter
void
Action name
Return value
OnCreateChannel
CreateChannelData
OnCreateChannelError
void
OnUpdateChannel
UpdateChannelData
OnUpdateChannelError
void
OnDeleteChannelSuccess
void
OnCreateChannel
int
OnDeleteChannelError
void
OnFetchChannel
FetchChannelData
OnFetchChannelError
void
OnFetchChannels
List<FetchChannelData>, bool
OnFetchChannelsError
void
OnFetchMoreChannels
List<FetchChannelData>, bool
OnFetchMoreChannelsError
void
OnJoinSuccess
void
OnJoinEvent
GP_Data
OnJoinError
void
OnJoinRequest
GP_Data
OnCancelJoinSuccess
void
OnCancelJoinEvent
CancelJoinData
OnCancelJoinError
void
OnLeaveSuccess
void
OnLeaveEvent
MemberLeaveData
OnLeaveError
void
OnKick
void
OnKickError
void
OnFetchMembers
GP_Data, bool
OnFetchMembersError
void
OnFetchMoreMembers
GP_Data, bool
OnFetchMoreMembersError
void
OnMuteSuccess
void
OnMuteEvent
MuteData
OnMuteError
void
OnUnmuteSuccess
void
OnUnmuteEvent
UnmuteData
OnUnmuteError
void
OnSendInvite
void
OnSendInviteError
void
OnInvite
InviteData
OnCancelInviteSuccess
void
OnCancelInviteEvent
CancelInviteData
OnCancelInviteError
void
OnAcceptInvite
void
OnAcceptInviteError
void
OnRejectInviteSuccess
void
OnRejectInviteEvent
RejectInviteData
OnRejectInviteError
void
OnFetchInvites
GP_Data, bool
OnFetchInvitesError
void
OnFetchMoreInvites
GP_Data, bool
OnFetchMoreInvitesError
void
OnFetchChannelInvites
GP_Data, bool
OnFetchChannelInvitesError
void
OnFetchMoreChannelInvites
GP_Data, bool
OnFetchMoreChannelInvitesError
void
OnFetchSentInvites
GP_Data, bool
OnFetchSentInvitesError
void
OnFetchMoreSentInvites
GP_Data, bool
OnFetchMoreSentInvitesError
void
OnAcceptJoinRequest
void
OnAcceptJoinRequestError
void
OnRejectJoinRequestSuccess
void
OnRejectJoinRequestEvent
RejectJoinRequestData
OnRejectJoinRequestError
void
OnFetchJoinRequests
GP_Data, bool
OnFetchJoinRequestsError
void
OnFetchMoreJoinRequests
GP_Data, bool
OnFetchMoreJoinRequestsError
void
OnFetchSentJoinRequests
List<JoinRequestsData>, bool
OnFetchSentJoinRequestsError
void
OnFetchMoreSentJoinRequests
List<JoinRequestsData>, bool
OnFetchMoreSentJoinRequestsError
void
OnSendMessage
GP_Data
OnSendMessageError
void
OnMessage
GP_Data
OnEditMessageSuccess
GP_Data
OnEditMessageEvent
MessageData
OnEditMessageError
void
OnDeleteMessageSuccess
void
OnDeleteMessageEvent
MessageData
OnDeleteMessageError
void
OnFetchMessages
GP_Data, bool
OnFetchMessagesError
void
OnFetchPersonalMessages
GP_Data, bool
OnFetchPersonalMessagesError
void
OnFetchFeedMessages
GP_Data, bool
OnFetchFeedMessagesError
void
OnFetchMoreMessages
GP_Data, bool
OnFetchMoreMessagesError
void
OnFetchMorePersonalMessages
GP_Data, bool
OnFetchMorePersonalMessagesError
void
OnFetchMoreFeedMessages
GP_Data, bool
OnFetchMoreFeedMessagesError
void
OnOpenChat
void
OnOpenChatError
void
OnCloseChat
void
public class CreateChannelData
{
public int id ;
public string [] tags ;
public string [] messageTags ;
public int templateId ;
public int capacity ;
public int ownerId ;
public string name ;
public string description ;
public bool ch_private ;
public bool visible ;
public bool permanent ;
public bool hasPassword ;
public bool isJoined ;
public bool isRequestSent ;
public bool isInvited ;
public bool isMuted ;
public string password ;
public int membersCount ;
public OwnerAcl ownerAcl ;
public MemberAcl memberAcl ;
public GuestAcl guestAcl ;
}
public class UpdateChannelData
{
public int id ;
public string [] tags ;
public string [] messageTags ;
public int channelId ;
public int capacity ;
public int ownerId ;
public string name ;
public string description ;
public bool ch_private ;
public bool visible ;
public bool permanent ;
public bool hasPassword ;
public bool isJoined ;
public bool isRequestSent ;
public bool isInvited ;
public bool isMuted ;
public string password ;
public int membersCount ;
public OwnerAcl ownerAcl ;
public MemberAcl memberAcl ;
public GuestAcl guestAcl ;
}
public class FetchChannelData
{
public int id ;
public string [] tags ;
public string [] messageTags ;
public int templateId ;
public int projectId ;
public int capacity ;
public int ownerId ;
public string name ;
public string description ;
public bool ch_private ;
public bool visible ;
public bool permanent ;
public bool hasPassword ;
public string password ;
public bool isJoined ;
public bool isInvited ;
public bool isMuted ;
public bool isRequestSent ;
public int membersCount ;
public OwnerAcl ownerAcl ;
public MemberAcl memberAcl ;
public GuestAcl guestAcl ;
}
public class JoinRequestsData
{
public FetchChannelData channel ;
public string date ;
}
public class MessageData
{
public string id ;
public int channelId ;
public int authorId ;
public string text ;
public string [] tags ;
public string createdAt ;
}
public class CancelJoinData
{
public int channelId ;
public int playerId ;
}
public class MemberLeaveData
{
public int channelId ;
public int playerId ;
public string reason ;
}
public class MuteData
{
public int channelId ;
public int playerId ;
public string unmuteAt ;
}
public class UnmuteData
{
public int channelId ;
public int playerId ;
}
public class InviteData
{
public int channelId ;
public int playerFromId ;
public int playerToId ;
public string date ;
}
public class CancelInviteData
{
public int channelId ;
public int playerFromId ;
public int playerToId ;
}
public class RejectInviteData
{
public int channelId ;
public int playerFromId ;
public int playerToId ;
}
public class RejectJoinRequestData
{
public int channelId ;
public int playerId ;
}
public class CreateChannelFilter
{
public CreateChannelFilter (int Template_ID )
{
template = Template_ID ;
}
public int template ;
public string [] tags ;
public int capacity ;
public string name ;
public string description ;
public bool ch_private ;
public bool visible ;
public string password ;
public OwnerAcl ownerAcl ;
public MemberAcl memberAcl ;
public GuestAcl guestAcl ;
}
public class UpdateChannelFilter
{
public UpdateChannelFilter (int Channel_ID )
{
channelId = Channel_ID ;
}
public int channelId ;
public string [] tags ;
public int capacity ;
public string name ;
public string description ;
public bool ch_private ;
public bool visible ;
public string password ;
public int ownerId ;
public OwnerAcl ownerAcl ;
public MemberAcl memberAcl ;
public GuestAcl guestAcl ;
}
public class FetchChannelsFilter
{
public int [] ids ;
public string [] tags ;
public string search ;
public string location ; // regional hub: AUTO, RU, EU, NA, APAC; empty = all hubs
public bool onlyJoined = false;
public bool onlyOwned = false;
public int limit = 100 ;
public int offset = 0 ;
}
public class FetchMoreChannelsFilter
{
public int [] ids ;
public string [] tags ;
public string search ;
public string location ; // regional hub: AUTO, RU, EU, NA, APAC; empty = all hubs
public bool onlyJoined = false;
public bool onlyOwned = false;
public int limit ;
}
public class FetchMembersFilter
{
public FetchMembersFilter (int Channel_ID )
{
channelId = Channel_ID ;
}
public int channelId ;
public string search ;
public bool onlyOnline = false;
public int limit = 100 ;
public int offset = 0 ;
}
public class FetchMoreMembersFilter
{
public FetchMoreMembersFilter (int Channel_ID )
{
channelId = Channel_ID ;
}
public int channelId ;
public string search ;
public bool onlyOnline = false;
public int limit = 100 ;
}
public class OwnerAcl
{
public bool canViewMessages = true;
public bool canAddMessage = true;
public bool canEditMessage = true;
public bool canDeleteMessage = true;
public bool canViewMembers = true;
public bool canInvitePlayer = true;
public bool canKickPlayer = true;
public bool canAcceptJoinRequest = true;
public bool canMutePlayer = true;
}
public class MemberAcl
{
public bool canViewMessages = true;
public bool canAddMessage = true;
public bool canEditMessage = true;
public bool canDeleteMessage = true;
public bool canViewMembers = true;
public bool canInvitePlayer = false;
public bool canKickPlayer = false;
public bool canAcceptJoinRequest = false;
public bool canMutePlayer = false;
}
public class GuestAcl
{
public bool canViewMessages = false;
public bool canAddMessage = false;
public bool canEditMessage = false;
public bool canDeleteMessage = false;
public bool canViewMembers = false;
public bool canInvitePlayer = false;
public bool canKickPlayer = false;
public bool canAcceptJoinRequest = false;
public bool canMutePlayer = false;
}
Method name
Method parameters
Return value
Call
string name, string args = null
void
Value
string path
string
Return
string name, string args = null
string
AsyncReturn
string name, string args = null, Action<string> onCustomAsyncReturn = null, Action<string> onCustomAsyncError = null
void
Action name
Return value
OnCustomAsyncReturn
string
OnCustomAsyncError
string
Device documentation
Method name
Method parameters
Return value
IsMobile
void
bool
IsDesktop
void
bool
IsPortrait
void
bool
Action name
Return value
OnChangeOrientation
void
Documents documentation
Method name
Method parameters
Return value
Open
Action onDocumentsOpen = null, Action onDocumentsClose = null
void
Fetch
Action<string> onFetchSuccess = null, Action onFetchError = null
void
Action name
Return value
OnDocumentsOpen
void
OnDocumentsClose
void
OnFetchSuccess
string
OnFetchError
void
Events documentation
Method name
Method parameters
Return value
Join
string idOrTag
void
List
void
EventData[]
ActiveList
void
PlayerEvents[]
GetEvent
string idOrTag
EventData
IsActive
string idOrTag
bool
IsJoined
string idOrTag
bool
Action name
Return value
OnEventJoin
PlayerEvents
OnEventJoinError
string
public class EventData
{
public int id ;
public string tag ;
public string name ;
public string description ;
public string icon ;
public string iconSmall ;
public string dateStart ;
public string dateEnd ;
public bool isActive ;
public int timeLeft ;
public bool isAutoJoin ;
public TriggerData [] triggers ;
}
public class PlayerEvents
{
public int eventId ;
public EventStats stats ;
}
public class EventStats
{
public int activeDays ;
public int activeDaysConsecutive ;
}
Experiments documentation
Method name
Method parameters
Return value
Map
void
string
Has
string tag, string cohort
bool
Files documentation
Method name
Method parameters
Return value
Upload
string tags, Action<FileData> onUpload = null, Action onUploadError = null
void
UploadUrl
string url, string filename = "", string tags = "", Action<FileData> onUploadUrl = null, Action onUploadUrlError = null
void
UploadContent
string content, string filename, string tags, Action<FileData> onUploadContent = null, Action onUploadContentError = null
void
LoadContent
sstring url, Action<string> onLoadContent = null, Action onLoadContentError = null
void
ChooseFile
string type, Action<string> onFileChoose = null, Action onFileChooseError = null
void
Fetch
FilesFetchFilter filter = null, Action<List<FileData>, bool> onFetch = null, Action onFetchError = null
void
FetchMore
FilesFetchMoreFilter filter = null, Action<List<FileData>, bool> onFetchMore = null, Action onFetchMoreError = null
void
Action name
Return value
OnUploadSuccess
FileData
OnUploadError
void
OnUploadUrlSuccess
FileData
OnUploadUrlError
void
OnUploadContentSuccess
FileData
OnUploadContentError
void
OnUploadContentSuccess
FileData
OnUploadContentError
void
OnChooseFile
string
OnChooseFileError
void
OnLoadContent
string
OnLoadContentError
void
OnFetchSuccess
List<FileData>, bool
OnFetchError
void
OnFetchMoreSuccess
List<FileData>, bool
OnFetchMoreError
void
public class FileData
{
public string id ;
public int playerId ;
public string name ;
public string src ;
public float size ;
public string [] tags ;
}
public class FilesFetchFilter
{
public string [] tags ;
public int playerId ;
public int limit = 10 ;
public int offset = 0 ;
}
public class FilesFetchMoreFilter
{
public string [] tags ;
public int playerId ;
public int limit = 10 ;
}
Fullscreen documentation
Method name
Method parameters
Return value
Open
Action onFullscreenOpen = null
void
Close
Action onFullscreenClose = null
void
Toggle
void
void
IsFullscreen
void
bool
On Android and Windows this maps to Screen.fullScreen; handheld platforms always report true
since they have no windowed mode.
Action name
Return value
OnFullscreenOpen
void
OnFullscreenClose
void
OnFullscreenChange
void
Game documentation
Method name
Method parameters
Return value
IsPaused
void
bool
Pause
Action onPause = null
void
Resume
Action onResume = null
void
GameplayStart
void
void
GameplayStop
void
void
GameReady
void
void
HappyTime
void
void
Action name
Return value
OnPause
void
OnResume
void
GamesCollections documentation
Method name
Method parameters
Return value
Open
tring idOrTag, Action onGamesCollectionsOpen = null, Action onGamesCollectionsClose = null
void
Fetch
string idOrTag, Action<string, GamesCollectionsFetchData> onFetchSuccess = null, Action onFetchError = null
void
Action name
Return value
OnGamesCollectionsOpen
void
OnGamesCollectionsClose
void
OnGamesCollectionsFetch
string, GamesCollectionsFetchData
OnGamesCollectionsFetchError
void
public class GamesCollectionsFetchData
{
public int id ;
public string tag ;
public string name ;
public string description ;
public Games [] games ;
}
public class Games
{
public int id ;
public string name ;
public string description ;
public string icon ;
public string url ;
}
Images documentation
Method name
Method parameters
Return value
Choose
Action<string> onImagesChooseFile = null, Action<string> onImagesChooseError = null
void
Upload
string[] tags = null, Action<ImageData> onImagesUploadSuccess = null, Action<string> onImagesUploadError = null
void
UploadUrl
string url, string[] tags = null, Action<ImageData> onImagesUploadUrlSuccess = null, Action<string> onImagesUploadUrlError = null
void
Fetch
ImagesFetchFilter filter = null, Action<List<ImageData>> onImagesFetchSuccess = null, Action<string> onImagesFetchError = null
void
FetchMore
ImagesFetchFilter filter = null, Action<List<ImageData>> onImagesFetchSuccess = null, Action<string> onImagesFetchError = null
void
Resize
ImageResizeData resizeData = null, Action<string> onImagesResize = null, Action<string> onImagesResizeError = null
void
Resize
ImageResizeData resizeData = null, Action<string> onImagesResize = null, Action<string> onImagesResizeError = null
void
FormatToPng
string url
string
FormatUrl
string url, string format
string
Action name
Return value
OnImagesFetchSuccess
List<ImageData>
OnImagesFetchError
string
OnImagesCanLoadMore
bool
OnImagesUploadSuccess
ImageData
OnImagesUploadError
string
OnImagesUploadUrlSuccess
ImageData
OnImagesUploadUrlError
string
OnImagesChooseFile
string
OnImagesChooseError
string
OnImagesResize
string
OnImagesResizeError
string
public class ImageData
{
public string id ;
public int playerId ;
public string src ;
public string [] tags ;
public int width ;
public int height ;
}
public class ImageResizeData
{
public string url ;
public int width = 256 ;
public int height = 256 ;
public bool cutBySize = true;
}
public class ImagesFetchFilter
{
public string [] tags ;
public int playerId ;
public int limit = 10 ;
public int offset = 0 ;
}
Language documentation
Method name
Method parameters
Return value
Current
void
Language
Change
Language lang, Action<Language> onLanguageChange = null
void
Action name
Return value
OnChangeLanguage
Language
public enum Language : byte
{
English ,
Russian ,
Turkish ,
French ,
Italian ,
German ,
Spanish ,
Chineese ,
Portuguese ,
Korean ,
Japanese ,
Arab ,
Hindi ,
Indonesian ,
}
Leaderboard documentation
Method name
Method parameters
Return value
Open
string orderBy = "score", Order order = Order.DESC, int limit = 10, int showNearest = 5, WithMe withMe = WithMe.none, string includeFields = "", string displayFields = ""
void
Fetch
string tag = "", string orderBy = "score", Order order = Order.DESC, int limit = 10, int showNearest = 0, WithMe withMe = WithMe.none, string includeFields = ""
void
FetchPlayerRating
string tag = "", string orderBy = "score", Order order = Order.DESC
void
Action name
Return value
OnFetchSuccess
string, GP_Data
OnFetchTopPlayers
string, GP_Data
OnFetchAbovePlayers
string, GP_Data
OnFetchSuccess
string, GP_Data
OnFetchBelowPlayers
string, GP_Data
OnFetchPlayer
string, GP_Data
OnFetchError
void
OnFetchPlayerRatingSuccess
string, int
OnFetchPlayerRatingError
void
OnLeaderboardOpen
void
OnLeaderboardClose
void
public enum Order : byte
{
DESC ,
ASC
}
public enum WithMe : byte
{
none ,
first ,
last
}
Scoped Leaderboard documentation
Method name
Method parameters
Return value
Open
string idOrTag = "", string variant = "some_variant", Order order = Order.DESC, int limit = 10, int showNearest = 5, string includeFields = "", string displayFields = "", WithMe withMe = WithMe.first
void
Fetch
string idOrTag = "", string variant = "some_variant", Order order = Order.DESC, int limit = 10, int showNearest = 5, string includeFields = "", WithMe withMe = WithMe.none
void
PublishRecord
string idOrTag = "", string variant = "some_variant", bool Override = true, string key1 = "", int record_value1 = 0, string key2 = "", int record_value2 = 0, string key3 = "", int record_value3 = 0
void
FetchPlayerRating
string idOrTag = "", string variant = "some_variant", string includeFields = ""
void
Action name
Return value
OnFetchSuccess
string, GP_Data
OnFetchTopPlayers
string, GP_Data
OnFetchAbovePlayers
string, GP_Data
OnFetchSuccess
string, GP_Data
OnFetchBelowPlayers
string, GP_Data
OnFetchPlayer
string, GP_Data
OnFetchTagVariant
string, string, GP_Data
OnFetchError
void
OnFetchPlayerRating
string, int
OnFetchPlayerRatingTagVariant
string, string, int
OnFetchPlayerRatingError
void
OnOpen
void
OnClose
void
OnPublishRecordComplete
void
OnPublishRecordError
void
Payments documentation
Method name
Method parameters
Return value
Fetch
void
void
Purchase
string idOrTag, Action<string> onPurchaseSuccess = null, Action onPurchaseError = null
void
Consume
string idOrTag, Action<string> onConsumeSuccess = null, Action onConsumeError = null
void
IsPaymentsAvailable
void
bool
IsSubscriptionsAvailable
void
bool
Subscribe
string idOrTag, Action<string> onSubscribeSuccess = null, Action onSubscribeError = null
void
Unsubscribe
string idOrTag, Action<string> onUnsubscribeSuccess = null, Action onUnsubscribeError = null
void
Action name
Return value
OnFetchProducts
List<FetchProducts>
OnFetchProductsError
void
OnFetchPlayerPurchases
List<FetchPlayerPurchases>
OnPurchaseSuccess
string
OnPurchaseError
void
OnConsumeSuccess
string
OnConsumeError
void
OnSubscribeSuccess
string
OnSubscribeError
void
OnUnsubscribeSuccess
string
OnUnsubscribeError
void
public class FetchProducts
{
public int id ;
public string tag ;
public string name ;
public string description ;
public string icon ;
public string iconSmall ;
public int price ;
public string currency ;
public string currencySymbol ;
public bool isSubscription ;
public int period ;
public int trialPeriod ;
}
public class FetchPlayerPurchases
{
public string tag ;
public int productId ;
public string payload ;
public string createdAt ;
public string expiredAt ;
public bool gift ;
public bool subscribed ;
}
Platform documentation
Method name
Method parameters
Return value
Type
void
Platform
TypeAsString
void
string
HasIntegratedAuth
void
bool
IsExternalLinksAllowed
void
bool
IsBackendAllowed
void
bool
IsChatAvailable
void
bool
public enum Platform : byte
{
None = 0 ,
YANDEX = 1 ,
VK = 2 ,
CRAZY_GAMES = 3 ,
GAME_DISTRIBUTION = 4 ,
GAME_MONETIZE = 5 ,
OK = 6 ,
SMARTMARKET = 7 ,
GAMEPIX = 8 ,
POKI = 9 ,
VK_PLAY = 10 ,
WG_PLAYGROUND = 11 ,
KONGREGATE = 12 ,
GOOGLE_PLAY = 13 ,
PLAYDECK = 14 ,
CUSTOM = 15
}
Player documentation
Method name
Method parameters
Return value
GetID
void
int
GetScore
void
float
GetName
void
string
GetAvatarUrl
void
string
GetLocation
void — current regional hub : AUTO, RU, EU, NA, APAC
string
GetAvatar
Image image
void
GetFieldName
string key
string
GetFieldVariantName
string key, string value
string
GetFieldVariantAt
string key, int index
string
GetFieldVariantIndex
string key, string value
string
SetName
string name
void
SetAvatar
string src
void
SetScore
float score
void
SetScore
int score
void
AddScore
float score
void
AddScore
int score
void
GetInt
string key
int
GetFloat
string key
float
GetString
string key
string
GetBool
string key
bool
Set
string key, string value
void
Set
string key, int value
void
Set
string key, bool value
void
Set
string key, float value
void
SetFlag
string key, bool value
void
Add
string key, float value
void
Add
string key, int value
void
Toggle
string key
void
ResetPlayer
void
void
Remove
void
void
Load
void
void
Sync
bool forceOverride = false
void
Login
void
void
Logout
void
void
FetchFields
Action<List<PlayerFetchFieldsData>> onFetchFields = null
void
Has
string key
bool
IsLoggedIn
void
bool
HasAnyCredentials
void
bool
IsStub
void
bool
GetActiveDays
void
int
GetActiveDaysConsecutive
void
int
GetPlaytimeToday
void
int
GetPlaytimeAll
void
int
Action name
Return value
OnConnect
void
OnPlayerChange
void
OnSyncComplete
void
OnSyncError
void
OnLoadComplete
void
OnLoadError
void
OnLoginComplete
void
OnLoginError
void
OnLogoutComplete
void
OnLogoutError
void
OnPlayerFetchFieldsComplete
List<PlayerFetchFieldsData>
OnPlayerFetchFieldsError
void
public class PlayerFetchFieldsData
{
public string name ;
public string key ;
public string type ;
public string defaultValue ; // string | bool | number
public bool important ;
public Variants [] variants ;
}
public class PlayerFieldIncrement
{
public float interval ;
public float increment ;
}
public class PlayerFieldLimits
{
public float min ;
public float max ;
public bool couldGoOverLimit ;
}
public class PlayerFieldVariant
{
public string value ; // string | number
public string name ;
}
Players documentation
Method name
Method parameters
Return value
Fetch
int playerId, Action<GP_Data> onFetchSuccess = null, Action onFetchError = null
void
Fetch
List<int> playersId, Action<GP_Data> onFetchSuccess = null, Action onFetchError = null
void
Fetch
int[] playersId, Action<GP_Data> onFetchSuccess = null, Action onFetchError = null
void
IsExternalLinksAllowed
void
bool
Action name
Return value
OnFetchSuccess
GP_Data
OnFetchError
void
Rewards documentation
Method name
Method parameters
Return value
Give
string idOrTag, bool lazy = false
void
Accept
string idOrTag
void
List
void
RewardData[]
GivenList
void
PlayerReward[]
GetReward
string idOrTag
AllRewardData
Has
string idOrTag
bool
HasAccepted
string idOrTag
bool
HasUnaccepted
string idOrTag
bool
Action name
Return value
OnRewardsGive
AllRewardData
OnRewardsGiveError
string
OnRewardsAccept
AllRewardData
OnRewardsAcceptError
string
public class AllRewardData
{
public RewardData reward ;
public PlayerReward playerReward ;
}
public class RewardData
{
public int id ;
public string tag ;
public string name ;
public string description ;
public string icon ;
public string iconSmall ;
public DataMutation [] mutations ;
public bool isAutoAccept ;
}
public class PlayerReward
{
public int rewardId ;
public int countTotal ;
public int countAccepted ;
}
public class DataMutation
{
public string type ;
public string key ;
public MutationAction action ;
public string value ;
}
public enum MutationAction
{
ADD ,
REMOVE ,
SET
};
Schedulers documentation
Method name
Method parameters
Return value
Register
string idOrTag
void
ClaimDay
string idOrTag, int day
void
ClaimDayAdditional
string idOrTag, int day, string triggerIdOrTag
void
ClaimAllDay
string idOrTag, int day
void
ClaimAllDays
string idOrTag
void
List
void
SchedulerData[]
ActiveList
void
PlayerScheduler[]
GetScheduler
void
SchedulerInfo
GetSchedulerDay
string idOrTag, int day
SchedulerDayInfo
GetSchedulerCurrentDay
string idOrTag
SchedulerDayInfo
IsRegistered
string idOrTag
bool
IsTodayRewardClaimed
string idOrTag
bool
CanClaimDay
string idOrTag, int day
bool
CanClaimDayAdditional
string idOrTag, int day, string triggerIdOrTag
bool
CanClaimAllDay
string idOrTag, int day
bool
Action name
Return value
OnSchedulerRegister
SchedulerInfo
OnSchedulerRegisterError
string
OnSchedulerClaimDay
SchedulerDayInfo
OnSchedulerClaimDayError
string
OnSchedulerClaimDayAdditional
SchedulerDayInfo
OnSchedulerClaimDayAdditionalError
string
OnSchedulerClaimAllDay
SchedulerDayInfo
OnSchedulerClaimAllDayError
string
OnSchedulerClaimAllDays
SchedulerInfo
OnSchedulerClaimAllDaysError
string
OnSchedulerJoin
PlayerScheduler
OnSchedulerJoinError
string
public enum SchedulerType
{
ACTIVE_DAYS ,
ACTIVE_DAYS_CONSECUTIVE
}
public class SchedulerData
{
public int id ;
public string tag ;
public SchedulerType type ;
public int days ;
public bool isRepeat ;
public bool isAutoRegister ;
public TriggerData [] triggers ;
}
public class PlayerScheduler
{
public int schedulerId ;
public int daysClaimed ;
public PlayerSchedulerStats stats ;
}
public class PlayerSchedulerStats
{
public int activeDays ;
public int activeDaysConsecutive ;
}
public class SchedulerInfo
{
public SchedulerData scheduler ;
public PlayerSchedulerStats stats ;
public int [] daysClaimed ;
public bool isRegistered ;
public int currentDay ;
}
public class SchedulerDayInfo
{
public SchedulerData scheduler ;
public int day ;
public bool isDayReached ;
public bool isDayComplete ;
public bool isDayClaimed ;
public bool isAllDayClaimed ;
public TriggerData [] triggers ;
}
Segments documentation
Method name
Method parameters
Return value
List
void
string
Has
string tag
bool
Action name
Return value
OnSegmentEnter
string
OnSegmentLeave
string
Server documentation
Method name
Method parameters
Return value
Time
void
DateTime
Socials documentation
Method name
Method parameters
Return value
Share
string text = "", string url = "", string image = ""
void
Post
string text = "", string url = "", string image = ""
void
Invite
string text = "", string url = "", string image = ""
void
JoinCommunity
void
void
CommunityLink
void
string
IsSupportsShare
void
bool
IsSupportsNativeShare
void
bool
IsSupportsNativePosts
void
bool
IsSupportsNativeInvite
void
bool
CanJoinCommunity
void
bool
IsSupportsNativeCommunityJoin
void
bool
MakeShareLink
string content = ""
string
GetSharePlayerID
void
int
GetShareContent
void
string
Action name
Return value
OnShare
bool
OnPost
bool
OnInvite
bool
OnJoinCommunity
bool
Game Host documentation
Method name
Method parameters
Return value
IsDev
void
bool
IsAllowedOrigin
void
bool
Triggers documentation
Method name
Method parameters
Return value
Claim
string idOrTag
void
List
void
TriggerData[]
ActivatedList
void
TriggerActive[]
GetTrigger
string idOrTag
TriggerAllData
IsActivated
string idOrTag
bool
IsClaimed
string idOrTag
bool
Action name
Return value
OnTriggerActivate
TriggerData
OnTriggerClaim
TriggerData
OnTriggerClaimError
string
public class TriggerAllData
{
public TriggerData trigger ;
public bool isActivated ;
public bool isClaimed ;
}
public class TriggerData
{
public string id ;
public string tag ;
public bool isAutoClaim ;
public string description ;
public TriggerCondition [] conditions ;
public TriggerBonus [] bonuses ;
}
public class TriggerCondition
{
public string conditionType ;
public string key ;
public string operatorType ;
public string [] value ;
}
public class TriggerBonus
{
public string type ;
public string id ;
}
public class TriggerActive
{
public string triggerId ;
public bool claimed ;
}
Game variables documentation
Method name
Method parameters
Return value
Fetch
Action<List<VariablesData>> onFetchSuccess = null, Action onFetchError = null
void
Has
string key
bool
GetInt
string key
int
GetFloat
string key
float
GetString
string key
string
GetBool
string key
bool
GetImage
string key
string
GetFile
string key
string
IsPlatformVariablesAvailable
void
bool
FetchPlatformVariables
Dictionary<string, string> optionsDict, Action<Dictionary<string, string>> onPlatformFetchSuccess = null, Action<string> onPlatformFetchError = null
void
FetchPlatformVariables
Action<Dictionary<string, string>> onPlatformFetchSuccess = null, Action<string> onPlatformFetchError = null
void
Action name
Return value
OnFetchSuccess
List<VariablesData>
OnFetchError
TriggerData
OnPlatformFetchSuccess
Dictionary<string, string>
OnPlatformFetchError
string
public class PlatformFetchVariables
{
public string clientParams ;
}
public class VariablesData
{
public string key ;
public string type ;
public string value ;
}
Uniques variables documentation
Method name
Method parameters
Return value
Register
string tag, string value, Action onUniqueValueRegister = null, Action<string> onUniqueValueRegisterError = null
void
Get
string tag
string
List
void
UniquesData[]
Check
string tag, string value, Action onUniqueValueCheck = null, Action<string> onUniqueValueCheckError = null
void
Delete
string tag, Action onUniqueValueCheck = null, Action<string> onUniqueValueCheckError = null
void
GetString
string key
string
GetBool
string key
bool
GetImage
string key
string
GetFile
string key
string
Action name
Return value
OnUniqueValueRegister
void
OnUniqueValueRegisterError
string
OnUniqueValueCheck
void
OnUniqueValueCheckError
string
OnUniqueValueDelete
void
OnUniqueValueDeleteError
string
public class UniquesData
{
public string tag ;
public string value ;
}
Storage documentation
Method name
Method parameters
Return value
SetStorage
SaveStorageType storage
void
Get
string key, Action<object> onGetValue
void
Set
string key, object value, Action<StorageField> onSetValue = null
void
GetGlobal
string key, Action<object> onGetValue
void
SetGlobal
string key, object value, Action<StorageField> onSetValue = null
void
Action name
Return value
OnGetValue
StorageField
OnSetValue
StorageField
OnGetGlobalValue
StorageField
OnSetGlobalValue
StorageField
public class StorageField
{
public string key ;
public string value ;
}
Sounds documentation
Method name
Method parameters
Return value
IsMuted
SoundType soundType
bool
Mute
SoundType soundType
void
Unmute
SoundType soundType
void
Action name
Return value
CallOnSoundsMute
void
CallOnSoundsMuteSFX
void
CallOnSoundsMuteMusic
void
CallOnSoundsUnmute.
void
CallOnSoundsUnmuteSFX
void
CallOnSoundsUnmuteMusic
void
public enum SoundType
{
All ,
SFX ,
Music
}