// in YourWindow.h
class xxx YourWindow : public SCompoundWidget
{
// other code...
FString ActorPath;
FString HandleActorPath() const {return ActorPath;}
void OnActorChanged(const FAssetData& InAsset) {ActorPath = InAsset.GetObjectPathString();}
}
// in YourWindow.cpp
SNew(SObjectPropertyEntryBox)
.AllowedClass(AActor::StaticClass())
.AllowClear(true)
.DisplayBrowse(true)
.DisplayUseSelected(true)
.ObjectPath(this, &YourWindow::HandleActorPath)
.OnObjectChanged(this, &YourWindow::OnActorChanged);
2 Likes