For a spawner system in a game I’m working on, I want designers to be able to place Spawners in the level. These Spawners will then spawn enemies based on one or multiple SpawnTypes.
To do this, I created a Spawner C++ class from which the Spawner Blueprint is derived which contains the following variable:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "AI Spawner", Instanced)
TArray<class USpawnTypeCPP*> SpawnCondition;
This array shows up like this in the editor:
The problem with it is that when you click the drop-down menu to select the Spawn Condition to set, no options show up, even though there are 3 SpawnType blueprints based on the USpawnTypeCPP class. Once the SpawnType blueprints are opened, they do show up in the drop-down menu. Why is this happening and how do I fix it?
Alternatively, is there another way to do this? Basically what I want is an array of SpawnTypes which will for example check based on distance to the player, check if the player is in a certain position etc. When the SpawnType is set to check the distance, I want a distance variable to show up in the editor. When the SpawnType is set to area, I want a TriggerVolume variable to show up in the editor (and no distance variable) etc.
The full AISpawner C++ class: http://pastebin.com/8Sja9K2z
The SpawnType C++ UObject header: http://pastebin.com/nFJnbJPi
The SpawnType C++ UObject class: http://pastebin.com/DLMt614J