Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Access to Subdivide function from API

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

  1. chmodseven

    chmodseven

    Joined:
    Jul 20, 2012
    Posts:
    111
    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?