NullReferenceException on Calc Lightmap

Hi,

Every time I click the “Calc Lightmap” button an exception appears on the console right when the lightmap wizard pops up. Any idea what causes this?

NullReferenceException: Object reference not set to an instance of an object
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000]
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) [0x00000]
UnityEditor.InspectorWindow.OnGUI () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\Inspector\InspectorWindow.cs:351)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000] at UnityEngine.GUILayoutUtility.EndLayoutGroup () [0x00000]
UnityEngine.GUILayout.EndVertical () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Runtime\Export\Generated\GUILayout.cs:156)
UnityEditor.TerrainInspector.ShowSettings () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\TerrainEditor\TerrainInspector.cs:784)
UnityEditor.TerrainInspector.OnInspectorGUI () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\TerrainEditor\TerrainInspector.cs:925)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000]

hi there,

great tool, good forumwork. i like unity.
but:

yes, i have the prob to. no solution in sight. but i am working on it. someone from unity can hand us a tip? click on “calc lightmap” causes this:

++++++++++++++++++++++

NullReferenceException: Object reference not set to an instance of an object
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000]
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters) [0x00000]
UnityEditor.InspectorWindow.OnGUI () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\Inspector\InspectorWindow.cs:351)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000] at UnityEngine.GUILayoutUtility.EndLayoutGroup () [0x00000]
UnityEngine.GUILayout.EndVertical () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Runtime\Export\Generated\GUILayout.cs:156)
UnityEditor.TerrainInspector.ShowSettings () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\TerrainEditor\TerrainInspector.cs:784)
UnityEditor.TerrainInspector.OnInspectorGUI () (at C:\builds\unity-branches-2.5.x\unity-2.5.x\Editor\Mono\TerrainEditor\TerrainInspector.cs:925)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture) [0x00000]

+++++++++++++++++++++++++++++++++++++++++++++++++

btw: i did not found this thread with the search-function.

greetings from germany

i did a clean reinstallation of unity3d. the error is still there. tried it with a clean new project and a new scene. no luck. did you solve the problem?

This looks like it might be an error in the lightmap script. Are there any unusual circumstances as far as you are aware? (For example, letting you select the Create Lightmap command when there is no terrain in the scene.) Are you using OSX or Windows?

tx for reply. i work with vista64. a month ago it ran like a bat out of hell. the error only comes when first selecting the terrain, then in the terrain settings menu of the inspector the error occurs by clicking on calc lightmap…

when i do the same over pulldownmenu from “terrain” top, the error does not come. strange? … hmmm. i tested some around like trying to do a lightmapping without a terrain. the menu was greyed like i aspected. only the possibility to create a terrain.

btw, we will use unity for architecture-visualisation and game-demos. the tool is very promising.