Probuilder ShapeGenerator crash on iOS deployment with LWRP or URP

When building and deploying to iOS Probuilder using ShapeGenerator on LWRP or URP at runtime crashes. Tested on Unity 2019.2 and 2019.3, Probuilder 4.2.1 URP 7.1.5 LWRP 7.1.5

ProBuilderMesh box = ShapeGenerator.GeneratePlane(PivotLocation.Center, 5, 5, 0, 0, Axis.Forward);
Crash when running app on mobile:

NullReferenceException: Object reference not set to an instance of an object.
Wed 18 10:40:43.824 RemoteConsole <stdout>:  at UnityEngine.ProBuilder.BuiltinMaterials.Init () [0x00000] in <00000000000000000000000000000000>:0
Wed 18 10:40:43.824 RemoteConsole <stdout>:  at UnityEngine.ProBuilder.BuiltinMaterials.get_defaultMaterial () [0x00000] in <00000000000000000000000000000000>:0
Wed 18 10:40:43.824 RemoteConsole <stdout>:   at UnityEngine.ProBuilder.Face..ctor (System.Collections.Generic.IEnumerable`1[T] indices) [0x00000] in <00000000000000000000000000000000>:0
Wed 18 10:40:43.824 RemoteConsole <stdout>:   at UnityEngine.ProBuilder.ShapeGenerator.GeneratePlane (UnityEngine.ProBuilder.PivotLocation pivotType, System.Single width, System.Single height, System.Int32 widthCuts, System.Int32 heightCuts, UnityEngine.ProBuilder.Axis axis) [0x00000] in <00000000000000000000000000000000>:0
Wed 18 10:40:43.824 RemoteConsole <stdout>:  at TestPlane.Start () [0x00000] in <00000000000000000000000000000000>:0

I’ve logged bug report Case 1206331

Anyone knows a workaround to progress please?

Thanks a bunch

Yes it is fixed with new preview package. My team have submited that same bug on android and it has been fixed just update your probuilder package to 4.3.0 preview 1 with (show preview packages). :slight_smile:

1 Like

Thanks @Aetrix works great ! :slight_smile: