public Transform GetCurrentMenuAnchorTransform()
        {
            MenuAnchor anchor = GetCurrentMenuAnchor();

            if (anchor == null)
            {
                return(null);
            }

            return(anchor.transform);
        }
Esempio n. 2
0
        private void Enable()
        {
            MenuAnchor anchor = menuPlacement.GetCurrentMenuAnchor();

            if (!anchor)
            {
                Debug.LogError("Error: could not enable color picker. Could not find current menu anchor from the MenuPlacement script.");

                return;
            }

            if (anchor.kind == MenuAnchor.Kind.SCREEN)
            {
                _isInVR = false;

                return;
            }

            _isInVR = true;
        }