Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    359
    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?
     
unityunity