Hello everyone,
I was just trying to add values to a TMap on Constructor in order to give some default values and for some reason it fires an exception,
My Tmap is quite a standar UPROPERTY;
UPROPERTY(BlueprintReadOnly, EditAnywhere)
TMap<EJinCondition,float> SprintDataMultiplayer;
And the Constructos is just a straightfoward add methods:
USprintMeterComponent::USprintMeterComponent()
{
//Populate the map with the proper values
SprintDataMultiplayer.Add(EJinCondition::Normal, 1.f); //Triggers Exception
SprintDataMultiplayer.Add(EJinCondition::Tired, 1.2f); //Triggers Exception
SprintDataMultiplayer.Add(EJinCondition::Exhausted, 1.5f); //Triggers Exception
SprintDataMultiplayer.Add(EJinCondition::Collapse, 2.f); //Triggers Exception
}
The thing is i can see the values being populated on editor despite of the exception. Unlucky for me there is no description of that exception on visual studio debugger.
If anyone knows somwthing about this issue would like to know how what I’m doing wrong.
Thanks in advance
Note: I’m using version 4.22.3