Hi everyone,
i am currently using probuilder4.0.0-preview.34. I like the preview. For my new Project I want to use the new scripting api. I want the user to select a face at runtime for extruding later. With the old api i used the triangle Index of the RaycastHit. After that i figured out the face with GetFaceWithTriangle(). However it looks like this function no longer exists. Furthermore i noticed that the face picking moved to Editor only with a custom probuilder RaycastHit that contains the selected face. I can’t use it at runtime, since it uses the HandleUtility from UnityEditor to get overlaying gameobjects. What can i do to figure out the faces under the mouse at runtime?
Thank you! This might be a question to developer in specific. Thank you so much for this tool!
Good timing, I just recently updated the API examples with a picking example. You’ll need to be on the bleeding edge preview however, I believe it’s preview-38 that is compatible with the Github branch.
1 Like
Where do you get Probuilder 4 preview? I search for it and never find anything.
Thank you, very good examples!
Go in the packages folder inside of your project root folder. There should be a manifest.json. Open it and edit it like this:
{
"dependencies": {
...
"com.unity.probuilder": "4.0.0-preview.39"
},
"registry": "http://staging-packages.unity.com"
}
You can do this while you have your project opened. Unity will update it automatically. Also make sure you have Unity 2018.3+ for preview.39. You can find out about the newest staging versions on bintray
Thank you. I saw this being mentioned but never had a clue as to how to get it.