void OnDisable() { authBackend = null; if (m_Interop != null) { m_Interop.OnDisable(); m_Interop = null; } if (m_StartGetUserInfo != null) { StopCoroutine(m_StartGetUserInfo); } m_UnityUserTask = null; ProjectServer.Cleanup(); }
void Awake() { // Called as soon as we can SetupProxy(); if (tokenUpdated == null) { tokenUpdated = new TokenEvent(); } if (authenticationFailed == null) { authenticationFailed = new FailureEvent(); } if (userLoggedIn == null) { userLoggedIn = new UnityUserUnityEvent(); } if (userLoggedOut == null) { userLoggedOut = new UnityEvent(); } if (linkSharingDetected == null) { linkSharingDetected = new LinkSharingEvent(); } if (openInViewerDetected == null) { openInViewerDetected = new OpenInViewerEvent(); } ProjectServer.Init(); authBackend = new AuthBackend(this); #if UNITY_STANDALONE_WIN && !UNITY_EDITOR m_Interop = new Interop(this); m_Interop.Start(); #endif m_TokenPersistentPath = Path.Combine(Application.persistentDataPath, AuthConfiguration.JwtTokenFileName); }