Add a class_name to something that extends Node and have it NOT appear in the node types dialog

Godot Version

v4.2.1

Question

Just as the title says, is there a way to hide classes from the node type inspector? I just want to be able to access my script from another script without that quirk.

No, it’s not possible. You don’t need to use class_name to access another script. You can use load() or preload()

Example:

extends Node


const MyOtherScript = preload('res://my_other_script.gd')


func _ready() -> void:
	if $MyOtherScript is MyOtherScript:
		print('yes')
	else:
		print('no')