Topic: DevideByZeroException: Division by zero

Help me....I cannot sovled this problem

<error message>

DivideByZeroException: Division by zero
MeshToTerrainPrefs.OnTerrainsGUINew () (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrainPrefs.cs:500)
MeshToTerrainPrefs.OnTerrainsGUI () (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrainPrefs.cs:351)
MeshToTerrainPrefs.OnGUI () (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrainPrefs.cs:280)
MeshToTerrain.OnGUI () (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrain.cs:624)
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)

Post's attachments

Attachment icon dividebyzeroexception.PNG 371.32 kb, 194 downloads since 2016-06-14 

Re: DevideByZeroException: Division by zero

Hello.

It happened when resolutionPerPatch = 0.

How to fix it:
Add this to «MeshToTerrainPrefs.cs» Line 499:
if (resolutionPerPatch <1) resolutionPerPatch = 1;

Actually a fixed version is available for a long time through the built-in update system.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.