示例#1
0
    //--------------------------------------------------

    //--------------------------------------------------
    private void HandlePointerOut(object sender, PointerEventArgs e)
    //--------------------------------------------------
    {
        #region Attempt at moving camera feeds
        //if (e.target.CompareTag("Grabbable"))
        //{
        //    EventSystem.current.SetSelectedGameObject(null);
        //    currentMonitor = null;
        //    Debug.Log("pointer out");
        //    Debug.Log("pointer out, current = " + currentMonitor.name);
        //}

        //if (e.target.comparetag("grabbable"))
        //{
        //    //highlightmeshrend = e.target.getcomponent<meshrenderer>();
        //    //highlightmeshrend.enabled = false;
        //    currentmonitor = null;
        //    //monitorselected = false;
        //    debug.log("pointer out");
        //    debug.log("pointer out, current = " + currentmonitor.name);
        //}
        #endregion
        if (e.target.CompareTag("Switchable"))
        {
            if (currentSmallMonitor != null)
            {
                currentSmallMonitor.GetComponent <Renderer>().material.color = originalColor;
                currentSmallMonitor = null;
            }
        }

        var button = e.target.GetComponent <Button>();
        if (button != null)
        {
            EventSystem.current.SetSelectedGameObject(null);
        }

        WatchButtonManager arrow = e.target.GetComponent <WatchButtonManager>();
        if (arrow != null)
        {
            arrow.PointerExit();
            EventSystem.current.SetSelectedGameObject(null);
        }
    }