Hi! I was trying to pass an array to a FStreamableDelegate as a reference. This works fine when I change the argument for OnLoadRoomClasses to pass by value instead, so I have no problem doing that.
However, why does passing a reference to this delegate not work? Am I doing something wrong when passing by reference?
void ADungeonGameMode::LoadRoomClasses(const TArray<FRoomInformation>& RoomsInformation)
{
// ...
FStreamableDelegate Delegate = FStreamableDelegate::CreateUObject(this, &ADungeonGameMode::OnLoadRoomClasses, RoomsInformation);
// ...
}
void ADungeonGameMode::OnLoadRoomClasses(const TArray<FRoomInformation>& RoomsInformation)
{
// ...
}