#How to avoid error when calling a unique node that's null?

2 messages · Page 1 of 1 (latest)

magic kiln
#

how do I set up this check so godot doesn't throw an error warning when %NextDirection is null? It's being called before ready, otherwise it's always in the tree.

get_node_or_null() kinda defeats the point of using a unique name.

if %NextDirection:
  %NextDirection.hide()
proud heath
#

If %NextDirection==null: