Overlap Rect is always false

I made a rect from vertices and I can get Rect.Contains to work, but not Rect.Overlaps.

I’m trying to do something like when two rects intersect.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MakeARect : MonoBehaviour
{
    public List<Vector3> verts = new List<Vector3>();

    public List<Vector3> screenverts = new List<Vector3>();

    private Camera MainCam;

    public Rect rectVerts;

    public GameObject OtherRect;

    // Start is called before the first frame update
    void Start()
    {
        MainCam = Camera.main;
    }

    // Update is called once per frame
    void Update()
    {
        Mesh mesh = GetComponent<MeshFilter>().sharedMesh;
        Rect rectVerts = Rect.MinMaxRect(float.MaxValue, float.MaxValue, float.MinValue, float.MinValue);
        mesh.GetVertices(verts);

        for (int i = 0; i < verts.Count; i++)
        {
            Vector3 b = transform.TransformPoint(verts*);*

Vector3 e = MainCam.WorldToScreenPoint(b);

screenverts.Add(e);

if (e.x < rectVerts.xMin)
{
rectVerts.xMin = e.x;
}

if (e.y < rectVerts.yMin)
{
rectVerts.yMin = e.y;
}

if (e.x > rectVerts.xMax)
{
rectVerts.xMax = e.x;
}

if (e.y > rectVerts.yMax)
{
rectVerts.yMax = e.y;
}

}
for (int i = 0; i < screenverts.Count; i++)
{
if (rectVerts.Contains(OtherRect.GetComponent().screenverts*))*
{
Debug.Log(true);
}
else
{
Debug.Log(false);
}
}

if (rectVerts.Overlaps(OtherRect.GetComponent().rectVerts))
{
Debug.Log(true);
}
else
{
Debug.Log(false);
}

Debug.Log(rectVerts);
}
}

Figured it out.

The rects were at zero.

Changed it so it works now.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MakeARect : MonoBehaviour
{
    public List<Vector3> verts = new List<Vector3>();

    public List<Vector3> screenverts = new List<Vector3>();

    private Camera MainCam;

    public Rect TestRect;

    public GameObject OtherRect;

    // Start is called before the first frame update
    void Start()
    {
        MainCam = Camera.main;
    }

    // Update is called once per frame
    void Update()
    {
        Mesh mesh = GetComponent<MeshFilter>().sharedMesh;

        Rect rectVerts = Rect.MinMaxRect(float.MaxValue, float.MaxValue, float.MinValue, float.MinValue);

        mesh.GetVertices(verts);

        for (int i = 0; i < verts.Count; i++)
        {
            Vector3 b = transform.TransformPoint(verts*);*

Vector3 e = MainCam.WorldToScreenPoint(b);

if (e.x < rectVerts.xMin)
{
rectVerts.xMin = e.x;
}

if (e.y < rectVerts.yMin)
{
rectVerts.yMin = e.y;
}

if (e.x > rectVerts.xMax)
{
rectVerts.xMax = e.x;
}

if (e.y > rectVerts.yMax)
{
rectVerts.yMax = e.y;
}

}

TestRect = rectVerts;

Rect rect = OtherRect.GetComponent().TestRect;

if (rectVerts.Overlaps(rect))
{
Debug.Log(true);
}
else
{
Debug.Log(false);
}

Debug.Log(rectVerts);
}
}