Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Probuilder 4. Where did GetFaceWithTriangle go?

Discussion in 'World Building' started by look001, Jan 8, 2019.

  1. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    20
    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!
     
    Last edited: Jan 8, 2019
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    92
    look001 likes this.
  3. kphipps

    kphipps

    Joined:
    Apr 26, 2013
    Posts:
    39
    Where do you get Probuilder 4 preview? I search for it and never find anything.
     
  4. look001

    look001

    Joined:
    Mar 23, 2017
    Posts:
    20
    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:
    Code (CSharp):
    1. {
    2.   "dependencies": {
    3.        ...
    4.        "com.unity.probuilder": "4.0.0-preview.39"
    5.    },
    6.   "registry": "http://staging-packages.unity.com"
    7. }
    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
     
    Last edited: Jan 11, 2019 at 12:02 PM
  5. kphipps

    kphipps

    Joined:
    Apr 26, 2013
    Posts:
    39
    Thank you. I saw this being mentioned but never had a clue as to how to get it.