Ejemplo n.º 1
0
    public void GetCloudLastSavedMetadataAsync(Action <CloudMetadata> onPeekResult)
    {
        if (!Social.localUser.authenticated)
        {
            SushiDebug.LogFormat("GetCloudSavedAccountData: not authenticated");
            if (onPeekResult != null)
            {
                onPeekResult(CloudMetadata.Invalid);
            }
            return;
        }

        // 아래 함수의 호출 결과는 결과는 PlatformCallbackHandler GameObject의
        // PlatformCallbackHandler.OnIosLoadResult()로 비동기적으로 호출되는 것으로 처리한다.
        // 이를 위해 onPeekResult를 챙겨둔다.
        onPeekResultSave = onPeekResult;
#if UNITY_IOS
        PlatformIosNative.loadFromCloudPrivate(Social.localUser.id, LoginErrorTitle, LoginErrorMessage, ConfirmMessage);
#endif
    }
Ejemplo n.º 2
0
    public void GetCloudLastSavedMetadataAsync(Action <byte[]> onPeekResult)
    {
        if (!PlatformLogin.IsAuthenticated)
        {
            PlatformInterface.instance.logger.LogFormat("GetCloudSavedAccountData: not authenticated");
            onPeekResult?.Invoke(null);

            return;
        }

        // 아래 함수의 호출 결과는 결과는 PlatformCallbackHandler GameObject의
        // PlatformCallbackHandler.OnIosLoadResult()로 비동기적으로 호출되는 것으로 처리한다.
        // 이를 위해 onPeekResult를 챙겨둔다.
        onPeekResultSave = onPeekResult;
        if (Application.platform == RuntimePlatform.IPhonePlayer)
        {
            PlatformIosNative.loadFromCloudPrivate(Social.localUser.id, PlatformInterface.instance.text.LoginErrorTitle,
                                                   PlatformInterface.instance.text.LoginErrorMessage,
                                                   PlatformInterface.instance.text.ConfirmMessage);
        }
    }