With UEFN 23.20 comes an important Verse change:
TL;DR
- We no longer use
.vmodule
files to define Verse modules but rather directory names in the file hierarchy -.vmodule
files are still supported but deprecated - Modules defined by directory names have
<internal>
access level as opposed to<public>
for.vmodule
files, so you might or might not see behavior change - Verse files and assets are freely intermingled in your
Content
folder, there is no longer a specialVerse
directory - UEFN template projects (parkour, starter) have been converted to new Verse code layout
- In your own UEFN project, please remove
.vmodule
files following the steps below
How to remove .vmodule
files from your UEFN project
Make sure your project is closed in UEFN. Leave your Verse code open in VS Code or your favorite editor. Then apply the following rules below:
- If your Verse files are inside a subdirectory named
Verse
at the root of yourContent
folder: Move them up one level and delete the (now empty)Verse
directory, then apply the rules below. - If you have a UEFN project named
MyProjectX
, and there is aMyProjectX.vmodule
file: DeleteMyProjectX.vmodule
. A hack is embedded in UEFN 23.20 that will, when you re-open your project, automagically repair all references to Verse classes you might have placed in assets by removing a leadingMyProjectX
symbol from their Verse paths, and then mark these assets dirty. To make the repair permanent, save these assets to disk. Note that this hack is only to help you transition and will get removed in the near future. - If you have a
.vmodule
file namedMyModule.vmodule
inside a directoryMyModule
: Simply delete it, as the directory name will serve as the module name (note it will switch from<public>
to<internal>
visibility, see point (6) for how to work around that). - If you have a
.vmodule
file namedMyModule.vmodule
inside a directoryMyDirectory
: Delete it and rename directoryMyDirectory
toMyModule
. - If you have a directory with Verse files but no
.vmodule
file: Move files up one directory level, then apply the rules again (or, alternatively, leave them and accept that they are now forming a submodule named like the directory and change calling code accordingly). - The above changes might change the access level of your module from
<public>
to<internal>
, since that is the default access level for modules defined via directories. In most cases this will work just fine. However, if you need your module to be<public>
, you have to place a module macro in a Verse file adjacent to your directory that specifiesMyModule<public> := module:
. Multiple definitions of modules are allowed (called partial module definitions, as long as only one is explicit (a module macro). - Make sure that any class referenced by any of your assets (e.g. a class derived from
creative_device
placed in the level) remains at the same place in the module hierarchy, or your device might no longer be found. See (2) for an exception to this rule.
I understand this is a mouthful! If you have any questions please reply to this thread!