Anatta336 / driven-decals

A mesh-based PBR decal system for Unity's universal render pipeline.
MIT License
576 stars 75 forks source link

sad NullReferenceException :( #6

Closed SjoesVersions closed 3 years ago

SjoesVersions commented 3 years ago

Dear Anatta336,

This packes is so promising! and we actually ot it to work quite fast. But then after one push/pull action in unity-colab the following nullreference exception started showing up (please check below).

Tried reboot and re-instals obviously. But nothing worked. It seems to be an error in the driver decal asset.

Hope that you could help us out easily!

NullReferenceException: Object reference not set to an instance of an object SamDriver.Decal.DecalMesh+d55.MoveNext () (at Library/PackageCache/com.samdriver.driven-decals@98db554268/Runtime/DecalMesh.cs:407) System.Linq.Enumerable.Any[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) SamDriver.Decal.DecalMesh.get_HasMeshToProjectAgainst () (at Library/PackageCache/com.samdriver.driven-decals@98db554268/Runtime/DecalMesh.cs:104) SamDriver.Decal.DecalMeshInspector.ProjectMeshButtonGUI (SamDriver.Decal.DecalMesh primaryItem, SamDriver.Decal.DecalMesh[] items, System.Boolean isEditingMultipleObjects) (at Library/PackageCache/com.samdriver.driven-decals@98db554268/Editor/DecalMeshInspector.cs:72) SamDriver.Decal.DecalMeshInspector.OnInspectorGUI () (at Library/PackageCache/com.samdriver.driven-decals@98db554268/Editor/DecalMeshInspector.cs:42) UnityEditor.UIElements.InspectorElement+<>c__DisplayClass58_0.b0 () (at /Users/bokken/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:527) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

SjoesVersions commented 3 years ago

I feel a litlle ashamed.

The day of this post i felt rushed for no good reason and made a simple mistake. I added a mesh-filter component to one of my models. But i didn't link it to an actual mesh - hence the nullreference exception.

We found out a litlle while later that this was in fact the problem.

I assume, happily, that you haven't invested any time into this issue yet.

...

The problem was to simple to speak of.

I hope to have not been to much of a nuissance!

And many, many thanks for a wonderfull package. It will solve technically exactly what we need.