C# Класс SpilGames.Unity.Implementations.SpiliOSUnityImplementation

Наследование: SpilUnityImplementationBase
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
disableAutomaticRegisterForPushNotifications bool

Открытые методы

Метод Описание
AddCurrencyToWallet ( int currencyId, int amount, string reason ) : void
AddItemToInventory ( int itemId, int amount, string reason ) : void
BuyBundle ( int bundleId, string reason ) : void
ClosedParentalGate ( bool pass ) : void

Call to inform the SDK that the parental gate was (not) passes

ConsumeBundle ( int bundleId, string reason ) : void
DisableAutomaticRegisterForPushNotifications ( ) : void

Disables the automatic register for push notifications. Should be called before SpilInit!

GetConfigAll ( ) : string

Returns the game config as a json string. This is not essential for developers so could be made private (getConfig() uses it so it cannot be removed entirely) but might be handy for some developers so we left it in.

GetConfigValue ( string key ) : string

Method that returns a configuration value from the game config based on key

GetInvetoryFromSdk ( ) : string
GetOtherUsersGameState ( string provider, string userIdsJsonArray ) : void

Gets the public game state of other users.

GetPrivateGameState ( ) : string

Gets the state of the private game.

GetPublicGameState ( ) : string

Gets the public game state.

GetSpilGameDataFromSdk ( ) : string
GetSpilUserId ( ) : string

Retrieves the Spil User Id so that developers can show this in-game for users. If users contact Spil customer service they can supply this Id so that customer support can help them properly. Please make this Id available for users in one of your game's screens.

GetUserId ( ) : string

Retrieves the custom User Id

GetUserProvider ( ) : string

Gets the user provider.

GetWalletFromSdk ( ) : string
PlayMoreApps ( ) : void

This can be called to show the "more apps" activity, for instance after calling "RequestMoreApps()" and receiving an "AdAvailable" event the developer could call this method from the event handler. When calling this method "RequestMoreApps()" must first have been called to request and cache a video. If no video is available then nothing will happen.

PlayVideo ( ) : void

This can be called to show a video, for instance after calling "SendrequestRewardVideoEvent()" and receiving an "AdAvailable" event the developer could call this method from the event handler. When calling this method "SendrequestRewardVideoEvent()" must first have been called to request and cache a video. If no video is available then nothing will happen.

RegisterForPushNotifications ( ) : void

Registers for push notifications for iOS. Can be used then the automatic registration was disabled using: DisableAutomaticRegisterForPushNotifications();

RequestDailyBonus ( ) : void
RequestMoreApps ( ) : void

Sends the "requestAd" event with the "moreApps" parameter to the native Spil SDK which will send a request to the back-end. When a response has been received from the back-end the SDK will fire either an "AdAvailable" or and "AdNotAvailable" event to which the developer can subscribe and for instance call PlayVideo(); or PlayMoreApps();

RequestSplashScreen ( ) : void
SendCustomEvent ( string eventName, object>.Dictionary dict ) : void

Sends an event to the native Spil SDK which will send a request to the back-end. Custom events may be tracked as follows: To track an simple custom event, simply call Spil.Instance.SendCustomEvent(String eventName); from anywhere in your code. To pass more information with the event create a <String, String> Dictionary and pass that as the second parameter like so: Dictionary<String, String> eventParams = new Dictionary<String,String>(); eventParams.Add(“level”,levelName); Spil.Instance.SendCustomEvent(“PlayerDeath”, eventParams); See https://github.com/spilgames/spil_event_unity_plugin for more information on events. This method was previously called "TrackEvent".

SendCustomEvent ( string eventName, string>.Dictionary dict ) : void

Sends an event to the native Spil SDK which will send a request to the back-end. Custom events may be tracked as follows: To track an simple custom event, simply call Spil.Instance.SendCustomEvent(String eventName); from anywhere in your code. To pass more information with the event create a <String, String> Dictionary and pass that as the second parameter like so: Dictionary<String, String> eventParams = new Dictionary<String,String>(); eventParams.Add(“level”,levelName); Spil.Instance.SendCustomEvent(“PlayerDeath”, eventParams); See https://github.com/spilgames/spil_event_unity_plugin for more information on events. This method was previously called "TrackEvent".

SetCustomBundleId ( string bundleId ) : void
SetPluginInformation ( string PluginName, string PluginVersion ) : void
SetPrivateGameState ( string privateData ) : void

