C++ and Unreal newbie here. I have a class with a function I'm calling from a Blueprint. I want to create an array of floats (converted from a string) and push a value from Blueprint to it, but I'm getting an error I don't quite understand.
I'm declaring the array like this in my header file:
private:
TArray<float> SensorValues[5];
Then I try to push a value from my Blueprint in the cpp file:
void Test::UpdateSensor(FString SensorValue)
{
float sensorVal = FCString::Atof(*SensorValue);
SensorValues.Push(sensorVal);
}
Which results in this error:
error C2228: left of '.Push' must have class/struct/union
Any guidance?