Plugin creation - Can I copy .cpp and/or .h files from Epic's plugins?

Hi everyone. I posted on answerhub 3 days ago and am not getting any answer. I hope someone will answer me here.

This might be noob question but please bear with me.

I’m currently creating a plugin, but it uses a plugin that Epic created “OnlineSubsystemFacebook”.

So, my question is, can I copy and modify those files or module to my plugin directory to be used by my plugin?
or can I copy-paste codes?
or do I have to extend that plugin? if so, how do I go about doing that?


Are you trying to extend the functionality of an existing plugin or just use the functionality in another plugin?

I think u might want to take a look at the build files in the project folder. Inthere you can add modules/plugins.

Thanks for the reply, guys. Sorry for replying back this late.

I’m using the functionality of an engine plugin in a plugin that I’m creating.

Are you pertaining to the build file of the plugin I’m creating?

As Epic staff said once, usually it is not a good idea make plugins dependencies, but you are using an official from UE, so is not that bad, inside your Build.cs is the way to go, you can include another modules there,