Godot Version
4.6.1
Question
Is there a way to create a dropdown in the inspector restricted to custom Scripts or Scenes?
I’m looking for something that works the way resources do in the inspector, like this:
This makes it easy to just staple things onto a more generic scene like “Loot” in this case.
I’m trying to do the same with a couple of other things in my game. For example, I’d like to just have a list of Effects I can spawn when I do whatever action. These Effects have a scene and a script and they inherit from one class_name. However, I cannot find a way to add a list like above without also adding a resource that references one of the other two.
From what I found, there is no Typing yet for PackedScenes and Scripts so exporting just lumps them all together. Otherwise, I would expect one of the following options to do what I want:
@export var effects_to_add: Array[Script<AddedEffect>]
@export var effects_to_add: Array[PackedScene<AddedEffect>]
Exporting the scene types directly also doesn’t work because it expects a scene from the scene tree which doesn’t match this use case.
I’m aware I can create a @tool script to generate resources for me or otherwise get around this and I might end up doing that. My question is whether or not I’m missing some way to get a custom list like this out of the box with Scripts or PackedScenes.
