static InfoMessageBootstrap() { if (CheckForMessages) { EditorApplication.update += Update; ServerGateway.ConnectToServer(); } }
private static void Update() { var deltaTime = EditorApplication.timeSinceStartup - _timeMessageWasShown; if (deltaTime >= IntervalBetweenChecks) { ServerGateway.ConnectToServer(); _timeMessageWasShown = EditorApplication.timeSinceStartup; } }
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(); } }