Download

Fill TMap with components

Hello!
I have TMaps created in C++, and I have Static Mesh Components created in Blueprint, is it possible to populate the maps with the components?

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Elevator")
TMap<TObjectPtr<UStaticMeshComponent>, float> DoorsMoveDistances;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Elevator")
TMap<TObjectPtr<UStaticMeshComponent>, FVector> DoorsInitialPositions;


These are my Static Mesh Components. I can neither drag them to the TMaps, nor pick them from the lists because lists are empty.