Error Unity exporter


(Arq Daniel Fragoso) #1

I cant publish mi escene on unity, always send me the same error, even on a diferent version of unity.

NullReferenceException: Object reference not set to an instance of an object
UnityGLTF.GLTFEditorExporter.ExportMaterial (UnityEngine.Material materialObj)
UnityGLTF.GLTFEditorExporter.ExportPrimitive (UnityEngine.GameObject gameObject)
UnityGLTF.GLTFEditorExporter.ExportMesh (System.String name, UnityEngine.GameObject[] primitives)
UnityGLTF.GLTFEditorExporter.ExportNode (UnityEngine.Transform nodeTransform, Int32 nodeCount)
UnityGLTF.GLTFEditorExporter.ExportNode (UnityEngine.Transform nodeTransform, Int32 nodeCount)
UnityGLTF.GLTFEditorExporter.ExportNode (UnityEngine.Transform nodeTransform, Int32 nodeCount)
UnityGLTF.GLTFEditorExporter.ExportScene (System.String name, UnityEngine.Transform[] rootObjTransforms)
UnityGLTF.GLTFEditorExporter.SaveGLTFandBin (System.String path, System.String fileName)
Sketchfab.SketchfabExporter.proceedToExportAndUpload () (at Assets/Sketchfab For Unity/Scripts/SketchfabExporter.cs:299)
Sketchfab.SketchfabExporter.OnGUI () (at Assets/Sketchfab For Unity/Scripts/SketchfabExporter.cs:125)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:295)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:288)
UnityEditor.HostView.InvokeOnGUI (Rect onGUIPosition) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:255)


#2

Hmm, can you make sure you’re using the latest version?

https://github.com/sketchfab/UnityGLTF/releases/latest


(Waleguene) #3

Hi @arq.daniel.fragoso,

The plugin is faling on a MeshRenderer component where the material (or one of the materials) is set to None.
I’m adding a note to fix this.
In the meantime, if your scene isn’t too complex, you can easily find this MeshRenderer component and either set a material or set material count to 0.


(Arq Daniel Fragoso) #4

Yes, i tried whit all versions. thanx


(Arq Daniel Fragoso) #5

Ok ok, thankoum i will try to check all mi material objets, i will tell us back.


(Arq Daniel Fragoso) #6

Thank you, now works perfectly, nut, i view some issues, the plugin fail to upload if mi model its over the limit MB, but the plugin dont show the MB of the upload.

And second, if a plublish again the same proyect, dont refresh the last one, the plugin make a new publication.


(Waleguene) #7

Hi @arq.daniel.fragoso,

Hum, the plugin should check and show a message if the file is over the limit, I’ll give a check to this, maybe it’s broken.
For the second point, the reupload feature has not been added yet to the plugins, so each export is a new model.
This is something planned but I don’t have any ETA yet.

Thanks!