FStreamableHandle in struct requirements

I am attempting to put a FStreamableHandle into a struct so that I can easily access them, and do comparisons through like an array.

when I try to put the FStreamableHandle into the struct I get told I must now declare operator=(const FMyStruct&) and FMyStruct(void) constructor, but attempting to declare a constructor tells me the constructor has already been declared.

how am I supposed to hold multiple of these handles if I can’t put them into a struct?

my plan was to hold the StreamableHandle along with a “uniqueID” and the objects that hold the requester of the asset that way I can do secondary checks for if I can release the asset, and if I need to even try to load it again.

//the struct is currently
USTRUCT()
struct FMyStruct
{
	GENERATED_USTRUCT_BODY();
public:
	FStreamableHandle Handle;
	int32 itemID = 0;
	TArray<UMyActorComp*> Requesters;
};

apparently FStreamableHandle is one of the few structs that must be stored as a pointer rather then a reference, which is inconsistent with most other structs in the engine,
in this case giving it a smart pointer wrapper fixed the issue.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.