Templated USTRUCT?

Is there any way to use templates/generics on USTRUCT objects (or even UCLASS)?

For example, something like the following:

USTRUCT(Blueprintable, Category = "Scripting|Remote Character|Attributes")
template<typename Type>
struct FRemoteCharacterSubAttribute
{
	GENERATED_USTRUCT_BODY();
public:
	FRemoteCharacterSubAttribute() {
		Name = FString(L"Unassigned");
		BaseCost = 0.0f;
	}

	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	FString Name;
	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	float BaseCost;
	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	Type MinValue;
	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	Type Value;
	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	Type MaxValue;
};

… And then you would use it like:

USTRUCT(Blueprintable, Category = "Scripting|Remote Character|Attributes")
struct FRemoteCharacterAttributes
{
	GENERATED_USTRUCT_BODY();
public:
	FRemoteCharacterAttributes() {
		fMovement.Name = FString("Movement");
		fMovement.BaseCost = 10.0f;
		fMovement.MinValue = 50.0f;
		fMovement.MaxValue = 500.0f;
		fMovement.Value = fMovement.MinValue;
	}

	UPROPERTY(BlueprintReadWrite, Category = "Scripting|Remote Character|Attributes")
	FRemoteCharacterSubAttribute<float> fMovement;
};

Any way to make this happen?

Hi Michael,

Template USTRUCTs, UCLASSES, UFUNCTIONs. etc. are not supported in any form, and are unlikely to be.

Steve

Is there any change on the subject of templates ?
Or any way to generate ustructs ?

Any news on this front?

template<typename T>
struct FTemplateStruct: public TSharedFromThis<FTemplateStruct> {

	TSubclassOf<T> Class;

	T* Object;

};

this is also not working, then the question, how to make sucha struct not to be cleared by garbage collector?