detecting outermost parts of an object

for example: what do you think would be the way to detect cube's corners? or edges.

are you able to think of a way?

thanks for sharing, in advance.

What you will probably need to do is to simply loop through the vertices looking for the max and the min values for each of the three axes.

Vector3 maxX = Vector3.zero;
Vector3 minX = Vector3.zero;
Vector3 maxy = Vector3.zero;
Vector3 miny = Vector3.zero;
Vector3 maxz = Vector3.zero;
Vector3 minz = Vector3.zero;
foreach (Vector3 vertex in someMesh) {
    if (vertex.x > maxX.x) {
        maxX = vertex;
    }
    if (vertex.x < minX.x) {
        minX= vertex;
    }
    if (vertex.y > maxy.y) {
        maxy = vertex;
    }
    if (vertex.y < miny.x) {
        miny = vertex;
    }
    if (vertex.z > maxz.z) {
        maxz = vertex;
    }
    if (vertex.z < minz.z) {
        minz = vertex;
    }
}