How to customize objects dialog?

Godot Version

4.2.1 MONO

Question

I have exported property Value. Property type is Variant.Type.Object

image

When I expand list of variants with possible values I see all possible values for this type.

But I want to customize this list with my values. How can I do it?

I couldn’t even create a export value with type Object, how do you do this?

@export var ccc: Object = Object.new()

error is “Export: type can only be built-in, a resource, a node, or an enum.”

You just need to set the export variable to your own custom class type.
For example an Effect class

@export var value: Effect

image
Then you extend that custom type and it’ll show all available types

Base class

extends Resource

class_name Effect

func execute_effect():
    pass

And a custom type BurnEffect

extends Effect

class_name Burn

func execute_effect():
    print("Burn")

It should be resource, node or enum

Value has dynamic type. It setup from _GetPropertiesList. It can extend MyClass or OtherClass. I want to change possible objects list and add to this list only types that extends used custom class.