Description:
Pinning the terrain item in the editor hotbar sometimes results in an error. The other items don't seem to have any issues.
To recreate:
Run the editor and open the item selection menu. Either drag and drop or click the terrain option to place it in the hotbar. Click and hold in the hotbar slot with the terrain item until it is pinned. Releasing the click results in an error but moving the mouse out of the terrain hotbar slot and then releasing doesn't result in an error. You don't have to pin the item for the error to show - tapping it with or without it being pinned also results in the same error.
The Error:Cannot call method 'instantiate' on a null value
The code it points to:
res://level_designer/items/preview_items/preview_display/complex_preview_display.gd
@tool
class_name ComplexPreviewDisplayData
extends PreviewDisplayData
@export var preview_scene: PackedScene
func create():
return preview_scene.instantiate() # <-- HERE
Cause of error:
Not too sure but something to do with the act of releasing mouse click while the cursor is within the hotbar slot holding the terrain.
Description: Pinning the terrain item in the editor hotbar sometimes results in an error. The other items don't seem to have any issues.
To recreate: Run the editor and open the item selection menu. Either drag and drop or click the terrain option to place it in the hotbar. Click and hold in the hotbar slot with the terrain item until it is pinned. Releasing the click results in an error but moving the mouse out of the terrain hotbar slot and then releasing doesn't result in an error. You don't have to pin the item for the error to show - tapping it with or without it being pinned also results in the same error.
The Error:
Cannot call method 'instantiate' on a null value
The code it points to: res://level_designer/items/preview_items/preview_display/complex_preview_display.gdCause of error: Not too sure but something to do with the act of releasing mouse click while the cursor is within the hotbar slot holding the terrain.