So we’ve been working with UE4 for a couple of months, and due to technical reasons we want to convert our blueprints to C++ classes.
I want to use the following function:
UGameplayStatics::GetAllActorsOfClass(this, MyClass, ActorsList)
My problem is with the second parameter of this function. I should pass the class that I want to search for. So I defined it as a local variable like this:
TSubclassOf<class ADilmunPlayerStart> MyClass;
So how can I set this variable, in code? I have a C++ class called ADilmunPlayerStart (which inherits from AActor), and I want to find all actors of this type.
Any help will be appreciated! Thanks.