Generics in blueprints

Hello everyone,

I’ve noticed that Blueprints currently lack true generic support, with wildcards only available in macros and having significant limitations. This forces a lot of code duplication and makes it harder to build flexible, type-safe workflows.

Are there any plans to expand generic functionality in Blueprints? Additionally, are there alternative approaches or best practices to achieve similar flexibility without relying on generics?

Any insights or updates would be greatly appreciated!

2 Likes

Seconded! Blueprints exists to make programming accessible, but I strongly believe Blueprints itself should also be made more accessible to programmers by including familiar techniques and data structures. Support for generics as seen in more traditional languages like Java would pair well with the ability to create Object Blueprints. I’m currently considering making a linked list blueprint, but the lack of generics means that I will need to use inheritance to manually recreate the linked list node blueprint for every use case. Better data structures allows for better optimization and data-driven game design.

agreed but blueprint is getting abandoned so it wont happen.

i tried to do it myself in c++ and it is possible but i found it too fragile since the compiler wont catch errors.

the easiest solution for now is to use FInstancedStructs