for my current project I need to to bind some dlls for the game (Runtime). I tested it in the Editor (PIE) and everthing worked fine but after I packaged the game I get the error, that my dlls couldn’t be loaded. I find out that the Path from my plugin doesn’t point to a “valid” address.
I used common ways to load unload the dll. My plugin settings (Rules) can be compared with the Third Party Library Example plugin. The major differents between these settings is, that my setting type is Runtime not development.
What I want to know is, what do I need to do if an plugin is from the type “Runtime”, while I load dlls?
I saw that in the packaged Game has a Engine/Binaries/ThirdParty folder. But their are dlls such PhysX. VR, et cetera. Is it possible to write a Plugin (or something else) which store his binaries in the same folder? or in another folder where the engine can find it?
What I’m trying can be achieved by making the “ThirdParty Plugin example” runtime capable. Just create a new “ThirdParty Plugin” then change the Type to Runtime in the .uplugin file. But after that the engine cannot finde the dll direction in the packaged game
I meant more like “final result in game”. Why a dll is required in the first place (why you can’t ship exe logic in a single exe and extend it in blueprints).
Honestly you’re outside my experience here but pathing in DLC is a little tricky. If you are packaging the dll within a pak file I’ve found that:
Paths within the pak file are relative to its mount path (use the -List UnrealPak option to see where they are).
Paths within the pak file are the relative path between the point the pak file was created at and the files that were put in it. If you create a pak file at c:\afolder\mypakfile.pak then c:\afolder\bfolder\c.file will have the path bfolder\c.file
Mount point for a pak file is set within the FPakPlatformFile::Mount function (i.e. final path is combination of the path provided to mount AND the path within the packfile.
There is a second mount point, for unreal content (mounting uassets into the unreal asset browsing system). This is setup using FPackageName::RegisterMountPoint
For this second mount point new calls with and old mountpoint will replace previous calls, so you can’t mount two things to /DLC/ you’ll need /DLC1/ and /DLC2/
Really not sure if any of this helps you! Can you see the dll in the final packaged game directory structure?
Again, you’re outside my experence but mounting a dll sounds likely platform specific and something that has seemed not supported in the few places I’ve come across it, but I look forward to someone chiming in here and detailing how its going to work (especially in a nice wrapped up portable manner!).
I didn’t try it because I want to link dynamic not static. But I don’t see any way to achive this. I will mark your answer as best because at least it solve the problem. I hope this will be possible in the future
thanks for the helpful answer