KellanHiggins / AsciiFBXExporterForUnity

A tool to export any Unity GameObject into a FBX ASCII format
Other
806 stars 165 forks source link

If an object has null materials, FBX Mesh Getter does not succeed. #10

Closed KellanHiggins closed 2 years ago

KellanHiggins commented 8 years ago

On line 377 of FBXUnityMeshGetter.cs, must add a null check before getting the reference. If a null material is provided the system is unable to export.

Material mat = allMaterialsInThisMesh[i];
int referenceId = Mathf.Abs(mat.GetInstanceID());

if(mat == null)
...
KellanHiggins commented 2 years ago

Fixed this thanks to a nice PR from @DangerKiddy. Will be released soon.