示例#1
0
    private void Setup(AuthApi auth)
    {
        if (m_authIndicatorImage == null)
        {
            Debug.LogWarning("The tester only works, if you provide an auth indicator image");
            return;
        }

        m_authIndicatorImage.color = NEGATIVE;
        auth.observeCurrentUser()
        .Subscribe(user => {
            if (user != null)
            {
                m_authIndicatorImage.color = POSITIVE;
            }
            else
            {
                m_authIndicatorImage.color = NEGATIVE;
            }
        });
    }