TArrayView and FString

Hello,
Does anyone know how to properly use FString with TArrayView?

If I try use an FString from this TArrayView

static const TArrayView<const FString> heights
{
	"srt",
	"med",
	"tal"
};

I always get weird a value. You can check that with UE_LOG.

This is just a guess but have you tried using the TEXT(“”) macro?

1 Like

You shouldn’t be using TarrayView with rValues, those elements will be gone from memory.
Use TArrayView to view an array that already exists.

Check this video at 6:24 YouTube

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.