Esempio n. 1
0
 static InfoMessageBootstrap()
 {
     if (CheckForMessages)
     {
         EditorApplication.update += Update;
         ServerGateway.ConnectToServer();
     }
 }
Esempio n. 2
0
        private static void Update()
        {
            var deltaTime = EditorApplication.timeSinceStartup - _timeMessageWasShown;

            if (deltaTime >= IntervalBetweenChecks)
            {
                ServerGateway.ConnectToServer();
                _timeMessageWasShown = EditorApplication.timeSinceStartup;
            }
        }
Esempio n. 3
0
        void OnGUI()
        {
            if (GUILayout.Button(_texture))
            {
                if (null != _responseData && !string.IsNullOrEmpty(_responseData.TargetUrl))
                {
                    Application.OpenURL(_responseData.TargetUrl);
                    ServerGateway.ReportClick(_responseData.MessageType);

                    //Make sure to never show the message again if clicked on it
                    MessageDisplayLogic.SetTimesMessageWasShown(_responseData.MessageName, 100000);
                }
                this.Close();
            }
        }