private GvrConnectionState ConvertConnectionState(int index) { //UnityEngine.Profiling.Profiler.BeginSample("A"); int connectionState = androidService.Call <int>("getConnectionState", index); SvrLog.LogFormat("ConvertConnectionState:{0},{1}", index, connectionState); //UnityEngine.Profiling.Profiler.EndSample(); switch (connectionState) { case SVR_CONTROLLER_DISCONNECTED: return(GvrConnectionState.Disconnected); case SVR_CONTROLLER_SCANNING: return(GvrConnectionState.Scanning); case SVR_CONTROLLER_CONNECTING: return(GvrConnectionState.Connecting); case SVR_CONTROLLER_CONNECTED: return(GvrConnectionState.Connected); case SVR_CONTROLLER_CONNECTEDNOTRECENT: return(GvrConnectionState.ConnectedNotRecent); default: return(GvrConnectionState.Error); } }
internal SvrAndroidServiceControllerProvider() { SvrLog.Log("SvrAndroidServiceControllerProvider"); Init(); }