How to make a class template UPROPERTY-compatible?

TMap and TArray declarations don’t do anything per se. but the engine has hardcoding all over the place to handle them.

For example UnrealHeaderTool is hardcoded to parse TArrays and TMaps along with other primitive types :

And also a few wrapper types for objects :

In the reflection system these containers have specific FProperty implementations : FArrayProperty and FMapProperty.

In the editor code, graph pins have hardcoded support for those container types :

image

And finally as Seda pointed out, the blueprint nodes to handle these types use CustomThunk specifier to handle them as wildcard types. This part can be done with pretty much anything and is pretty much the only part you can realistically do. Here’s some good example for that.

2 Likes