Cast from string?

also having an array of actors where uaz, ural…

Is it possible to create a C ++ function for casting by string, let’s say having an array of strings, using forEach to iterate over all the available strings (like: uaz,ural…), turning to castTo uaz;castTo ural…?

the task is to make sure that the current forEach actor is UAZ, Ural, to refer to him after cast?

Hi there!
But whay dont use TArray or TArray>?
Anyway, you can try to find class with several things:

This tags eat up all generic methods )) I mean why dont use this

TArray<UClass*>

or

TArray<TSubclassOf<>>