예제 #1
0
    public static void SendOutcomeWithValue(string name, float value, OnSendOutcomeSuccess onSendOutcomeSuccess)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuid = OneSignalUnityUtils.GetNewGuid();
        delegates.Add(delegateGuid, onSendOutcomeSuccess);

        oneSignalPlatform.SendOutcomeWithValue(delegateGuid, name, value);
        #endif
    }
예제 #2
0
    // Call this if you need the playerId and/or pushToken
    // NOTE: pushToken maybe null if notifications are not accepted or there is connectivity issues.
    public static void IdsAvailable(IdsAvailableCallback inIdsAvailableDelegate)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuid = OneSignalUnityUtils.GetNewGuid();
        delegates.Add(delegateGuid, inIdsAvailableDelegate);

        oneSignalPlatform.IdsAvailable(delegateGuid);
        #endif
    }
예제 #3
0
    // Makes a request to onesignal.com to get current tags set on the player and then run the callback passed in.
    public static void GetTags(TagsReceived inTagsReceivedDelegate)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuid = OneSignalUnityUtils.GetNewGuid();
        delegates.Add(delegateGuid, inTagsReceivedDelegate);

        oneSignalPlatform.GetTags(delegateGuid);
        #endif
    }
예제 #4
0
    public static void PostNotification(Dictionary <string, object> data, OnPostNotificationSuccess inOnPostNotificationSuccess, OnPostNotificationFailure inOnPostNotificationFailure)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid();
        string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid();

        delegates.Add(delegateGuidSuccess, inOnPostNotificationSuccess);
        delegates.Add(delegateGuidFailure, inOnPostNotificationFailure);

        oneSignalPlatform.PostNotification(delegateGuidSuccess, delegateGuidFailure, data);
        #endif
    }
예제 #5
0
    public static void LogoutEmail(OnLogoutEmailSuccess successDelegate, OnLogoutEmailFailure failureDelegate)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid();
        string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid();

        delegates.Add(delegateGuidSuccess, successDelegate);
        delegates.Add(delegateGuidFailure, failureDelegate);

        oneSignalPlatform.LogoutEmail(delegateGuidSuccess, delegateGuidFailure);
        #endif
    }
예제 #6
0
    public static void SetEmail(string email, string emailAuthToken, OnSetEmailSuccess successDelegate, OnSetEmailFailure failureDelegate)
    {
        #if ONESIGNAL_PLATFORM
        string delegateGuidSuccess = OneSignalUnityUtils.GetNewGuid();
        string delegateGuidFailure = OneSignalUnityUtils.GetNewGuid();

        delegates.Add(delegateGuidSuccess, successDelegate);
        delegates.Add(delegateGuidFailure, failureDelegate);

        oneSignalPlatform.SetEmail(delegateGuidSuccess, delegateGuidFailure, email, emailAuthToken);
        #endif
    }