In C++ get the BP_Sky_Sphere

I want to get an instance of BP_Sky_Sphere to set some properties on it. However I cant find the class name for it. Is there a way to get BP type objects as classes in Unreal?

Generically how do I find the class name for something like this. But specifically:

Here is the code I would use IF I knew the class name “NOTSUREWHATTOPUTHERE”

if (GetWorld())
{
    TArray<AActor*> FoundActors;
    UGameplayStatics::GetAllActorsOfClass(GetWorld(), NOTSUREWHATTOPUTHERE::StaticClass(), FoundActors);
    for (AActor* actor : FoundActors)
    {
        //do stuff
    }
}

The solution I’d go with would be to have a parameter in the class that you’d get the sky sphere from like this:

UPROPERTY(EditAnywhere, Category = "Sky Sphere Class")
TSubclassOf<AActor> SkySphereClass;

Then you can set that variable in blueprints to your sky sphere class. After the class is set properly you can use that in the get all actors of class like this:

 if (GetWorld())
 {
     TArray<AActor*> FoundActors;
     UGameplayStatics::GetAllActorsOfClass(GetWorld(), SkySphereClass, FoundActors);
     for (AActor* actor : FoundActors)
     {
         //do stuff
     }
 }

It’ll be percieved as an actor though so you’ll probably have to figure out a way to Cast the actor to the closest possible class and then set the params that way.

Regards

When I do that the value for SkySphereClass is NULL event if I set it via the editor