## debugger.gd class_name Debugger ## This function checks all exported properties of a Node to see if there are any unassigned in the editor. ## If there are unassigned properties, it will run into an error and pause the editor. static func assert_all_exported_properties(node: Node) -> void: var script: Script = node.get_script() var property_list: Array[Dictionary] = script.get_script_property_list() for property: Dictionary in property_list: if property.usage == PROPERTY_USAGE_SCRIPT_VARIABLE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE: var error_message: String = "-\"%s\"- property on node: -\"%s\"- is missing assignment" var property_name: String = property.name var property_value: Variant = node.get(property_name) assert(property_value != null, error_message % [property.name, str(node.get_path())])
or share this direct link: