Esempio n. 1
0
        public void OnEnable()
        {
            pluginInfo.Add(new string[] { "Version: ", VersionInfo.VERSION });
            pluginInfo.Add(new string[] { "Build Date: ", VersionInfo.BUILD_DATE });
            pluginInfo.Add(new string[] { "Hash: ", VersionInfo.GIT_HASH });

            if (HvrPlayerInterface.Initialise())
            {
                hvrEngineInfo.Add(new string[] { "Version: ", HvrPlayerInterface.GetInfo("VERSION") });
                hvrEngineInfo.Add(new string[] { "Build Date: ", HvrPlayerInterface.GetInfo("BUILD_DATE") });
                hvrEngineInfo.Add(new string[] { "Hash: ", HvrPlayerInterface.GetInfo("GIT_HASH") });
            }

            about_info = "8i Unity Plugin:";

            for (int i = 0; i < pluginInfo.Count; i++)
            {
                about_info += "\n";
                about_info += pluginInfo[i][0] + pluginInfo[i][1];
            }
            about_info += "\n";

            about_info += "\n";
            about_info += "HVR Engine:";

            for (int i = 0; i < hvrEngineInfo.Count; i++)
            {
                about_info += "\n";
                about_info += hvrEngineInfo[i][0] + hvrEngineInfo[i][1];
            }

            EditorApplication.update -= Repaint;
            EditorApplication.update += Repaint;
        }
Esempio n. 2
0
        static void UpdateHvrInfo()
        {
            m_info["HVR_VersionInfo_VERSION"]    = VersionInfo.VERSION;
            m_info["HVR_VersionInfo_GIT_HASH"]   = VersionInfo.GIT_HASH;
            m_info["HVR_VersionInfo_GIT_BRANCH"] = VersionInfo.GIT_BRANCH;
            m_info["HVR_VersionInfo_BUILD_DATE"] = VersionInfo.BUILD_DATE;

            if (HvrPlayerInterface.Initialise())
            {
                m_info["HvrPlayerInterface_VERSION"]    = HvrPlayerInterface.GetInfo(HvrPlayerInterfaceAPI.Player_GetInfo_Keys.VERSION);
                m_info["HvrPlayerInterface_BUILD_DATE"] = HvrPlayerInterface.GetInfo(HvrPlayerInterfaceAPI.Player_GetInfo_Keys.BUILD_DATE);
                m_info["HvrPlayerInterface_GIT_HASH"]   = HvrPlayerInterface.GetInfo(HvrPlayerInterfaceAPI.Player_GetInfo_Keys.GIT_HASH);
            }
        }
        static AnalyticsManager()
        {
            if (UnityEditorInternal.InternalEditorUtility.inBatchMode)
            {
                return;
            }

            if (GetOptOut() == true)
            {
                return;
            }

            // Developer version, do not log
            if (HVR.VersionInfo.VERSION == "-1")
            {
                return;
            }

            // If the current process id is the same as last time, don't log any events
            // This suppresses analytics being sent after every code recompilation
            int currentID = System.Diagnostics.Process.GetCurrentProcess().Id;

            if (GetSessionID() == currentID)
            {
                return;
            }

            SetSessionID(currentID);

            LogEvent("AUTO", "INIT", "INIT", 0);
            LogEvent("INFO", "HVR_VERSION", HVR.VersionInfo.VERSION, 0);
            LogEvent("INFO", "HVR_GIT_INFO", HVR.VersionInfo.GIT_INFO, 0);

            if (HvrPlayerInterface.Initialise())
            {
                LogEvent("INFO", "HVR_PLAYERINTERFACE_GIT_VERSION", HvrPlayerInterface.GetInfo(HvrPlayerInterfaceAPI.Player_GetInfo_Keys.VERSION), 0);
                LogEvent("INFO", "HVR_PLAYERINTERFACE_GIT_INFO", HvrPlayerInterface.GetInfo(HvrPlayerInterfaceAPI.Player_GetInfo_Keys.GIT_INFO), 0);
            }

            LogEvent("INFO", "APPLICATION_UNITY_VERSION", Application.unityVersion, 0);
            LogEvent("INFO", "APPLICATION_PLATFORM", Application.platform.ToString(), 0);
            LogEvent("INFO", "SYSTEMINFO_OPERATINGSYSTEM", SystemInfo.operatingSystem, 0);
            LogEvent("INFO", "SYSTEMINFO_PROCESSORTYPE", SystemInfo.processorType, 0);
            LogEvent("INFO", "SYSTEMINFO_GRAPHICSDEVICENAME", SystemInfo.graphicsDeviceName.ToString(), 0);
            LogEvent("INFO", "SYSTEMINFO_GRAPHICSDEVICETYPE", SystemInfo.graphicsDeviceType.ToString(), 0);
        }