It would be nice if there was possibility to create FName from FString.
Or if FGuid returned FName, because right now it only return FString.
Or if there would be some class that would generate random unique FNames.
It would be nice, for creating unique handles for objects, where they would be needed. I wanted to use FGuid, because GUIDs are guarantee to be world unique, but searching trough string is not most efficient thing.
I have different actors attached to other actor. Those actors should exist as long as effect, which affecting actor (like damage over time).
When effect ends, also associated effects should be destroyed. I figured out easiest way, will to to give Effect and Actors unique handle. When effects end, I would just search attached actors by handle and destroy them.
I didn’t wanted to use ints, because I don’t know any reliable way to generate unique numbers.
Anyway, thanks!. I didn’t now you can conver FString to TCHAR, this way.
You can just use the object address as a unique handle (the pointer to the UObject / AActor), if this is only for the duration of a game and doesn’t need to be persisted to disk.