UObjectLibrary of blueprint types in c++?

maybe Im doing something wrong but it seems it is not possible to get a object pointer onto a blueprint type from c++?

thus, something like this seems not possible

  1. Create a ATest : AActor{} in c++
  2. Create a blueprint BPTest with ATest as parent class
  3. Add some BPTests into an ObjectLibrary
  4. Add the object library to another c++ class (-> UObjectLibrary* ol)
  5. Try to fetch the object with
TArray<ATest *> tarr;
ol->GetObjects(tarr)

This is a valid cast and I dont understand why this shouldnt work. It seems the only workaround is to spawn blueprint types and access their properties that way. but that’s ugly.

Edit 2: The trick is to use the Class Default Object (CDO). This can be fetched with ->GetDefaultObject().
The problem with ue is that the concept of a type and an instance gets blurred and confusing.