Search Unity

BUG: Bezier Shape, easy fix

Discussion in 'World Building' started by CaseyHofland, Jul 27, 2019.

  1. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    613
    When exporting the bezier shape to an asset, it won't remove the "Pro Builder Mesh" script on the object because the "Bezier Shape" script depends on it.

    Windows 10, Unity 2019.2.0b7, ProBuilder 4.0.5 (using experimental features)

    To fix, all you would probably need a destroy call at the right line, so there.
    Code (CSharp):
    1. BezierShape bezierShape = GetComponent<BezierShape>();
    2. if (bezierShape)
    3.     Destroy(bezierShape);
    Or
    Destroy(GetComponent<BezierShape>())
    if you don't care about the explicit null call.



    Unrelated, and I don't know if this works / is optimized or not, but would you please make custom shaders for ProBuilder that work with the HD and LW Render Pipeline? It's that little bit of "annoying" that seems equally easy to take away (I know about assigning default material in preferences, just not everyone does.)

    EDIT:
    In fact, it would be nice to have the ProBuilder default materials exposed so you can assign them to other objects as well if you'd want to.
     
    Last edited: Jul 27, 2019