Creating AActor instance from UClass

Hi guys,
I am willing to store an array of class “names” and, while needed, create new instances of the classes, using the class names from this array. I found out that I should use UClass for storing the class “name”, and there is this page in docs, showing how to use UClass to instantiate objects:

https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Objects/Creation/index.html#newobject

However, my classes will be not just UObjects, but Actors, deriver from AActor. Can I safely use the same functions listed in mentioned above docs page and then just cast returned objects to AActor type? Or is there other way to do that?

To spawn an AActor-derived class you MUST use SpawnActor and not NewObject etc.