# Dedicated Server and World Partitioning (MissingLevelPackage)

**URL:** <https://forums.unrealengine.com/t/dedicated-server-and-world-partitioning-missinglevelpackage/602938>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, UE5-0, Packaging, question\
**Created:** [July 12, 2022, 7:14am UTC](https://forums.unrealengine.com/t/dedicated-server-and-world-partitioning-missinglevelpackage/602938 "2022-07-12T07:14:44Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![MikeSeese](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mikeseese/32/1022829_2.png) [@MikeSeese](https://forums.unrealengine.com/u/MikeSeese)\
**Post date:** [January 30, 2025, 4:21am UTC](https://forums.unrealengine.com/t/dedicated-server-and-world-partitioning-missinglevelpackage/602938/21 "2025-01-30T04:21:47Z")

</div>

I can confirm this fixed the issue for me in 5.4.4. Thanks so much! I believe this might worthwhile for a PR; are you interested in making the PR or shall I @alexdjq. Specifically here are the changes you need:

```diff
diff --git a/Engine/Source/Runtime/Engine/Private/LevelUtils.cpp b/Engine/Source/Runtime/Engine/Private/LevelUtils.cpp
index 94c190e10812..679026b70477 100644
--- a/Engine/Source/Runtime/Engine/Private/LevelUtils.cpp
+++ b/Engine/Source/Runtime/Engine/Private/LevelUtils.cpp
@@ -79,6 +79,26 @@ ULevelStreaming* FLevelUtils::FindStreamingLevel(const ULevel* Level)
 	return ULevelStreaming::FindStreamingLevel(Level);
 }
 
+static bool CompareRightMostSubPath(const FString& Lhs, const FString& Rhs)
+{
+	int32 LastSlashIndex = 0;
+	if (!Lhs.FindLastChar('/', LastSlashIndex))
+	{
+ return false;
+	}
+	int32 SubPathLength = Lhs.Len() - LastSlashIndex - 1;
+	bool bIsEqual = Lhs.Right(SubPathLength) == Rhs.Right(SubPathLength);
+	if (!bIsEqual)
+	{
+ if (Rhs.FindLastChar('/', LastSlashIndex))
+ {
+ SubPathLength = Rhs.Len() - LastSlashIndex - 1;
+ bIsEqual = Lhs.Right(SubPathLength) == Rhs.Right(SubPathLength);
+ }
+	}
+	return bIsEqual;
+}
+
 ULevelStreaming* FLevelUtils::FindStreamingLevel(UWorld* InWorld, const FName PackageName)
 {
 	ULevelStreaming* MatchingLevel = NULL;
@@ -91,6 +111,11 @@ ULevelStreaming* FLevelUtils::FindStreamingLevel(UWorld* InWorld, const FName Pa
 				MatchingLevel = CurStreamingLevel;
 				break;
 			}
+ if (CompareRightMostSubPath(PackageName.ToString(), CurStreamingLevel->GetWorldAssetPackageName()))
+ {
+ MatchingLevel = CurStreamingLevel;
+ break;
+ }
 		}
 	}
 	return MatchingLevel;

```

Note, `5.4.x` (fixed in `5.5.0`) also has a separate issue with connecting PIE clients to a packaged DS when using `ACharacter`: [Unreal 5.4 problem with a packaged game! Server spawns the character and client disconnecting with 'Failed to load package' error. - #10 by NV\_gnoowik](https://forums.unrealengine.com/t/unreal-5-4-problem-with-a-packaged-game-server-spawns-the-character-and-client-disconnecting-with-failed-to-load-package-error/1841350/10)

---

_[View the full topic](https://forums.unrealengine.com/t/dedicated-server-and-world-partitioning-missinglevelpackage/602938)._
