コード例 #1
0
ファイル: UIRecoverPassword.cs プロジェクト: gloowa/mstest
        protected override void Start()
        {
            if (email == null || recover == null) {
                Debug.LogWarning ("UIRecoverPassword: Please assign all fields in the inspector.");
                return;
            }
            if (LoginSystem.current == null) {
                Debug.LogWarning("UIRecoverPassword: Requires a LoginSystem. Create one from Tools > Unitycoding > Login System > Login System!");
                return;
            }

            if (LoginSystem.Settings == null) {
                Debug.LogWarning("[LoginSystem(UIRecoverPassword)] Please assign LoginSettings to the Login Systtem!");
                return;
            }

            messageBox = UIWindow.Get<MessageBox> (LoginSystem.Settings.messageBoxWindow);

            if (messageBox == null) {
                Debug.LogWarning("[LoginSystem(UIRecoverPassword)] No message box found with name " + LoginSystem.Settings.messageBoxWindow+"!");
                return;
            }

            loginWindow = UIWindow.Get<UILogin> (LoginSystem.Settings.loginWindow);

            if (loginWindow == null) {
                Debug.LogWarning("[LoginSystem(UIRecoverPassword)] No login window found with name " + LoginSystem.Settings.loginWindow+"!");
                return;
            }

            LoginSystem.current.RegisterListener ("OnPasswordRecovered", OnPasswordRecovered);
            LoginSystem.current.RegisterListener ("OnFailedToRecoverPassword", OnFailedToRecoverPassword);

            recover.onClick.AddListener (RecoverPasswordUsingFields);
        }
コード例 #2
0
ファイル: UIRegistration.cs プロジェクト: gloowa/mstest
        protected override void Start()
        {
            if (username == null ||
                password == null ||
                confirmPassword == null ||
                acceptTermsOfUse == null ||
                register == null ||
                email == null) {
                Debug.LogWarning("LoginSystem[UIRegistration]: Please assign all fields in the inspector.");
                return;
            }

            if (LoginSystem.current == null) {
                Debug.LogWarning("LoginSystem[UIRegistration]: Requires a LoginSystem. Create one from Tools > Unitycoding > Login System > Login System!");
                return;
            }

            if (LoginSystem.Settings == null) {
                Debug.LogWarning("[LoginSystem(UIRegistration)] Please assign LoginSettings to the Login Systtem!");
                return;
            }

            messageBox = UIWindow.Get<MessageBox> (LoginSystem.Settings.messageBoxWindow);

            if (messageBox == null) {
                Debug.LogWarning("[LoginSystem(UIRegistration)] No message box found with name " + LoginSystem.Settings.messageBoxWindow+"!");
                return;
            }

            loginWindow = UIWindow.Get<UILogin> (LoginSystem.Settings.loginWindow);
            if (loginWindow == null) {
                Debug.LogWarning("LoginSystem[UIRegistration]: No login window found with name " + LoginSystem.Settings.loginWindow+"!");
                return;
            }

            LoginSystem.current.RegisterListener ("OnAccountCreated", OnAccountCreated);
            LoginSystem.current.RegisterListener ("OnFailedToCreateAccount", OnFailedToCreateAccount);
        }