Godot Version
v4.5.stable.official [876b29033]
Question
Hi all,
I want to be able to drag in a Marker3D-based scene onto my level scene, then select a particular Enemy type scene that the Marker3D will spawn.
My thought was to use custom resources, but do I need a custom resource for each enemy type, or could I simply add every enemy type to the Marker3D scene, then choose it from there?
It seems to me the best approach is making a resource for each enemy, but I wanted to confirm my understanding:
- Using a resource this way would prevent having Godot make copies at runtime
- If I wanted to add/change functionality, I could do so in the resource and it would apply to all markers using the resource (thus some flexibility)
Just to provide as much detail as possible, this is my current approach:
- Create an enemy scene
- Create an EnemyResource type that takes the new enemy scene as its export var
- Drag and drop the resource I want spawned on the Marker3D scene
My hesitation here is that I could always just have an export variable on the Marker3D scene that takes the inherited enemy class and choose that way. Are resources prefereable?