Search Unity

Access to Subdivide function from API

Discussion in 'World Building' started by chmodseven, Sep 9, 2019.

  1. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    120
    Hi,

    I am working on a project that attempts to build up 3D representations of buildings from public geo data. I've been able to generate ProBuilder meshes easily enough using CreateShapeFromPolygon with the footprint data and an initial extrusion, however now I want to be able to select the top face of the resulting mesh and perform a number of subdivisions on it. That should in theory then allow me to cycle through the resulting verts for those faces and plug in more fine-grained height adjustments from a height data set.

    I can see that this is definitely doable via the editor interface using "Subdivide Faces" after selecting the faces with the editor tools, however I cannot find any such Subdivide method in any of the API doco or trawling through the classes that would allow me to do that.

    Has this function been exposed anywhere, and if not, could it be made public?