Possibility to "hide" Plugin Content?

Dear Community,

the company I am working for is providing an unreal plugin, that allows users to easily create multiplayer vr content in Blueprints.

Now we would like to be able to “hide” the avatar files (Meshes, Materials, Animations) that are related to our plugin or make them unaccessable for the user. The goal is that the users of our plugin are unable to export our avatars and use them in another project. The files of the avatars should only be available in projects that containh our plugin, but not be exposed to the users.

I personally think that this is not possible, but I hope that I am wrong…

Is this a use case that is covered in the Unreal Engine and if yes, how could we achieve that?

Thank you already in advance for your feedback!

Greetings from Munich

It;'s not direct answer to what you looking for but i might direct you in some possible solutions based on my knowledge

There is way to disable export (by export i mean from uasset to fbx for example), it a option in package flags, PKG_DisallowExport :

You can set them in UPackage (in Unreal defintion, package is a file contain the asset, in case of editor is uasset), you can get asset package via Asset Registry:

https://docs.unrealengine.com/en-US/API/Runtime/AssetRegistry/IAssetRegistry/index.html

…in FAssetData (there ways to get it):

https://docs.unrealengine.com/en-US/API/Runtime/AssetRegistry/FAssetData/GetPackage/index.html

No there is no conventional way to disable plugin in content browser if you use assets in plugin, but there might be way to load assets in Asset Registry (as this what keep tracks of assets, Content Browser in reality is just it’s viewer) in unconventional way, way that Content Broser won’t show it, i would research Asset Registry APIs and UPackage APIs.

Keep in mind that uasset can be copied to other projects very easily, but i can see there might be way to package them more conventionally with UE4 APIs in the way that UE4 alone won’t be able to know how to load those assets, i would explore that. But if you do that you probably need to watch out on shipping build packaging, if this doesn’t mess up packaging process for your users

That said, regardless what method you use, if somebody is determent to get those assets and have skills they will do it. even if you do some kind of encryption, computer will beed a key to decrypt it and hackers can capture that key. So you can only make data miners life harder but you wont prevent them for getting data. But if you just want simple users to move assets there might be the way by messing with asset registry and packaging of assets.

I would also check compatibility with what you doing with marketplace guidelines, if it’s allowed by the rules.

Thank you very much for your reply! We will investigate in that direction!
For everyone who is interested in that topic, I will post the other sources that I am using regarding that topic here as well:

https://forums.unrealengine.com/unreal-engine/marketplace/1674415-possibility-of-hiding-plugin-content
https://stackoverflow.com/questions/58417311/possibility-to-hide-plugin-content-in-unreal-engine-4
https://www.reddit.com/r/unrealengine/comments/djm7y4/possibility_to_hide_plugin_content/

In case I find a solviong solution, I will share it with you here!

Greetings

Just in case anyone else came across this topic. If you want to prevent certain folders to appear in the content browser you can add it to a permission list.

FAssetToolsModule::GetModule().Get().GetFolderPermissionList()->AddDenyListItem("PluginPathFilters", PluginMountPath);

Where the first parameter is a key for unreal to keep track of different lists and PluginMountPath is usually in the format “/YourPluginName/”.

A simple example :slight_smile:

// Retrieving your plugin asset path
TSharedPtr<IPlugin> ModPlugin = IPluginManager::GetYourPluginSomehow...
FString PluginMountPath = ModPlugin->GetMountedAssetPath();

// Deny access to the plugin folder
FAssetToolsModule::GetModule().Get().GetFolderPermissionList()->AddDenyListItem("PluginPathFilters", PluginMountPath);

I’m developping a great water plugin however its based on shader and have risk to leaking my shader code via Material Editor’s HLSL code view window.

Can you tell me how i can hide my material.usasset ?