#Create presets for a scene

2 messages · Page 1 of 1 (latest)

plucky oriole
#

Hello, I made something that moves and spawn objects behind it. I need different methods to place the objects.
I have an enum SpawnMethod that list scenes and an Array[SpawnMethod] property so I can choose one or more from the inspector.
My problem is that these have parameters too, and I don't know how to access them.

How would you approach this problem, where you need to select one or more way to do something inside a scene?
How can I create presets to fill the properties of a scene?
How can I be sure my SpawnMethod scenes share the same interface? (they at least have a spawn() function)

marsh eagle
#

What code have you so far?

I need different methods to place ...

Not sure why but you could have a setProperties for all and give a dictionary?

You could search for the "factory design pattern" online.