예제 #1
0
        void OnEnable()
        {
            var tokenAuth = new TokenAuthWidget();

            tokenAuth.AddView(rootVisualElement);
            rootVisualElement.Add(UiUtils.Separator());

            VisualElement loggedInUiContainer = null;

            ReactiveBinder.Bind(tokenAuth.reactiveUserInfo, userInfo =>
            {
                if (loggedInUiContainer != null)
                {
                    rootVisualElement.Remove(loggedInUiContainer);
                }

                if (userInfo.HasValue)
                {
                    loggedInUiContainer = CreateVenueUi(userInfo.Value);
                    rootVisualElement.Add(loggedInUiContainer);
                }
                else
                {
                    loggedInUiContainer = null;
                }
            });
        }
예제 #2
0
        void OnEnable()
        {
            tokenAuth = new TokenAuthWidget();
            tokenAuth.AddView(rootVisualElement);
            rootVisualElement.Add(UiUtils.Separator());

            rootVisualElement.Add(new IMGUIContainer(LegacyOnGUI));
        }