Copyright on modified unreal engine PCG nodes that is to be included in a plugin ?

Good day.

I am not sure if this is the right place to ask this question.

I have copied and modified two existing epic games unreal engine PCG nodes to use some of my own custom code to create what is known as a hexagonal close packing 3D-2D grid or matrix of points. This code exists within a very small plugin I have created to be used in the Unreal engine application.

These modifications keep to a large extent the existing code that is copyrighted to epic games with the text

// Copyright Epic Games, Inc. All Rights Reserved.

that is at the top of the code for these nodes.

What I am asking is, as it is not clear to me in the EULA and elsewhere, when I copy and modify the existing code of any Epic Games Unreal Engine engine PCG node, and wish to submit it free on Github or as a epic games market place plugin for others to use, where do I stand in regards to copyright rules. I wish to submit this plugin as a GNU license, but because it is a modification of an existing Epic games product that retains a high percentage of the existing code, I don’t know if I can do this.

If any one can help me on this, it would be much appreciated.

Thank you.