Exemple #1
0
        protected bool PickGameObject(Vector2 position)
        {
            GameObject pickedObject = SceneUtility.PickGameObject(position);

            if (pickedObject != null)
            {
                if (pickedObject != m_gameObject)
                {
                    SetGameObject(pickedObject);
                }

                return(true);
            }
            else
            {
                m_gameObject = null;
                return(false);
            }
        }
Exemple #2
0
        protected bool Raycast(Vector2 position)
        {
            Ray ray = HandleUtility.GUIPointToWorldRay(position);

            return(SceneUtility.IntersectRayMesh(ray, m_mesh, m_matrix, out m_raycastHit));
        }