예제 #1
0
    static public Vector3 MinExtends(this Picker picker)
    {
        var     meshes   = picker.GetComponentsInChildren <MeshRenderer>();
        float   max      = -100;
        Vector3 position = picker.transform.position;

        foreach (var mesh in meshes)
        {
            if (mesh.bounds.extents.y > max)
            {
                max      = mesh.bounds.extents.y;
                position = mesh.bounds.extents;
            }
        }

        return(position);
    }