Sets the state of the private game.

SetPublicGameState ( string publicData ) : void

Sets the public game state.

SetShowToastOnVideoReward ( bool value ) : void

When Fyber has shown a reward video and the user goes back to the game to receive his/her reward Fyber can automatically show a toast message with information about the reward, for instance "You've received 50 coins". This is disabled by default to allow the developer to create a reward notification for the user. Developers can call SetShowToastOnVideoReward(true) to enable Fyber's automatic toast message.

SetUserId ( string providerId, string userId ) : void

Sets the custom User Id for a provider

ShowContactCenter ( ) : void
ShowHelpCenter ( ) : void
ShowHelpCenterWebview ( ) : void
SubtractCurrencyFromWallet ( int currencyId, int amount, string reason ) : void
SubtractItemFromInventory ( int itemId, int amount, string reason ) : void
TestRequestAd ( string providerName, string adType, bool parentalGate ) : void

Method that initiaties a Test Ad. This is not essential for developers so could be hidden but it might be handy for some developers so we left it in.

UpdatePackagesAndPromotions ( ) : void

Method that requests packages and promotions from the server. This is called automatically by the Spil SDK when the game starts. This is not essential so could be removed but might be handy for some developers so we left it in.

UpdatePlayerData ( ) : void

Защищенные методы

Метод Описание
GetAllPackages ( ) : string
GetPackage ( string key ) : string

Приватные методы

Метод Описание
CheckForRemoteNotifications ( ) : void
OnApplicationPause ( bool pauseStatus ) : void
SendNotificationTokenToSpil ( ) : void
SpilInit ( ) : void

This method is marked as internal and should not be exposed to developers. The Spil Unity SDK is not packaged as a seperate assembly yet so this method is currently visible, this will be fixed in the future. Internal method names start with a lower case so you can easily recognise and avoid them.

addCurrencyToWalletNative ( int currencyId, int amount, string reason ) : void
addItemToInventoryNative ( int itemId, int amount, string reason ) : void
applicationDidBecomeActive ( ) : void
applicationDidEnterBackground ( ) : void
buyBundleNative ( int bundleId, string reason ) : void
closedParentalGateNative ( bool pass ) : void
consumeBundleNative ( int bundleId, string reason ) : void
devRequestAdNative ( string providerName, string adTypeName, bool parentalGate ) : void
disableAutomaticRegisterForPushNotificationsNative ( ) : void
getAllPackagesNative ( ) : string
getConfigNative ( ) : string
getConfigValueNative ( string keyName ) : string
getInventoryNative ( ) : string
getOtherUsersGameStateNative ( string provider, string userIdsJsonArray ) : void
getPackageNative ( string keyName ) : string
getPrivateGameStateNative ( ) : string
getPromotion ( string key ) : string

This method is marked as internal and should not be exposed to developers. The Spil Unity SDK is not packaged as a seperate assembly yet so this method is currently visible, this will be fixed in the future. Internal method names start with a lower case so you can easily recognise and avoid them.

getPromotionNative ( string keyName ) : string
getPublicGameStateNative ( ) : string
getSpilGameDataNative ( ) : string
getSpilUserIdNative ( ) : string
getUserIdNative ( ) : string
getUserProviderNative ( ) : string
getWalletNative ( ) : string
handlePushNotification ( string notificationStringParams ) : void
initEventTrackerWithOptions ( string options ) : void
playRewardVideoNative ( ) : void
registerForPushNotifications ( ) : void
requestDailyBonusNative ( ) : void
requestPackagesNative ( ) : void
requestSplashScreenNative ( ) : void
setCustomBundleIdNative ( string bundleId ) : void
setPluginInformationNative ( string pluginName, string pluginVersion ) : void
setPrivateGameStateNative ( string privateData ) : void
setPublicGameStateNative ( string publicData ) : void
setPushNotificationKey ( string key ) : void
setUserIdNative ( string providerId, string userId ) : void
showContactCenterNative ( ) : void
showHelpCenterNative ( ) : void
showHelpCenterWebviewNative ( ) : void
showMoreAppsNative ( ) : void
showToastOnVideoReward ( bool show ) : void
subtractCurrencyFromWalletNative ( int currencyId, int amount, string reason ) : void
subtractItemFromInventoryNative ( int itemId, int amount, string reason ) : void
trackEventNative ( string eventName ) : void
trackEventWithParamsNative ( string eventName, string jsonStringParams ) : void
updatePlayerDataNative ( ) : void

Описание методов

AddCurrencyToWallet() публичный Метод

public AddCurrencyToWallet ( int currencyId, int amount, string reason ) : void
currencyId int
amount int
reason string
Результат void

AddItemToInventory() публичный Метод

public AddItemToInventory ( int itemId, int amount, string reason ) : void
itemId int
amount int
reason string
Результат void

BuyBundle() публичный Метод

public BuyBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Результат void

ClosedParentalGate() публичный Метод

Call to inform the SDK that the parental gate was (not) passes
public ClosedParentalGate ( bool pass ) : void
pass bool
Результат void

ConsumeBundle() публичный Метод

public ConsumeBundle ( int bundleId, string reason ) : void
bundleId int
reason string
Результат void

DisableAutomaticRegisterForPushNotifications() публичный Метод

Disables the automatic register for push notifications. Should be called before SpilInit!
public DisableAutomaticRegisterForPushNotifications ( ) : void
Результат void

GetAllPackages() защищенный Метод

protected GetAllPackages ( ) : string
Результат string

GetConfigAll() публичный Метод

Returns the game config as a json string. This is not essential for developers so could be made private (getConfig() uses it so it cannot be removed entirely) but might be handy for some developers so we left it in.
public GetConfigAll ( ) : string
Результат string

GetConfigValue() публичный Метод

Method that returns a configuration value from the game config based on key
public GetConfigValue ( string key ) : string
key string
Результат string

GetInvetoryFromSdk() публичный Метод

public GetInvetoryFromSdk ( ) : string
Результат string

GetOtherUsersGameState() публичный Метод

Gets the public game state of other users.
public GetOtherUsersGameState ( string provider, string userIdsJsonArray ) : void
provider string Provider.
userIdsJsonArray string User identifiers json array.
Результат void

GetPackage() защищенный Метод

protected GetPackage ( string key ) : string
key string
Результат string

GetPrivateGameState() публичный Метод

Gets the state of the private game.
public GetPrivateGameState ( ) : string
Результат string

GetPublicGameState() публичный Метод

Gets the public game state.
public GetPublicGameState ( ) : string
Результат string

GetSpilGameDataFromSdk() публичный Метод

public GetSpilGameDataFromSdk ( ) : string
Результат string

GetSpilUserId() публичный Метод

Retrieves the Spil User Id so that developers can show this in-game for users. If users contact Spil customer service they can supply this Id so that customer support can help them properly. Please make this Id available for users in one of your game's screens.
public GetSpilUserId ( ) : string
Результат string

GetUserId() публичный Метод

Retrieves the custom User Id
public GetUserId ( ) : string
Результат string

GetUserProvider() публичный Метод

Gets the user provider.
public GetUserProvider ( ) : string
Результат string

GetWalletFromSdk() публичный Метод

public GetWalletFromSdk ( ) : string
Результат string

PlayMoreApps() публичный Метод

This can be called to show the "more apps" activity, for instance after calling "RequestMoreApps()" and receiving an "AdAvailable" event the developer could call this method from the event handler. When calling this method "RequestMoreApps()" must first have been called to request and cache a video. If no video is available then nothing will happen.
public PlayMoreApps ( ) : void
Результат void

PlayVideo() публичный Метод

This can be called to show a video, for instance after calling "SendrequestRewardVideoEvent()" and receiving an "AdAvailable" event the developer could call this method from the event handler. When calling this method "SendrequestRewardVideoEvent()" must first have been called to request and cache a video. If no video is available then nothing will happen.
public PlayVideo ( ) : void
Результат void

RegisterForPushNotifications() публичный Метод

Registers for push notifications for iOS. Can be used then the automatic registration was disabled using: DisableAutomaticRegisterForPushNotifications();
public RegisterForPushNotifications ( ) : void
Результат void

RequestDailyBonus() публичный Метод

public RequestDailyBonus ( ) : void
Результат void

RequestMoreApps() публичный Метод

Sends the "requestAd" event with the "moreApps" parameter to the native Spil SDK which will send a request to the back-end. When a response has been received from the back-end the SDK will fire either an "AdAvailable" or and "AdNotAvailable" event to which the developer can subscribe and for instance call PlayVideo(); or PlayMoreApps();
public RequestMoreApps ( ) : void
Результат void

RequestSplashScreen() публичный Метод

public RequestSplashScreen ( ) : void
Результат void

SendCustomEvent() публичный Метод

Sends an event to the native Spil SDK which will send a request to the back-end. Custom events may be tracked as follows: To track an simple custom event, simply call Spil.Instance.SendCustomEvent(String eventName); from anywhere in your code. To pass more information with the event create a <String, String> Dictionary and pass that as the second parameter like so: Dictionary<String, String> eventParams = new Dictionary<String,String>(); eventParams.Add(“level”,levelName); Spil.Instance.SendCustomEvent(“PlayerDeath”, eventParams); See https://github.com/spilgames/spil_event_unity_plugin for more information on events. This method was previously called "TrackEvent".
public SendCustomEvent ( string eventName, object>.Dictionary dict ) : void
eventName string
dict object>.Dictionary
Результат void

SendCustomEvent() публичный Метод

Sends an event to the native Spil SDK which will send a request to the back-end. Custom events may be tracked as follows: To track an simple custom event, simply call Spil.Instance.SendCustomEvent(String eventName); from anywhere in your code. To pass more information with the event create a <String, String> Dictionary and pass that as the second parameter like so: Dictionary<String, String> eventParams = new Dictionary<String,String>(); eventParams.Add(“level”,levelName); Spil.Instance.SendCustomEvent(“PlayerDeath”, eventParams); See https://github.com/spilgames/spil_event_unity_plugin for more information on events. This method was previously called "TrackEvent".
public SendCustomEvent ( string eventName, string>.Dictionary dict ) : void
eventName string
dict string>.Dictionary
Результат void

SetCustomBundleId() публичный Метод

public SetCustomBundleId ( string bundleId ) : void
bundleId string
Результат void

SetPluginInformation() публичный Метод

public SetPluginInformation ( string PluginName, string PluginVersion ) : void
PluginName string
PluginVersion string
Результат void

SetPrivateGameState() публичный Метод

Sets the state of the private game.
public SetPrivateGameState ( string privateData ) : void
privateData string Private data.
Результат void

SetPublicGameState() публичный Метод

Sets the public game state.
public SetPublicGameState ( string publicData ) : void
publicData string Public data.
Результат void

SetShowToastOnVideoReward() публичный Метод

When Fyber has shown a reward video and the user goes back to the game to receive his/her reward Fyber can automatically show a toast message with information about the reward, for instance "You've received 50 coins". This is disabled by default to allow the developer to create a reward notification for the user. Developers can call SetShowToastOnVideoReward(true) to enable Fyber's automatic toast message.
public SetShowToastOnVideoReward ( bool value ) : void
value bool
Результат void

SetUserId() публичный Метод

Sets the custom User Id for a provider
public SetUserId ( string providerId, string userId ) : void
providerId string
userId string
Результат void

ShowContactCenter() публичный Метод

public ShowContactCenter ( ) : void
Результат void

ShowHelpCenter() публичный Метод

public ShowHelpCenter ( ) : void
Результат void

ShowHelpCenterWebview() публичный Метод

public ShowHelpCenterWebview ( ) : void
Результат void

SubtractCurrencyFromWallet() публичный Метод

public SubtractCurrencyFromWallet ( int currencyId, int amount, string reason ) : void
currencyId int
amount int
reason string
Результат void

SubtractItemFromInventory() публичный Метод

public SubtractItemFromInventory ( int itemId, int amount, string reason ) : void
itemId int
amount int
reason string
Результат void

TestRequestAd() публичный Метод

Method that initiaties a Test Ad. This is not essential for developers so could be hidden but it might be handy for some developers so we left it in.
public TestRequestAd ( string providerName, string adType, bool parentalGate ) : void
providerName string
adType string
parentalGate bool
Результат void

UpdatePackagesAndPromotions() публичный Метод

Method that requests packages and promotions from the server. This is called automatically by the Spil SDK when the game starts. This is not essential so could be removed but might be handy for some developers so we left it in.
public UpdatePackagesAndPromotions ( ) : void
Результат void

UpdatePlayerData() публичный Метод

public UpdatePlayerData ( ) : void
Результат void

Описание свойств

disableAutomaticRegisterForPushNotifications защищенное свойство

protected bool disableAutomaticRegisterForPushNotifications
Результат bool