Search Issue Tracker
Fixed in 2018.3.X
Votes
0
Found in
2018.3.0a2
Issue ID
1051678
Regression
Yes
NullReferenceException when selecting Tile Palette assets in Project view
If you create a Tile Palette asset while using the new Prefab system, you'll receive this warning:
GridPalette subasset not found from: Assets/New Palette.prefab
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
If you then select the Tile Palette asset in Project View you'll get a NullRef exception:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.GridPaintPaletteWindow.OnSelectionChange () (at C:/buildslave/unity/build/Modules/TilemapEditor/Editor/Managed/Grid/GridPaintPaletteWindow.cs:315)
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)
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/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/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:293)
UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:287)
UnityEditor.HostView.OnSelectionChange () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:165)
1. Install Unity
2. Open the attached project
3. Open the Tile Palette window
4. Create and save a new Tile Palette asset
5. Go to Project View and select the Tile Palette asset
Result:
Warning when creating the asset and then a nullref when selecting it in the Project view.
Expected Result:
The asset should be created without warnings and should not produce exceptions when selected in Project view
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Animator state transition preview clips are flickering when zooming in
- [Tile Palette] Sprites not rendering when brush tool "Paint a filled box with active brush" is used for the first time
- Adding available Nodes with longer names in Fragment Context window overflow Fragment Context window in Shader Graph
- "Layer Palette Profile" Asset is automatically applied to the second Terrain but doesn't load any layers
- "Terrain Tools" shortcut conflicts with the Overlays shortcut by default
Add comment