Hi,
I added the needle engine and its related scripts to the existing unity project but got the following error, and none of the scenes were exported.
Hi Ashok,
The error “DivideByZeroException: Attempted to divide by zero” might be stemming from several potential issues when using the Needle Engine for exporting scenes in Unity. Here are some recommended troubleshooting steps:
-
Check Asset Dependencies: Ensure that all required assets (like meshes, materials, etc.) are properly referenced and not null. Missing references could lead to unexpected behaviors during export.
-
Active Scene: Make sure you are exporting the active scene correctly. The error may indicate that there was an attempt to access a property or perform a calculation using values that may not be initialized correctly (see the documentation).
-
Scene Saving: Ensure that your scenes are saved properly before exporting. You could be attempting to export an unsaved scene which could lead to errors (see the documentation).
-
Investigate Custom Scripts: Review any custom export scripts or modifications you have made. If you’ve changed or added to the Needle Engine’s export functionality, there might be an issue in your custom logic.
-
Debug Output: Enable more verbose logging to trace at what point the division by zero occurs. You can use the built-in debugging tools to print out values before the division operations.
-
Update Packages: Ensure that you are using the latest compatible version of Needle Engine and Unity. Sometimes bugs are fixed in newer releases that could potentially resolve such runtime issues (see releases) (see releases).
If these steps don’t resolve your issue, you might provide the project information using the menu item “Copy Project Info Into Clipboard” for more detailed diagnostics.
Feel free to share code snippets or specific configurations that relate to your export setup, so I can assist you further!
1 replies left - Get a PRO license for more AI replies.
thread_yknHZBpJjnD47iH6jm5yNv0h
Reply to this message to continue the conversation
Hi @Ashokkumar_KR as you can see in the log, that error comes from UnityGLTF, not from Needle. Could you please open an issue at https://github.com/khronosGroup/unityGLTF/ and follow the issue steps, most importantly, include a way to reproduce the issue?
You most likely have a degenerate mesh (0 vertices) or broken mesh data in your scene, but at least there should be a proper error on export and not an exception.
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.