Package SQLite DB

Hello,

Is it possible to package SQLite DB as another assets?

I can use it in packaged game but every one can see *.db file. It will be better to encrypt it like another content in UE4 packaged game.

Thanks.

Hey NickShargan,

I am attempting to understand this a bit more in detail. If you wouldn’t mind explaining a bit more of how you are using the .db file and the reason for wanting to encrypt or save it I can enter a robust feature request.

Let me know if you have further questions or comments.

Thanks,

I use DB for storing information about actors. For creating actors (anatomy objects) my build function require (Name, PathToMesh, PathToTextures, Location, Scaling, AnatomyParameters, …).
If DB not encoded in package mode everyone can copy it but I prefer leave it private.

Thank you for providing the extra bit of information as requested. I am going to look into this option as a feature request, and will return once I have a definitive answer.

Hey Nick,

I went ahead and entered a feature request for this issue (UE-27476). Thank you for the clarification and we appreciate you taking the time to enter the feature request. Let me know if you have further questions or need additional assistance.

Cheers,

As I found Jira is private but is it possible get some “read only” access to this issue?

Hi Nick,

You can include this in the pak file by adding some code to CopyBuildToStagingDirectory.automation.cs
inside CreateStagingManifest
just after we process
if (SC.StageTargetPlatform.StageMovies)
{…}

Add a call to SC.StageFiles including the file you want to stage.
Set the StageFileType.UFS. this file will be put into the pak file.
You will then need to modify the way you access that file at run time to use unreal file manager.

Let me know if you have any questions

You will then need to modify the way you access that file at run time to use unreal file manager.

How this way can be modified?

  1. I add line of code for make it possible to package *.db files in /Content/DB/

if (SC.StageTargetPlatform.StageMovies)

{

    SC.StageFiles(StagedFileTypeForMovies, CombinePaths(SC.LocalRoot, "Engine/Content/Movies"), "*", true, new string[] { "*.uasset", "*.umap" }, CombinePaths(SC.RelativeProjectRootForStage, "Engine/Content/Movies"), true, !Params.UsePak(SC.StageTargetPlatform)); </code></p>

SC.StageFiles(StagedFileTypeForMovies, CombinePaths(SC.ProjectRoot, “Content/Movies”), “", true, new string[] { ".uasset”, “*.umap” }, CombinePaths(SC.RelativeProjectRootForStage, “Content/Movies”), true, !Params.UsePak(SC.StageTargetPlatform));

}

// eliminate the sand box

SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, “Saved”, “Cooked”, SC.CookPlatform), “", true, new string[] { ".json” }, “”, true, !Params.UsePak(SC.StageTargetPlatform));


SC.StageFiles(StagedFileType.UFS, CombinePaths(SC.ProjectRoot, “Content”, “DB”, SC.CookPlatform), “", true, new string[] { ".db” }, “”, true, !Params.UsePak(SC.StageTargetPlatform));

  1. Rebuilt project AutomationScripts.Automation (in sources of UE4)

  2. Package game.

But it looks there is any access to DB. Should I change path to DB (not simply /DB/mydb.db ) ?