This is my current setup to getting current blueprint variable values from class.
Is there a way to do this but without spawning an actor to get the variable value?
i feel there is a much more simpler/efficient way to do this.
FActorSpawnParameters SpawnParams;
SpawnParams.Owner = this;
SpawnParams.Instigator = Instigator;
FTransform TempTransform;
AActor* const TempSpawnObject = GetWorld()->SpawnActor<AActor>(MyBlueprintClass, TempTransform.GetLocation(), TempTransform.GetRotation().Rotator(), SpawnParams);
if (TempSpawnObject)
{
ACustomActor* const CustAct = Cast<ACustomActor>(TempSpawnObject);
if(CustAct)
{
CustAct->ReadCustomVariableValue
}
TempSpawnObject->Destroy();
}