Repository navigation
Path Conversion
Convert between relative and absolute import paths with a single click:
// Before: relative import
using { Textures }
// After: absolute path import
using { /creator@fortnite.com/MyProject/ProjectFiles/Textures }- How It Works
- What the Relative Form Is Measured Against
- When Conversion Declines
- Dot Notation Support
- Module Detection
- Digest Modules
- Settings
- Disabling Path Conversion
- Hover over any import statement line
- Click "Use absolute path" or "Use relative path" that appears above the import
- For ambiguous modules (found in multiple locations), choose from a list
- Or use "Use absolute paths for all" to convert all imports at once
The extension automatically detects your project's Verse path from the .uefnproject file.
Each of these actions is also a command; see Path Conversion commands.
"Use relative path" shortens the absolute path against the module the file sits in, which is the spelling the Verse compiler itself suggests — not against the project root.
A file in Content/Scripts converting /creator@fortnite.com/MyProject/Scripts/Gadgets/Tools gets:
using { Gadgets.Tools }and not the longer Scripts.Gadgets.Tools that measuring from the project root would produce.
Where the target is the file's own module, or one that encloses it, the bare module name is written instead: whatever encloses that module encloses the file too, so the name alone reaches it.
"Use relative path" proposes a shorter spelling and then resolves it back from the importing file, through the same search the other direction uses. Where the short form would reach a different module, or no module at all, the conversion is refused and the import is left as it is.
The conversion overwrites an import that compiles today, so refusing is the safe answer: a shortening that is not checked would replace a working import with one that silently points elsewhere.
Conversion also declines where there is no relative form to give — a built-in module, a path outside the project, a workspace with no .uefnproject, or an importing file the Content root does not hold.
The search for a module declared in code reads at most 100 .verse files. A project holding more than that is reported once per run:
This project holds more than 100 .verse files, which is as many as the search for a declared module reads. Imports that need one are left alone rather than pointed at a module found in part of the project; write those absolute paths by hand.
Imports needing that search are then left as they are. A sample of the project cannot answer either question the conversion depends on — a location it did not reach is missing from the list, and a namesake it did not reach is missing from the ambiguity — so a single match is no evidence the name is unambiguous. The notice is spent once for a whole document rather than repeated per import.
The extension properly handles Verse's dot notation for nested modules:
-
using { HUD.Textures }searches forTexturesmodule inHUDfolder -
using { UI.Components.Button }searches forButtoninUI/Componentspath - Converts to full paths like
/creator@fortnite.com/Project/HUD/Textures
The extension finds both:
- Implicit modules: Every folder in Content/ is automatically a module
-
Explicit modules: Code-defined using
ModuleName := module:syntax, including one declared inside another module, which converts in both directions
Resolution is backed by the Path Tree Caching layer, which is why conversion stays fast in large projects.
The extension skips digest modules that are already in their correct form:
-
/Fortnite.com/modules (e.g.,/Fortnite.com/Devices) -
/UnrealEngine.com/modules (e.g.,/UnrealEngine.com/Temporary/SpatialMath) -
/Verse.org/modules (e.g.,/Verse.org/Simulation)
These modules won't show the conversion CodeLens as they don't need to be converted.
Three settings govern this feature. See Configuration for the full reference.
| Setting | Default | Effect |
|---|---|---|
pathConversion.enableCodeLens |
true |
Whether the conversion actions appear at all |
pathConversion.codeLensVisibility |
"hover" |
"hover" shows them only while hovering; "always" keeps them visible |
pathConversion.codeLensHideDelay |
1000 |
Milliseconds before hiding after the cursor leaves, in hover mode |
If a module isn't found, see Troubleshooting.
If you prefer not to see the path conversion options when hovering:
- Open the Status Bar Menu (click "Verse Auto Imports" in the status bar)
- Toggle "Path Conversion Helper" off
- Or search for "Path Conversion" in VS Code settings (
Ctrl+,)
Install from the Marketplace · Report an issue · Discord · Changelog
Verse Auto Imports is an independent extension by VukeFN. Not affiliated with or endorsed by Epic Games. Verse, UEFN and Fortnite are trademarks of Epic Games, Inc.
How it works
Reference
Help