Hi,
I tried to find information about this but I did not find anything. Is there a way to have custom .so which could be used by our UE application? If so, how? Is there any guide?
Thanks
Hi,
I tried to find information about this but I did not find anything. Is there a way to have custom .so which could be used by our UE application? If so, how? Is there any guide?
Thanks
Hi Wolfgang2k
What are you trying to add: a plugin, a Third Party Software (TPS) module, or something totally different?
For example, to add a TPS, you would put it in Engine/Source/ThirdParty/, in its own folder like: Engine/Source/ThirdParty/myNewLibrary
Then inside it, you would create myNewLibrary.Build.cs that would have references to your lib and include files. I suppose the simplest would be:
using UnrealBuildTool;
public class myNewLibrary : ModuleRules
{
public myNewLibrary(TargetInfo Target)
{
Type = ModuleType.External;
string myNewLibraryPath = UEBuildConfiguration.UEThirdPartySourceDirectory + "myNewLibrary/theLibrary";
string myNewLibraryLibPath = myNewLibraryPath + "lib/";
PublicIncludePaths.Add(myNewLibraryPath + "include");
if (Target.Platform == UnrealTargetPlatform.Android)
{
PublicLibraryPaths.Add(myNewLibraryLibPath + "Android/" + Target.Architecture);
PublicAdditionalLibraries.Add("myNewLibrary");
}
}
}
This assumes you put your source files in sub-folder theLibrary/ of that myNewLibrary TPS module, such as theLibrary/include/ for .h files, and theLibrary/lib/Android/x86/ or theLibrary/lib/Android/armeabi-v7a for .so.
To access this in the engine you would refer to your module by “myNewLibrary” and add it in appropriate engine’s .Build.cs part (as private or public), and include “myNewLibrary.h” (or whatever the name is for your definitions) in the code of that engine’s part.
Take a look at Engine/Source/ThirdParty/coremod , it has Android appropriate code and you can use it as a reference, then to find uses in the engine, do a: git grep coremod