Esempio n. 1
0
        public void OnApplicationQuit()
        {
            if (Plugin.CurrentSettings.Enabled && Plugin.CurrentSettings.ShowSummaryOnExit)
            {
                Highlight.ShowSummary();
            }

            Highlights.ReleaseHighlightsSDK();
        }
Esempio n. 2
0
        public static int InitHighlightsSDK(bool isCheck)
        {
            try
            {
                Highlights.HighlightScope[] RequiredScopes =
                {
                    Highlights.HighlightScope.Highlights,
                    Highlights.HighlightScope.HighlightsRecordVideo,
                    Highlights.HighlightScope.HighlightsRecordScreenshot
                };
                Highlights.ReturnCode create = Highlights.CreateHighlightsSDK("Echo VR", RequiredScopes);
                if (create != Highlights.ReturnCode.SUCCESS)
                {
                    Logger.LogRow(Logger.LogType.Error, "Failed to initialize Highlights on first try: " + create);
                    create = Highlights.CreateHighlightsSDK("Echo VR", RequiredScopes);
                    if (create != Highlights.ReturnCode.SUCCESS)
                    {
                        Logger.LogRow(Logger.LogType.Error, "Failed to initialize Highlights: " + create);
                        didHighlightsInit       = false;
                        isNVHighlightsSupported = false;
                        return(-1);
                    }
                }

                if (isCheck)
                {
                    Highlights.ReleaseHighlightsSDK();
                    isNVHighlightsSupported = true;
                    return(1);
                }

                didHighlightsInit = true;
                return(1);
            }
            catch (Exception e)
            {
                Logger.LogRow(Logger.LogType.Error, $"Failed to initialize Highlights: {e}");
                didHighlightsInit       = false;
                isNVHighlightsSupported = false;
                return(-1);
            }
        }
Esempio n. 3
0
        public static void CloseNVHighlights(bool wasDisableNVHCall = false)
        {
            try
            {
                if (!didHighlightsInit)
                {
                    return;
                }

                if (Settings.Default.clearHighlightsOnExit && !wasDisableNVHCall)
                {
                    ClearUnsavedNVHighlights(false);
                }
                Highlights.ReleaseHighlightsSDK();
            }
            catch (Exception e)
            {
                Logger.LogRow(Logger.LogType.Error, $"Failed during CloseNVHighlights\n{e}");
            }
        }
Esempio n. 4
0
 // Release Highlights SDK at the end of play
 private void OnDestroy()
 {
     Highlights.ReleaseHighlightsSDK();
 }