How to match world time to rendertime when using persistent/sub-levels?

Hi All

My character class pretty much broke when I started using persistent levels and sub levels. I’ve traced the problem to an interaction function that uses last rendertime of the static mesh of an object and compares it to world time. The last rendertime is now out of sync with the world time.

How do I get a world time that would be in sync with the rendertime? The last rendertime seems to be lagging behind world time- I can be looking at the object and the rendertime will be 20.000 whilst world time will be 24.000…


I was using UGameplayStatics::GetRealTimeSeconds(). Using GetWorld()->TimeSeconds fixed it.