Download

SUGGESTION: Add support for polymorpheism in structs, in blueprints

If I have several structs that inherit from a base struct, I’d quite like to be able to pass those child structs as parameters to various blueprint methods that are expecting a base struct.

See attached image.
e753d1629bc37889224e8688474b3305514da28c.png

You can do that already using blueprint interfaces: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Types/Interface/UsingInterfaces/index.html

e.g. you want a base class called fruit and for apple to crunch when eaten and for orange to squirt? Make an interface called FruitInt with the method BeEaten. Go into your apple and orange blueprints and set up each blueprint to implement the fruit interface. Or, you can create a Fruit blueprint and have it implement the fruit interface, and then have Orange and Apple derive from the fruit blueprint.