how to find a plane for plane.Raycast

I have added a plane to my scene. I want to now use the plane.Raycast function on that plane, but dont know how to retrieve it.

The following returns a gameobject, not a plane, so I get an error.

var plane: Plane;
plane = GameObject.Find("Backdrop");

a plane mesh attached to a gameobject doesn’t actually use the Plane class for anything.

It’s technically not even a plane because Planes expand infinitely.

instead you should test your Raycast against the collider on the gameobject.

var obj = (GameObject)GameObject.Find("Backdrop");
var coll = obj.collider;
if(coll.Raycast(...)) //do stuff

A Plane is a mathematical concept, not an object in your scene.

–Eric

Thanks for the input- collider worked 100%