Probuilder - How "extrude-scale" type Maya to create insert in a face?

Hi, I can create this extrusion in Unity with probuilder → unityExtrusion.png


How can I do this same extrusion again as shown in this maya image, kind of a double extrusion? → targetExtrusion.png

I’ll then use this final face to create a separate mesh and apply a different material to it.

How can I create this second extrude on the face?

So far I tried doing it twice with code but the face persists, as if no edges are created hence can’t extrude an insert further:

pb = ShapeGenerator.GenerateCube(PivotLocation.Center, new Vector3(width/ 100, heigth/ 100, depth / 100));

pb.Extrude(new Face[] { pb.faces[0]},ExtrudeMethod.IndividualFaces, -2.5f/100);
pb.ToMesh();
pb.Refresh();

// borders extrusion
pb.Extrude(new Face[] { pb.faces[6], pb.faces[9], pb.faces[7], pb.faces[8] },ExtrudeMethod.IndividualFaces, 2f / 100);
pb.ToMesh();
pb.Refresh();

I also tried translating the vertices for the face to then extrude but it appears upon extruding the protuding borders on the first step, no edges were created between the extruded face and borders , so doesn’t work->translatedVertex.png

If someone knows how to create an edge loop at runtime script that may also do it.

Thank you for your help!

Hi,
I am a beginner with the ProBuilder API, but have you tried using the ExtrudeElements.Extrude method instead?
https://docs.unity3d.com/Packages/com.unity.probuilder@4.0/api/UnityEngine.ProBuilder.MeshOperations.ExtrudeElements.html

hey @SgtLame that’s what I did, Extrude method is in this Class.

Maybe if I could find a workaround by inserting an edge loop for the second extrude but I can’t find how to do this in script, it appears pbMeshUtils could do this but this no longer exists Insert Edge Loop at Runtime