- Home /
Question by
SajevID · Aug 06, 2020 at 06:37 PM ·
androidbugandroid buildnullreferenceexceptionargumentexception
Probuilder throws ArgumentReferenceException when Extruding object on Android
Hey, I'm trying to Extrude a ProBuilder object during Runtime and it works on Editor but when testing on Android it gives me an ArgumentNullException... Unity version 2019.4.5f1. Probuilder version 2.9.8f3. Probuilder Script Stripping is disabled.
Android Logcat message:
ArgumentNullException: Value cannot be null.
Parameter name: indexes
at UnityEngine.ProBuilder.ProBuilderMesh.SetSharedTextures (System.Collections.Generic.IEnumerable`1[T] indexes) [0x00003] in <4c9e9fa7064947629b835adb911d8d48>:0
Code that gives the Error (Lines 4, 5, 6):
CurrentLevel = Shop.GetComponent<PlayerSeeds>().CurrentLevel;
ProBuilderMesh PB = gameObject.GetComponent<ProBuilderMesh>();
PB.Extrude (new Face[] {PB.faces[0]}, ExtrudeMethod.FaceNormal, CurrentLevel*50f);
PB.ToMesh();
PB.Refresh();
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613005050im_/https://answers.unity.com/themes/thub/images/avi.jpg)