You can see the TArray contains two blueprints when the folder itself only contains one. I’m not sure what I’m doing wrong.
The full function:
void AWorldGeneration::CreateTiles(int ChunkIndex)
{
if (!ObjectLibrary)
{
ObjectLibrary = UObjectLibrary::CreateLibrary(ATile::StaticClass(), true, GIsEditor);
ObjectLibrary->AddToRoot();
}
int AssetNum = ObjectLibrary->LoadBlueprintsFromPath("/Game/Tiles");
TArray<UBlueprintGeneratedClass *> Tiles;
ObjectLibrary->GetObjects<UBlueprintGeneratedClass>(Tiles);
}