/Engine/Source/Runtime/CoreUObject/Public/Templates/Casts.h
It's from-castable if it's an interface or a UObject-derived type.
enum { Value = TIsIInterface<T>::Value || std::is_convertible_v<T*, const volatile UObject*> }