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

How to get access to the new API?

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

  1. NikoSkakun

    NikoSkakun

    Joined:
    May 8, 2018
    Posts:
    7
    Hello. How to get access to the new API? I can use Editor tools, see documentation and sources, but cant work with the API in a regular MonoBehaviour script via [UnityEngine.ProBuilder]. I know that it is unstable, but I guess the API should be allowed to usage. Is it hidden or am I doing something wrong?
     
  2. kaarrrllll

    kaarrrllll

    Unity Technologies

    Joined:
    Aug 24, 2017
    Posts:
    552
  3. NikoSkakun

    NikoSkakun

    Joined:
    May 8, 2018
    Posts:
    7
    kaarrrllll, thank you for the answer. I just imported sources with examples to my project and it has been worked.
     
  4. WesleyRaymundo

    WesleyRaymundo

    Joined:
    Mar 7, 2015
    Posts:
    4
    It was a bit hard to find and understand the solution when I was Googling for it. But here it is...

    What to do in order to " using UnityEngine.ProBuilder; " in our scripts:

    1. Create a folder for scripts that you intend to use UnityEngine.ProBuilder;
    2. Create an Assembly Definition (right click > Create > Assembly Definition) - name it as you prefer;
    3. Add the Unity.ProBuilder to "Assembly Definition References"

    Now all scripts in the same folder of that Assembly Definition will allow "using UnityEngine.ProBuilder;".
    Also, all of it's subfolders if they hold not any other Assembly Definition in them.

    upload_2019-7-2_9-10-49.png

    Happy coding for you!
     
    DemonFangZ likes this.
  5. orgelvarg

    orgelvarg

    Joined:
    May 27, 2019
    Posts:
    15
    What solved my problem was uninstalling the imported ProBuilder asset. After that I downloaded it via Window > Package Manager > Probuilder. Apparantly the asset has moved.