How to cast to UClass?

anonymous_user_d9228c26
Mon, 27 Apr 2020 16:44:42 +0000
Community & Industry Discussion

Example below is not working, but it illustrates what I want to get
I know that templates are not supported for UClass, but I’m searching for some version of cast which accepts uclass as a function parameter or any other workaround

class Foo {
    FString Name;
}

TSubClass<Foo> Bar;
TArray<Foo> arr;

FString Name = Cast<Bar.Get()>( arr[i] ).Name;

3 posts - 1 participant