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);
        }
    }
예제 #2
0
 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);
    }
예제 #4
0
    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());
    }
예제 #5
0
 public void Disconnect(VdmDesktop winDesk)
 {
     Monitors.Remove(winDesk);
 }
예제 #6
0
    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));
    }