| 23 | } |
| 24 | |
| 25 | void SLevelEditorFlow::CreateFlowWidget() |
| 26 | { |
| 27 | if (const UFlowComponent* FlowComponent = FindFlowComponent(); FlowComponent && FlowComponent->RootFlow) |
| 28 | { |
| 29 | FlowAssetPath = FlowComponent->RootFlow->GetPathName(); |
| 30 | } |
| 31 | else |
| 32 | { |
| 33 | FlowAssetPath = FString(); |
| 34 | } |
| 35 | |
| 36 | ChildSlot |
| 37 | [ |
| 38 | SNew(SHorizontalBox) |
| 39 | + SHorizontalBox::Slot() |
| 40 | .AutoWidth() |
| 41 | [ |
| 42 | SNew(SObjectPropertyEntryBox) |
| 43 | .AllowedClass(GetDefault<UFlowGraphSettings>()->WorldAssetClass) |
| 44 | .DisplayThumbnail(false) |
| 45 | .OnObjectChanged(this, &SLevelEditorFlow::OnFlowChanged) |
| 46 | .ObjectPath(this, &SLevelEditorFlow::GetFlowAssetPath) // needs function to automatically refresh view upon data change |
| 47 | ] |
| 48 | ]; |
| 49 | } |
| 50 | |
| 51 | FString SLevelEditorFlow::GetFlowAssetPath() const |
| 52 | { |