Search Unity

Probuilder on WebGL NullReferenceException for simple GeneratePlane

Discussion in 'World Building' started by Tarrag, Jan 10, 2020.

  1. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    166
    Hi all

    Building project for WebGL, webpage crashes when creating a mesh with Probuilder at runtime. I'm finding this will crash it:
    Code (CSharp):
    1. ProBuilderMesh _box;
    2.     // Start is called before the first frame update
    3.     void Start()
    4.     {
    5.         _box = ShapeGenerator.GeneratePlane(PivotLocation.Center, 0.6f, 0.2f, 0, 0, Axis.Forward);
    6.     }
    browser console debug output:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object.
    It runs fine on editor.

    I've logged a bug report.

    Does anyone have any suggestions to work around this?

    Tested on Unity 2019.3.0f3, probuilder 4.2.1, URP 7.1.6, latest version chrome and firefox.

    Thanks a bunch for your thoughts
     
  2. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    166
    Ignore, solved in 4.3.0prev1, tripped twice on this one! :eek:
    im so ready for the weekend! :)
     
    Last edited: Jan 10, 2020
unityunity