PlaceholderGames / 2ndYearHelpDesk

Where the important help requests and general questions get asked by CS2S561 students
0 stars 1 forks source link

Custom nodes without C++ #7

Closed BojanStankovic closed 7 years ago

BojanStankovic commented 7 years ago

Since most of the teams are struggling with solving merge conflicts I came up with an approach of using Macros. It is intended to make merging for blueprints easier.

Currently most of game/character logic is stored in blueprints that have large amount of nodes (main character for example). This can become hard to read very quickly. Also, these blueprints are stored as binary files which makes their auto-merging impossible. So, a person merging two versions of a blueprint must manually recreate the node logic from one version into another. A way to go around this is by using Macros. These are essentially containers for some logic that is created using nodes. Once Macro is created it becomes a node itself with I/O pins according to the logic inside it.

There are some restrictions though. A Macro that you want to access in other blueprint graphs must be created as a Blueprint Macro Library. In addition Macro's parent class type must be the same as the parent class of the object in whose blueprint you want to implement it to. Macros can also be created inside of a blueprint, but then it is not stored as a separate file which is something we want.

Having a Macro stored as a separate file makes merging process much easier since the newly created file will simply be added, while the blueprint that uses the macro needs to bi modified only slightly by inserting that Macro and connecting it as required.

Documentation: https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Macros/ Tutorial: https://www.youtube.com/watch?v=pj5buBQ0lHU

In addition, Mike says there is a diff tool for blueprints built in the UE4 editor that makes blueprint merging easier. In combination with a method described above it should make our lives easier 😃

Hope this helps

DoctorMikeReddy commented 7 years ago

You win the Internetz today. I learned something new!