I’m trying to achieve a moddable game, where users
- have access to a “GameCore” plugin that contains base classes
- can create their own plugin “MyGameDLC” with C++ classes and uassets that inherit from those base classes, and
- those DLC plugins would be scanned and loaded by the base game, which has no knowledge of the DLC plugins at moment of packaging. Scanning for plugins and their contents is not a worry at this stage. I’m just trying to get more information about the packaging process and wonder if I’m headed in the right direction.
I have a test project that has this setup:
TestGameProject
- TestGameCore plugin (enabled by default)
- TestGameDLC plugin (references TestGameCore classes, not enabled)
What’s relevant to note is that I have no problems sharing TestGameProject and TestGameCore with users, private source code will just simply be put in other plugins. What I’m trying to achieve is:
after building TestGameProject with just the TestGameCore plugin enabled, build the TestGameDLC plugin separately and have it dynamically be loaded by the prior. Building TestGameProject with just TestGameCore is obviously no problem. Now, I’m trying to build just TestGameDLC into a pak file, while it has its own source code that utilizes TestGameCore code.
I’m trying to build it with this command:
"D:\UnrealEngine\Engine\Build\BatchFiles\RunUAT" -ScriptsForProject="%CD%\PluginProject.uproject" BuildCookRun -project="%CD%\PluginProject.uproject" -noP4 -clientconfig=Development -nocompileeditor -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=Win64 -build -cook -unversionedcookedcontent -pak -dlcname=TestGameDLC -DLCIncludeEngineContent -basedonreleaseversion=1.0.0 -stage -compressed -compile -CookDir="D:\PluginProject\Plugins\Content\TestGameDLC\Content"
but I’m running into packaging errors indicating that the source code in the plugin isn’t being compiled:
LogLinker: Warning: Can't find file '/Script/TestGameDLC'
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file '/Script/TestGameDLC'
LogLinker: Warning: Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogLinker: Warning: Can't find file '/Script/TestGameDLC'
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file '/Script/TestGameDLC'
LogLinker: Warning: Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogLinker: Warning: Can't find file '/Script/TestGameDLC'
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file '/Script/TestGameDLC'
LogLinker: Warning: Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogLinker: Warning: Can't find file '/Script/TestGameDLC'
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file '/Script/TestGameDLC'
LogLinker: Warning: Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogUObjectGlobals: Warning: Failed to load '/Script/TestGameDLC': Can't find file for asset '/Script/TestGameDLC' while loading NULL.
LogLinker: Warning: Unable to load TestDataAssetDLC with outer Package /Game/Data/TestDataAssetDLC because its class does not exist
Am I missing a switch that enables compilation of source code in DLC plugins? Secondly to anyone who has more experience with DLC, and hopefully DLC with code, is this the right general direction?