FBlueprintNamespaceUtilities::GetObjectNamespace

Analyzes the given object to determine its explicitly-assigned namespace identifier, or otherwise returns its default namespace.