Best way to store/lookup UClasses

So I wish to store classes and pass around cheap references to them, including to and from a UI middleware that can’t easily store UClass pointers. What’s the best way to do this? Early research suggests UniqueIDs would be a good choice, as in the GetUniqueID method on UObjectBase that leads to a uint32 InternalIndex property. But it’s not clear how you resolve a UClass pointer from that UniqueID.

Any suggestions?

You probably want to use asset registries and/or object libraries:

These will allow you to reference UClasses without fully loading them into memory, which will save on load times, memory, and copying. It will allow you to load assets on demand when they’re actually needed.

If you want to pass class reference to and from the game, you can use FStringAssertReferences or just plain FStrings / strings. Everything else is likely to change when close and restarting the game.

The asset registry / object library stuff cancel mentioned is hugely useful, though.