# Meshing not working if mesh chunk has no material

**URL:** <https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025>\
**Category:** Bug Reports\
**Created:** [May 24, 2022, 8:33am UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025 "2022-05-24T08:33:09Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [May 24, 2022, 8:33am UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/1 "2022-05-24T08:33:09Z")

</div>

_Include the following details while filing a bug report (edit as applicable):_

- **Issue category** : Real-time Mapping-Depth
- **Device type & OS version** : Android 12, Sony Xperia 1 II
- **Host machine & OS version** : Mac / Windows 10
- **Issue Environment** : On Device
- **ARDK version** : 1.3.1
- **Unity version** : 2021.3.2f1

Bug reproduction steps:  
Setup meshing scene (using URP if needed)  
Go to mesh chunk prefab  
Remove material from mesh renderer

meshing stops working

Removing materials would be very beneficial for performance, so why does this break meshing

---

<div class="post-metadata">

**Author:** ![BBIT-Solutions](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BBIT-Solutions](https://community.nianticspatial.com/u/BBIT-Solutions)\
**Post date:** [May 24, 2022, 1:39pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/2 "2022-05-24T13:39:29Z")

</div>

I know, it’s not optimal for performance improvement, what you are probably looking for, but as a workaround, you could maybe set the “Use Invisible Material” checkbox in the ARMeshManager, to make it at least not visible anymore.

---

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [May 24, 2022, 2:04pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/3 "2022-05-24T14:04:54Z")

</div>

I already use an unlit material, which is opaque with cutoff, so performance is good. But having no material shouldn’t throw errors in my opinion

---

<div class="post-metadata">

**Author:** ![BBIT-Solutions](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BBIT-Solutions](https://community.nianticspatial.com/u/BBIT-Solutions)\
**Post date:** [May 24, 2022, 3:40pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/4 "2022-05-24T15:40:12Z")

</div>

Yes, i agree. Just guess, they probably made it, because it seems it is based on a MeshRenderer. And when you don’t assign any Material Unity usually renders that in pink. So probably they wanted to show an error instead, to identify it easier on development time… 🤔

---

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [May 24, 2022, 4:17pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/5 "2022-05-24T16:17:01Z")

</div>

MeshRenderer is not required to generate a mesh.  
If there is no shared material ot does not show anything at all, which is good for performance. If you put it at null it does become pink

---

<div class="post-metadata">

**Author:** ![BBIT-Solutions](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@BBIT-Solutions](https://community.nianticspatial.com/u/BBIT-Solutions)\
**Post date:** [May 24, 2022, 4:42pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/6 "2022-05-24T16:42:31Z")

</div>

That’s actually true. So, easiest solution/workaround would just be, disabling (or completely removing) MeshRenderer component from the mesh prefab

---

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [May 24, 2022, 6:03pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/7 "2022-05-24T18:03:25Z")

</div>

Might try, but might give the same error

---

<div class="post-metadata">

**Author:** ![David\_Quevedo](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/david_quevedo/32/567_2.png) [@David\_Quevedo](https://community.nianticspatial.com/u/David_Quevedo)\
**Post date:** [May 24, 2022, 11:56pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/8 "2022-05-24T23:56:24Z")

</div>

Hi @Dylan_Smit, is the issue here that there is an error being thrown (see below), or that the mesh isn’t being generated? I followed your steps with the Meshing example scene, and while the mesh wasn’t being rendered, it still seemed that there was mesh being generated (given the number of blocks and vertices increasing in the counter at the top of the screen, as would be expected when mesh is generated).

```auto
#Niantic.ARDK.Extensions.Meshing.MeshObjectsGenerator#: Failed to change the mesh material because the mesh prefab's MeshRenderer component lacks a shared material.
UnityEngine.Debug:LogError (object)
Niantic.ARDK.Utilities.Logging.UnityARLogHandler:Error (string) (at Assets/ARDK/Utilities/Logging/LogHandler/UnityARLogHandler.cs:41)
Niantic.ARDK.Utilities.Logging.ARLog:_Error (string) (at Assets/ARDK/Utilities/Logging/ARLog.cs:198)
Niantic.ARDK.Extensions.Meshing.MeshObjectsGenerator:SetUseInvisibleMaterial (bool) (at Assets/ARDK/Extensions/Meshing/MeshObjectsGenerator.cs:131)
Niantic.ARDK.Extensions.Meshing.ARMeshManager:SetUseInvisibleMaterial (bool) (at Assets/ARDK/Extensions/Meshing/ARMeshManager.cs:357)
Niantic.ARDK.Extensions.Meshing.ARMeshManager:ListenToSession () (at Assets/ARDK/Extensions/Meshing/ARMeshManager.cs:274)

```

---

<div class="post-metadata">

**Author:** ![Dylan\_Smit](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/dylan_smit/32/562_2.png) [@Dylan\_Smit](https://community.nianticspatial.com/u/Dylan_Smit)\
**Post date:** [May 25, 2022, 8:22pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/9 "2022-05-25T20:22:24Z")

</div>

Hey,  
I apparently had another issue that was fixed by reinstalling the app fully (not clicking build and run).  
If this error is not feature breaking I recommend making it a Logwarning instead of LogError

---

<div class="post-metadata">

**Author:** ![David\_Quevedo](https://sea2.discourse-cdn.com/niantic/user_avatar/community.nianticspatial.com/david_quevedo/32/567_2.png) [@David\_Quevedo](https://community.nianticspatial.com/u/David_Quevedo)\
**Post date:** [May 25, 2022, 9:31pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/10 "2022-05-25T21:31:02Z")

</div>

Good callout @Dylan_Smit, I’ll look into whether or not this actually feature breaking, and if it’s not I’ll make sure to forward the suggestion to the dev team to lower it to a warning.

---

<div class="post-metadata">

**Author:** ![Maverick\_Niantic](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@Maverick\_Niantic](https://community.nianticspatial.com/u/Maverick_Niantic)\
**Post date:** [March 5, 2026, 11:46pm UTC](https://community.nianticspatial.com/t/meshing-not-working-if-mesh-chunk-has-no-material/2025/11 "2026-03-05T23:46:57Z")

</div>

Age
