Topic: Error: NullReferenceException: Object reference not set to an instance
(Firstly, I'd like to say this tool is fantastic. It saved me a huge bunch of time to transfer my terrains from 3dmax to unity. Thank you , my dear developers. )
I have met a wired problem, and stucked on it for a while. I have a terrain which is made in 3dmax, it is a collection of 1302 pieces of meshes, and every mesh has its material. I recieved a bunch of errors while applying the Mesh To Terrainl, but it seems to be the same type of error. (shown below) The wired part of this is when I convert the meshes piecewisely (10 pieces of meshes per time), there is no error appeared, but since I have 1300 pieces of meshes, it is too tedious to convert them 10 by 10.
Need help . . .
NullReferenceException: Object reference not set to an instance of an object
MeshToTerrain.GetColor (Vector3 curPoint, Single raycastDistance, Vector3 raycastDirection, Int32 mLayer, UnityEngine.Renderer& lastRenderer, System.Int32& triangles, UnityEngine.Vector3& verticles, UnityEngine.Vector2& uv) (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrain.cs:427)
MeshToTerrain.UpdateTexture (UnityEngine.Terrain t) (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrain.cs:1058)
MeshToTerrain.Update () (at Assets/Infinity Code/MeshToTerrain/Scripts/Editor/MeshToTerrain.cs:809)
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-runtime-and-classlibs/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-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/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:187)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:180)
UnityEditor.HostView.SendUpdate () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:245)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:217)