C++ Code in UE Marketpalce packs ?

hey
I’m currently updating some of my marketplace packs to 5.1, however i decided to add some functionality “c++ code” to one of my asseet packs. I added basically just one c++ class exposed to blueprints.

My question is, where do i put the code when packing up the asset pack for submissioon “to update” ? The marketplace seller guideline, says something about c++ plugins, but i havent worked on a plugin it’s just one Actor c++ class

Hi A-J-K,

The only way to distribute c++ code on the Marketplace is with plugins I’m afraid, so you will have to convert your product to a plugin.

hey RecourseDesign
thank you for your answer, is there any in depth tutorial or docuentation on how to convert a project into a plugin ?

I don’t know about any tutorials that talk about “Converting”, but here is one that I thought was quite good about making one from scratch (Its the same in UE5):

and a video:

There is a lot of info on the internet about making plugins these days, try googling “ue4 creating plugin” or something like that if you need more info than the links above.

Thank you for the video link, i was actually reading about plugins however most videos and tutorials about plugins are about editor extension, like creating extra buttons and editor tools etc…

The whole plugin thing is a bit annoying to be honest :wink: Thanks again for your answer

1 Like

Yeah most plugins are “Editor” plugins - the type you’ll be wanting to make I’m guessing is a “Runtime” plugin…

I hope it goes well!

I got it to work, not to bad however a little bit annoying…

There is still one point i don’t understand, my pack is basically a asset pack with some functionality “c++”. All the assets i have in my pack like meshes, materials, blueprints etc… they have to be within the plugins folder in the editor right ? Not outside like in a classic “simple” asset pack within the content folder ?

I was reading through the marketplace guidelines but this part is kinda unclear for me

1 Like

That’s correct - they must be in the plugin “Content” folder. What I do is copy them out from there when they’re needed. Something like:

void rdBPclass::CopyPluginFiles() {

	FString path=FPaths::ProjectContentDir(),pluginpath=IPluginManager::Get().FindPlugin(TEXT("rdBPtools"))->GetContentDir();
	IPlatformFile& pf=FPlatformFileManager::Get().GetPlatformFile();
	makeDir(*(path/TEXT("rdBP/")),pf);

	copyFile(*(pluginpath/TEXT("Blueprints/BP_ContainerBase.uasset")),*(path/TEXT("rdBP/BP_ContainerBase.uasset")),pf);
	copyFile(*(pluginpath/TEXT("Blueprints/BP_RandomAssetBase.uasset")),*(path/TEXT("rdBP/BP_RandomAssetBase.uasset")),pf);
	copyFile(*(pluginpath/TEXT("Blueprints/BP_rdBPbase.uasset")),*(path/TEXT("rdBP/BP_rdBPbase.uasset")),pf);
	TSharedPtr<IPlugin> instPI=IPluginManager::Get().FindPlugin(TEXT("rdInst"));
	if(instPI) {
		pluginpath=instPI->GetContentDir();
		if(!pluginpath.IsEmpty()) {
			copyFile(*(pluginpath/TEXT("Blueprints/BP_ContainerBase_rdInst.uasset")),*(path/TEXT("rdBP/BP_ContainerBase_rdInst.uasset")),pf);
			copyFile(*(pluginpath/TEXT("Blueprints/BP_RandomAssetBase_rdInst.uasset")),*(path/TEXT("rdBP/BP_RandomAssetBase_rdInst.uasset")),pf);
		}
	}
}

perfect, thanks a lot again!

1 Like

I assume you are meaning Runtime plugins rather than Editor plugins?

Well i see the problem but do we have a choice ? Thats why i asked if we really have to create a plugin, my pack has only one c++ class, nothing to fancy.

Took my a good few hours to figure everything out, plus the help from the forum here.
I guess this is a classic " It is what it is" situation :wink: