C# 클래스 SpilGames.Unity.Implementations.SpiliOSUnityImplementation

상속: SpilUnityImplementationBase
파일 보기 프로젝트 열기: spilgames/spil_event_unity_plugin

보호된 프로퍼티들

프로퍼티 타입 설명
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