private AirVRStereoCameraRig CreateAirVRCameraRig(AirVRStereoCameraRig customizedRigPrefab) { int onAirVRPort = 9090; AirVRServerInitParams initParam = GameObject.FindObjectOfType<AirVRServerInitParams>(); if (initParam) onAirVRPort = initParam.port; if (!customizedRigPrefab) { rig = FindObjectOfType<AirVRStereoCameraRig>(); if(!rig) rig = CircleVR.DontDestroyInstantiate("AirVRCameraRig" , Vector3.zero , Quaternion.identity).AddComponent<AirVRStereoCameraRig>(); } else rig = CircleVR.DontDestroyInstantiate(customizedRigPrefab.gameObject , Vector3.zero , Quaternion.identity).GetComponent<AirVRStereoCameraRig>(); rig.trackingModel = AirVRStereoCameraRig.TrackingModel.ExternalTracker; if (!customizedRigPrefab) { rig.centerEyeAnchor.gameObject.AddComponent<AudioListener>(); rig.centerEyeAnchor.gameObject.AddComponent<AirVRServerAudioOutputRouter>(); } Debug.Log("[CircleVR Client] onAirVR Port : " + onAirVRPort.ToString()); AirVRCameraRigManager.managerOnCurrentScene.Delegate = this; return rig; }
public void Init() { Camera = CircleVR.DontDestroyInstantiate("CameraManager", Vector3.zero, Quaternion.identity).AddComponent <CircleVRCameraManager>(); Camera.Init(); CircleVRTrackingSystem.onCreateTracker += onCreateTracker; Debug.Log("[CircleVR Display] Initialized"); }
private CircleVRHead CreateHead(Transform origin, string trackerID) { GameObject prefab = Resources.Load <GameObject>("head"); CircleVRHead head = CircleVR.DontDestroyInstantiate(prefab, prefab.transform.localPosition, prefab.transform.localRotation).GetComponent <CircleVRHead>(); head.Init(trackerID, origin); return(head); }
private static void HostSetup(Configuration config) { Debug.Log("[TrackingSystem] Host Setup"); if (OpenVR.System != null) { CircleVR.DontDestroyInstantiate("SteamVRTrackingDataFeeder", Vector3.zero, Quaternion.identity).AddComponent <CircleVRSteamVRTrackingDataFeeder>(); return; } CircleVR.DontDestroyInstantiate("TrackingSimulator", Vector3.zero, Quaternion.identity).AddComponent <CircleVRTrackingSimulator>().Init(config); }
public static Transform CreateTracker(string ID) { Transform trackerTransform = CircleVR.DontDestroyInstantiate(ID, Vector3.zero, Quaternion.identity).transform; trackers.Add(ID, trackerTransform); CreateCenterAnchor(trackerTransform); Origin = Origin; if (onCreateTracker != null) { onCreateTracker(ID, trackerTransform); } Debug.Log("[CircleVR Tracking System] Create Tracker : " + ID); Debug.Log("[CircleVR Tracking System] Tracker Count : " + trackers.Count.ToString()); return(trackerTransform); }
private void SetupContentServer(Configuration config) { CircleVR.DontDestroyInstantiate("ContentServer", Vector3.zero, Quaternion.identity).AddComponent <CircleVRContentServer>().Init(config); }
private static void ClientSetup() { CircleVR.DontDestroyInstantiate("ClientTrackingDataFeeder", Vector3.zero, Quaternion.identity).AddComponent <CircleVRClientTrackingDataFeeder>(); Debug.Log("[TrackingSystem] Client Setup"); }
public static void InitBarrier(float barrierRadius, bool showBarrier) { barrier = CircleVR.DontDestroyInstantiate("Barrier", Vector3.zero, Quaternion.identity).AddComponent <CircleVRBarrier>(); barrier.Init(barrierRadius, Object.FindObjectOfType <CircleVR>().barrierMaterial, showBarrier); }
private void SetupContentClient() { CircleVR.DontDestroyInstantiate("ContentClient", Vector3.zero, Quaternion.identity).AddComponent<CircleVRContentClient>(); }