Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit f23f9fb

Browse files
committed
added gameViewLoaded flag to make sure HockeyApp_StartHockeyManager is performed only once.
1 parent 64a7100 commit f23f9fb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin/HockeyAppUnityIOS/HockeyAppUnity-Scripts/HockeyAppIOS.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class HockeyAppIOS : MonoBehaviour
1313
protected const string LOG_FILE_DIR = "/logs/";
1414
protected const int MAX_CHARS = 199800;
1515
private static HockeyAppIOS instance;
16+
private static bool gameViewLoaded;
1617

1718
public enum AuthenticatorType
1819
{
@@ -107,6 +108,10 @@ void OnDisable ()
107108
void GameViewLoaded (string message)
108109
{
109110
#if (UNITY_IPHONE && !UNITY_EDITOR)
111+
if (gameViewLoaded) {
112+
return;
113+
}
114+
gameViewLoaded = true;
110115
string urlString = GetBaseURL();
111116
string authTypeString = GetAuthenticatorTypeString();
112117
HockeyApp_StartHockeyManager(appID, urlString, authTypeString, secret, updateAlert, userMetrics, autoUploadCrashes);

0 commit comments

Comments
 (0)