void StartMultiMonitor() { GameObject monitorBase = transform.GetChild(0).gameObject; monitorBase.SetActive(false); int nScreen = DesktopCapturePlugin_GetNDesks(); int iScreenIndex = 0; for (int s = 0; s < nScreen; s++) { GameObject monitor = GameObject.Instantiate(monitorBase); if ((MultiMonitorScreen != 0) && (MultiMonitorScreen != (s + 1))) { continue; } monitor.name = "Monitor " + (s + 1).ToString(); VdmDesktop desk = monitor.AddComponent <VdmDesktop>(); desk.Screen = s; desk.ScreenIndex = iScreenIndex; iScreenIndex++; monitor.transform.SetParent(transform); monitor.SetActive(true); } }
void joinAndShareScreen() { //videoDropDowns.value = 5; //callappUI.JoinButtonPressed(); vdmDesktop = FindObjectOfType <VdmDesktop>(); vdmDesktop.Show(); virtualCamera.parent = vdmDesktop.transform; }
void StartFirstMonitor() { GameObject monitor = transform.GetChild(0).gameObject; monitor.SetActive(false); int nScreen = DesktopCapturePlugin_GetNDesks(); int iScreenIndex = 0; monitor.name = "Monitor1 "; VdmDesktop desk = monitor.AddComponent <VdmDesktop>(); desk.Screen = 0; desk.ScreenIndex = iScreenIndex; iScreenIndex++; monitor.transform.SetParent(transform); monitor.SetActive(true); }
private bool m_forceMouseTrail = false; // Otherwise cursor is not visible // Use this for initialization IEnumerator Start() { Instance = this; ReInit(); GameObject monitorBase = transform.GetChild(0).gameObject; monitorBase.SetActive(false); int nScreen = DesktopCapturePlugin_GetNDesks(); int iScreenIndex = 0; for (int s = 0; s < nScreen; s++) { GameObject monitor = GameObject.Instantiate(monitorBase); if ((MultiMonitorScreen != 0) && (MultiMonitorScreen != (s + 1))) { continue; } monitor.name = "Monitor " + (s + 1).ToString(); VdmDesktop desk = monitor.AddComponent <VdmDesktop>(); desk.Screen = s; desk.ScreenIndex = iScreenIndex; iScreenIndex++; monitor.transform.SetParent(transform); monitor.SetActive(true); } yield return(new WaitForSeconds(1)); #if VDM_SteamVR RefreshControllers(); #endif StartCoroutine(OnRender()); }
public void Disconnect(VdmDesktop winDesk) { Monitors.Remove(winDesk); }
public void Connect(VdmDesktop winDesk) { Monitors.Add(winDesk); ReInit(); }
public Vector2 GetScreenOffset(VdmDesktop vdmDesktop) { var off = DesktopCapturePlugin_GetOrigin(vdmDesktop.ScreenId); return(new Vector2(off.X, off.Y)); }