Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ProBuilder SharedVertexHandle via Script??

Discussion in 'World Building' started by rawad25, Jul 18, 2020.

  1. rawad25

    rawad25

    Joined:
    Jul 17, 2020
    Posts:
    1
    hey

    i just want to know how can we obtain the sharedVertexHandle or SharedIndex via Script?
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
    You can get the shared vertex collection from `ProBuilderMesh.sharedVertices`, where the index of the vertex position in the sharedVertices array is the vertex handle. Generally though the API assumes that this kind of access will be done internally, and that externally you would be operating on position indices (either individually, or collections from ProBuilderMesh.GetCoincidentVertices).

    May I ask what you're trying to do that requires access to the vertex handle information?