How to get asset class from selected actor in scene

Hi, I am writing some tools for ControlRig and am stuck trying to actually get the UControlRig from the selected actor.
I can get the actor via this snippet, but am unsure how to get the UControlRig asset is was created with.

My current goal is to check if the selected actors are of type UControlRig

	if (USelection* SelectedActors = GEditor->GetSelectedActors()) {
		for (FSelectionIterator Iter(*SelectedActors); Iter; ++Iter) {
			if ( AActor* Actor = Cast<AActor>(*Iter) ) {
				// Gets here
				if (UControlRig* ControlRig = Cast<UControlRig>( *Actor )) {
					// Does not get here
				}
			}
		}
	}

I apologize if this has been asked before, I am new to unreal engine.

Hello! But Selected Actors is collection of Actors, not Assets, Maybe this can help you

	FContentBrowserModule& ContentBrowserModule = FModuleManager::LoadModuleChecked<FContentBrowserModule>("ContentBrowser");
	TArray<FAssetData> SelectedAssets;
	ContentBrowserModule.Get().GetSelectedAssets(SelectedAssets);

	for ( auto AssetIt = SelectedAssets.CreateConstIterator(); AssetIt; ++AssetIt )
	{
		UClass* AssetClass = FindObject<UClass>(ANY_PACKAGE, *(*AssetIt).AssetClass.ToString());

		if ( AssetClass != NULL )
		{
			Selection.AddUnique(AssetClass);
		}
	}

Sorry I think I phrased it poorly, Once I drag a c++ asset in to the level it becomes an actor, So I want to know how to access the c++ class methods from the actor in the scene.

Ok… Once you drag a c++ asset in to the level it becomes an actor, that’s why you should Cast to an Actor class, not Asset class.

That makes sense, But it still leaves me with the issue of how would I determine if the selected actors (in this case a SkeletalMeshActor) belongs to a ControlRig

To elaborate, the control rig mannequin inherits UControlRig, when this blueprint is dragged into the editor it creates a SkeletalMeshActor in the world outliner. If the user selects this and runs my tool I need to check if that skeletalmeshactor supports a control rig

In hindsight I realize this is a separate question, I’ll make a new post for my control rig questions. Thank you for your insights