NegInfinity / ProjectExodus

Project Exodus - Unity to Unreal scene/project transfer tool.
BSD 3-Clause "New" or "Revised" License
497 stars 100 forks source link

Error Exporting scene #27

Open trashie65 opened 4 years ago

trashie65 commented 4 years ago

Hi tried to export a scene.. no json file gets created and i get this error in Unity

NullReferenceException: Object reference not set to an instance of an object SceneExport.JsonMesh..ctor (SceneExport.MeshStorageKey meshKey, SceneExport.ResId id_, SceneExport.ResourceMapper resMap) (at Assets/ExodusExport/Scripts/Editor/Exporter/JsonMesh.cs:388) SceneExport.ResourceMapper.makeJsonMesh (SceneExport.MeshStorageKey meshKey, SceneExport.ResId id) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:560) SceneExport.ResourceMapper+<>c__DisplayClass59_0.b__5 (SceneExport.MeshStorageKey meshKey, System.Int32 idx, SceneExport.ResId id) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:648) SceneExport.ResourceMapper.saveResourceToPath[DstType,SrcType] (System.String baseDir, SrcType srcObj, System.Int32 objIndex, SceneExport.ResId objId, System.Int32 objCount, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:403) SceneExport.ResourceMapper.saveResourcesToPath[DstType,SrcType,StorageType] (System.Collections.Generic.List1[T] outObjectPaths, System.String baseDir, SceneExport.ResourceStorageWatcher2[Storage,Resource] objects, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:435) SceneExport.ResourceMapper.saveResourceToFolder (System.String baseDir, System.Boolean showGui, System.Collections.Generic.List`1[T] scenes, SceneExport.Logger logger, System.Boolean collectExternAssets) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:647) SceneExport.JsonProject.saveToFile (System.String filename, System.Boolean showGui, System.Boolean saveResourceFiles, SceneExport.Logger logger) (at Assets/ExodusExport/Scripts/Editor/Exporter/EditorOnly/JsonProject.cs:183) SceneExport.ExporterWindow.beginCurrentSceneExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:273) SceneExport.ExporterWindow.processExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:297) SceneExport.ExporterWindow.processExportButtons () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:184) SceneExport.ExporterWindow.OnGUI () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:214) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336) UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:129) UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421) UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401) UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511) UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307) UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176) UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245) UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at

Any Ideas please Thanks Tony

NegInfinity commented 4 years ago

Hi. Would you be willing to share the sample scene so I can take a look at it? You could send it to neginfinity000 (at) gmail.com or post a link here.

JanusVV commented 4 years ago

Hey there, i was hoping you found a solution. I am running into the same trouble.

NullReferenceException: Object reference not set to an instance of an object SceneExport.JsonAnimationEvent.writeRawJsonValue (SceneExport.FastJsonWriter writer) (at Assets/ExodusExport/Scripts/Editor/Exporter/JsonAnimationEvent.cs:15) SceneExport.FastJsonWriter.writeRawValue[T] (T val) (at Assets/ExodusExport/Scripts/Editor/Exporter/FastJsonWriter/CoreGenerics.cs:11) SceneExport.FastJsonWriter.writeValue[T] (T val) (at Assets/ExodusExport/Scripts/Editor/Exporter/FastJsonWriter/CoreGenerics.cs:16) SceneExport.FastJsonWriter.writeRawValue[T] (System.Collections.Generic.List1[T] values, System.Int32 stride) (at Assets/ExodusExport/Scripts/Editor/Exporter/FastJsonWriter/CoreGenerics.cs:163) SceneExport.FastJsonWriter.writeKeyVal[T] (System.String key, System.Collections.Generic.List1[T] val, System.Int32 stride) (at Assets/ExodusExport/Scripts/Editor/Exporter/FastJsonWriter/CoreGenerics.cs:76) SceneExport.FastJsonWriter.writeKeyVal[T] (System.String key, System.Collections.Generic.List1[T] val) (at Assets/ExodusExport/Scripts/Editor/Exporter/FastJsonWriter/CoreGenerics.cs:59) SceneExport.JsonAnimationClip.writeRawJsonValue (SceneExport.FastJsonWriter writer) (at Assets/ExodusExport/Scripts/Editor/Exporter/JsonAnimationClip.cs:39) SceneExport.Utility.toJsonString[T] (T arg) (at Assets/ExodusExport/Scripts/Editor/Exporter/Utility.cs:246) SceneExport.Utility.saveToJsonFile[T] (T arg, System.String filename) (at Assets/ExodusExport/Scripts/Editor/Exporter/Utility.cs:251) SceneExport.ResourceMapper.saveResourceToPath[DstType,SrcType] (System.String baseDir, SrcType srcObj, System.Int32 objIndex, SceneExport.ResId objId, System.Int32 objCount, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:415) SceneExport.ResourceMapper.saveResourcesToPath[DstType,SrcType,StorageType] (System.Collections.Generic.List1[T] outObjectPaths, System.String baseDir, SceneExport.ResourceStorageWatcher2[Storage,Resource] objects, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:435) SceneExport.ResourceMapper.saveResourceToFolder (System.String baseDir, System.Boolean showGui, System.Collections.Generic.List1[T] scenes, SceneExport.Logger logger, System.Boolean collectExternAssets) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:689) SceneExport.JsonProject.saveToFile (System.String filename, System.Boolean showGui, System.Boolean saveResourceFiles, SceneExport.Logger logger) (at Assets/ExodusExport/Scripts/Editor/Exporter/EditorOnly/JsonProject.cs:183) SceneExport.ExporterWindow.beginCurrentSceneExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:273) SceneExport.ExporterWindow.processExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:297) SceneExport.ExporterWindow.processExportButtons () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:184) SceneExport.ExporterWindow.OnGUI () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:214) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at :0) UnityEditor.HostView.Invoke (System.String methodName) (at :0) UnityEditor.HostView.OldOnGUI () (at :0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.OpenGate () (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <95b42489e2e04430a87c3760aa29fca2>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <35bab3c7b0dc4999845bcfccc7758d96>:0)

NegInfinity commented 4 years ago

Hi, @JanusVV

Thanks for the report.

  1. Which operating system and which unity version are you using?
  2. Would you be willing to share the scene or package, or at least tell hte name of the package that triggers this issue?
JanusVV commented 4 years ago

Hi @NegInfinity.

Thanks for responding!

I am using Unity 2019.3.14f1 on Windows 10. Can send you the package!

ScorpionGlory commented 4 years ago

hi I am running into the same trouble~~unity 2018.4.3f

Weixuanf commented 4 years ago

Same problem here, is there a solution yet? I'm Unity2019.4.11, Win10. The asset i'm trying to export is Dark City 2.0 (https://assetstore.unity.com/packages/3d/environments/sci-fi/dark-city2-cyberpunk-pack-133817) the test scene came with it.

NullReferenceException: Object reference not set to an instance of an object SceneExport.JsonMesh..ctor (SceneExport.MeshStorageKey meshKey, SceneExport.ResId id_, SceneExport.ResourceMapper resMap) (at Assets/ExodusExport/Scripts/Editor/Exporter/JsonMesh.cs:388) SceneExport.ResourceMapper.makeJsonMesh (SceneExport.MeshStorageKey meshKey, SceneExport.ResId id) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:560) SceneExport.ResourceMapper+<>c__DisplayClass59_0.b__5 (SceneExport.MeshStorageKey meshKey, System.Int32 idx, SceneExport.ResId id) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:648) SceneExport.ResourceMapper.saveResourceToPath[DstType,SrcType] (System.String baseDir, SrcType srcObj, System.Int32 objIndex, SceneExport.ResId objId, System.Int32 objCount, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:403) SceneExport.ResourceMapper.saveResourcesToPath[DstType,SrcType,StorageType] (System.Collections.Generic.List1[T] outObjectPaths, System.String baseDir, SceneExport.ResourceStorageWatcher2[Storage,Resource] objects, SceneExport.ResourceMapper+IndexedObjectConverter2[SrcType,ReturnType] converter, System.Func2[T,TResult] nameFunc, System.String baseName, System.Boolean showGui, System.Action1[T] dstProcessor) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:435) SceneExport.ResourceMapper.saveResourceToFolder (System.String baseDir, System.Boolean showGui, System.Collections.Generic.List`1[T] scenes, SceneExport.Logger logger, System.Boolean collectExternAssets) (at Assets/ExodusExport/Scripts/Editor/Exporter/ResourceMapper.cs:647) SceneExport.JsonProject.saveToFile (System.String filename, System.Boolean showGui, System.Boolean saveResourceFiles, SceneExport.Logger logger) (at Assets/ExodusExport/Scripts/Editor/Exporter/EditorOnly/JsonProject.cs:183) SceneExport.ExporterWindow.beginCurrentSceneExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:273) SceneExport.ExporterWindow.processExport () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:297) SceneExport.ExporterWindow.processExportButtons () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:184) SceneExport.ExporterWindow.OnGUI () (at Assets/ExodusExport/Scripts/Editor/GUI/ExporterWindow.cs:214) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <007193b7fa9c4ad1be5b26df6a654213>:0) UnityEditor.HostView.Invoke (System.String methodName) (at <007193b7fa9c4ad1be5b26df6a654213>:0) UnityEditor.HostView.OldOnGUI () (at <007193b7fa9c4ad1be5b26df6a654213>:0) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.OpenGate () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <356f1ddb1d524ad59c7a2c95775bb38e>:0) UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)

Weixuanf commented 4 years ago

Hi I just debugged a little bit and I think I found a solution. If your error trace also starts at ExodusExport/Scripts/Editor/Exporter/JsonMesh.cs:388, (check my comment above to see the complete error log of mine) this may help you. To check your error log, you need to open Console window, select Window on menu, ->General -> Console or simply do CTL+SHIFT+C inside Unity I'm using Unity 2018.3.0f2

Debug

I think the reason of the error here is at Assets/ExodusExport/Scripts/Editor/Exporter/JsonMesh.cs:388, inside public JsonMesh(MeshStorageKey meshKey, ResId id_, ResourceMapper resMap) I put some console logs here, and found that at line 388, var mesh = meshKey.mesh; is actually null value, so when you try to access name = mesh.name; at the next line, it throws NullReferenceException. debug unity log screenshot

Solution

The solution is actually simple, just add this one-line code if (mesh == null) return; after line 388 var mesh = meshKey.mesh; see photo: solution

By just adding these lines, I can finally export from Unity successfully. @NegInfinity maybe you can add this simple fix to your project so that other people won't have this issue any more? Let me know if this is a correct fix. Meanwhile, thank you for your great work, this is super useful tool for me!