UE5.1 「Ensure condition failed: !FindPin(FFunctionEntryHelper::GetWorldContextPinName()) 」が出た時



# エラー内容
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/249684/7627084a-5395-47fe-4b21-762ee0518586.png)
```
Error        LogOutputDevice           === Handled ensure: ===
Error        LogOutputDevice           Ensure condition failed: !FindPin(FFunctionEntryHelper::GetWorldContextPinName())  [File:D:\UnrealEngine\Engine\Source\Editor\BlueprintGraph\Private\K2Node_FunctionEntry.cpp] [Line: 404] 
Error        LogOutputDevice           Stack: 
Error        LogOutputDevice           [Callstack] 0x00007ffd74ac1c1a UnrealEditor-BlueprintGraph.dll!UK2Node_FunctionEntry::AllocateDefaultPins() [D:\UnrealEngine\Engine\Source\Editor\BlueprintGraph\Private\K2Node_FunctionEntry.cpp:404]
Error        LogOutputDevice           [Callstack] 0x00007ffd74aa3dc9 UnrealEditor-BlueprintGraph.dll!UK2Node::ReallocatePinsDuringReconstruction() [D:\UnrealEngine\Engine\Source\Editor\BlueprintGraph\Private\K2Node.cpp:640]
Error        LogOutputDevice           [Callstack] 0x00007ffd74aa5c6f UnrealEditor-BlueprintGraph.dll!UK2Node::ReconstructNode() [D:\UnrealEngine\Engine\Source\Editor\BlueprintGraph\Private\K2Node.cpp:741]
Error        LogOutputDevice           [Callstack] 0x00007ffd74a54617 UnrealEditor-BlueprintGraph.dll!UEdGraphSchema_K2::ReconstructNode() [D:\UnrealEngine\Engine\Source\Editor\BlueprintGraph\Private\EdGraphSchema_K2.cpp:4655]
Error        LogOutputDevice           [Callstack] 0x00007ffd794575a8 UnrealEditor-UnrealEd.dll!FBlueprintEditorUtils::ReconstructAllNodes() [D:\UnrealEngine\Engine\Source\Editor\UnrealEd\Private\Kismet2\BlueprintEditorUtils.cpp:601]
Error        LogOutputDevice           [Callstack] 0x00007ffd76f9a009 UnrealEditor-Kismet.dll!FBlueprintCompilationManagerImpl::FlushCompilationQueueImpl() [D:\UnrealEngine\Engine\Source\Editor\Kismet\Private\BlueprintCompilationManager.cpp:1189]
Error        LogOutputDevice           [Callstack] 0x00007ffd76f97568 UnrealEditor-Kismet.dll!FBlueprintCompilationManager::FlushCompilationQueue() [D:\UnrealEngine\Engine\Source\Editor\Kismet\Private\BlueprintCompilationManager.cpp:3272]
Error        LogOutputDevice           [Callstack] 0x00007ffe1aa63e20 UnrealEditor-CoreUObject.dll!FScopedClassDependencyGather::~FScopedClassDependencyGather() [D:\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\Blueprint\BlueprintSupport.cpp:515]
Error        LogOutputDevice           [Callstack] 0x00007ffe1ad1b946 UnrealEditor-CoreUObject.dll!FLinkerLoad::CreateExport() [D:\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:5243]
Error        LogOutputDevice           [Callstack] 0x00007ffe1ad1bd9b UnrealEditor-CoreUObject.dll!FLinkerLoad::CreateExportAndPreload() [D:\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3779]
Error        LogOutputDevice           [Callstack] 0x00007ffe1ad45041 UnrealEditor-CoreUObject.dll!FLinkerLoad::LoadAllObjects() [D:\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\LinkerLoad.cpp:3956]
Error        LogOutputDevice           [Callstack] 0x00007ffe1aedf2bb UnrealEditor-CoreUObject.dll!LoadPackageInternal() [D:\UnrealEngine\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp:1682]
```

# 参考にしたサイト
https://twitter.com/dlab_maru/status/1370619947974414337
https://forums.unrealengine.com/t/ensure-condition-failed-on-project-start/469587/3

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/249684/ec773f34-2be3-c533-311d-3859fbace27f.png)

# エラー個所を探す
WorldContextをFind in Blueprintで検索


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/249684/7d1304ab-2915-57a8-9c56-fa678b0559c4.png)

# WorldContextの削除
存在していないWorldContextがあるのでこれを削除したい


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/249684/b44a1a25-2a82-20cb-89f5-41b3a6f22160.png)

該当の関数をコピーしておく
関数を削除
ペーストする

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/249684/74b10d7e-17af-0c78-8a29-81927b7ee63e.png)

すると見えなかったWorldContextが見えるのでこれを削除