Esempio n. 1
0
            private void EnsureStarted()
            {
                if (!_dllFixed)
                {
                    DLLSearchPathFixer.fix();
                    _dllFixed = true;
                }

                if (_contextObject == null)
                {
                    if (0 == AppID.Length)
                    {
                        Debug.LogError("[OSVR-Unity] ClientKit instance needs AppID set to a reverse-order DNS name! Using dummy name...");
                        AppID = "com.osvr.osvr-unity.dummy";
                    }
                    Debug.Log("[OSVR-Unity] Starting with app ID: " + AppID);
                    _contextObject = new OSVR.ClientKit.ClientContext(AppID, 0);
                }

                //check if the server is running
                if (!_contextObject.CheckStatus())
                {
                    if (!_osvrServerError)
                    {
                        _osvrServerError = true;
                        Debug.LogError("[OSVR-Unity] OSVR Server not detected. Start OSVR Server and restart the application.");
                    }
                }
                else if (_osvrServerError)
                {
                    Debug.Log("[OSVR-Unity] OSVR Server connection established. You can ignore previous errors about the server not being detected.");
                    _osvrServerError = false;
                }
            }
Esempio n. 2
0
            private void EnsureStarted()
            {
                if (_contextObject == null)
                {
                    if (0 == AppID.Length)
                    {
                        Debug.LogError("OSVR ClientKit instance needs AppID set to a reverse-order DNS name! Using dummy name...");
                        AppID = "com.osvr.osvr-unity.dummy";
                    }
                    Debug.Log("[OSVR] Starting with app ID: " + AppID);
                    _contextObject = new OSVR.ClientKit.ClientContext(AppID, 0);
                }

                //check if the server is running
                if (!_contextObject.CheckStatus())
                {
                    Debug.LogError("OSVR Server not detected. Start OSVR Server and restart the application.");
                }
            }