How to use get_properties_list()

Godot Version

Godot 4.2.1

Question

I have this script :

	var event_list : Dictionary = manager.get_event_list()
	var event : EventScript = event_list[event_id]
	
	var property_list = event.get_property_list()
	
	for data in property_list :
		var label = Label.new()
		label.text = str(event.get(data.name))
		root.add_child(label)

When I run it the data in property_list not only show the properties in EventScript but also Resource and RefCounted. How can I only capture properties in EventScript ?

I found the solution at this link. In case someone needs it :
https://www.reddit.com/r/godot/comments/15x0i42/how_can_i_list_the_properties_of_a_global/

1 Like