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

            Highlights.ReleaseHighlightsSDK();
        }
Ejemplo 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);
            }
        }
Ejemplo 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}");
            }
        }
Ejemplo n.º 4
0
 // Release Highlights SDK at the end of play
 private void OnDestroy()
 {
     Highlights.ReleaseHighlightsSDK();
 }