There is a bug in the FLongPackagePathsSingleton() constructor, where it assumes that the location of your project directory is a direct child of the game’s root folder. If you have your project in a nested subfolder (like Projects/MyProject), you’ll end up with a duplicate entry for your project in the FLongPackagePathsSingleton.
I’m not sure if this causes any actual issues in the game, but it led me on a merry chase for a few hours though (ultimately determined that the issue I was investigating was not caused by this bug)
[Attachment Removed]
Steps to Reproduce
Create a new project in the same root folder as the engine, but add an additional subfolder folder between root and project folder. So instead of
Set it up like this:
Then create/install a plugin to MyProject that contains some uasset files.
Put a breakpoint anywhere after plugins have been loaded by the engine, and inspect the mount point tree for the ContentPathTree. You will see something like:
- RootFolderAbsolutePath
- Engine
- MyProject
- Config
- Content
- Saved
- Script
- Projects/MyProject
- Config
- Content
- Plugins
- Saved
- Script
Note that Plugins only exists under one of the folders.
[Attachment Removed]
Hello [mention removed],
Thanks for the detailed report. I’ve been able to reproduce this on my end in 5.7 and a recent source build from UE5-Main.
The invalid mount points you mention seem to come from how rebased project paths (../../../<ProjectName>/) are constructed and registered. There paths are also present even when the project is located outside the engine root directory.
So far this doesn’t seem to cause direct problems since valid mount points still seem to be the ones in use. I’ll keep digging into this and follow up soon.
Best,
Francisco
[Attachment Removed]
Locally I just hardcoded the path that’s assigned to RebasedGameDir to include “Projects” in the path that’s returned, because I wasn’t sure what a “rebased” path is supposed to mean. Is that the same thing as relative path? Is the expectation that FPaths::ProjectDir() (which returns the correct path as a relative path, at least on Windows) sometimes returns an absolute path, and “rebased” is just the one that’s always hardcoded to be relative?
[Attachment Removed]
Hello [mention removed],
The rebased paths are intended to be fixed paths relative to the engine folder. This is legacy behavior carried over from UE4.
I agree these fixed paths don’t work for cases where the project folder is not immediately inside the engine root. I’m going to file a bug report so the engine team can review this behavior.
In the meantime, your proposed fix seems appropiate for your use case. That said, if the valid mount points are also present, those should continue to be the ones the editor uses, so this may not necessarily cause functional issues.
Best,
Francisco
[Attachment Removed]
Hello [mention removed],
Thanks again for the report of this behavior.
I’ve submitted a bug report to the engine team so they can review this and propose an appropiate fix. You will be able to track its status here once it becomes publicly visible: https://issues.unrealengine.com/issue/UE\-372127
Please note that the issue tracker link may take some time to become available, as newly created tickets are not immediately published.
In the meantime, your workaround of adjusting the rebased path logic should remain a valid approach for your setup.
Let me know if you need anything else regarding this case. Otherwise, I’ll go ahead and close this case.
Best,
Francisco
[Attachment Removed]