Download

Cast interface to class

void DoWork (TSharedRef<IBlueprintEditor,ESPMode::NotThreadSafe> ibedit )
{
	// how to cast ibedit from IBlueprintEditor interface to FBlueprintEditor class
	FBlueprintEditor* bpedit = Cast<FBlueprintEditor>(ibedit.GetObject());  // doesn't work
}

Hi newby question here. I have this parameter (IBlueprintEditor ibedit) I know it was implemented as FBlueprintEditor class, so how can I perform the cast? I’ve tried everything, please help.

Nevermind. I’ve been 2 hours stuck with this and then I found the answer online a few second after asking… sorry guys ty.

TSharedRef<FBlueprintEditor,ESPMode::NotThreadSafe> bpedit = StaticCastSharedRef<FBlueprintEditor>(ibedit);