Engines‎ > ‎Unreal‎ > ‎

Code Guidelines

C++ and BP is closley linked
BP relies on C++ for all it does. Every node in BP is in C++
You can extent BP easy with C++. You can make functions and variables exposed to BP.
UFUNCTION and UPROPERTY

The recommended amount of C++ vs BP differs a lot between projects.
Typically in a large game projects, 80% c++ and 20% bp.

You should always start of with learning and mastering C++ first (even if they are programmer).
Helps close the gap with the rest of the team.

C++ more performence
C++ better for managing large and compleex systems, or math.
Some thing simply can be done in BP or is diffuclt/sub optimal
    Save games
    platform/device spec function
    control input menus
    spec hardware, sdk and other intergations.
A good balance between c++ and bp will greatly improve workflow and collaboration in large projects

BP is faster for creation and prototyping
BP is faster for iteration
Better for understanding and reading flow
More flexiable and accessible to the wider team

--- C++ Best practices
In larger projects, most classes should, at all times, be made in C++, but extended in BP.
C++ has core functionality and most important variables
The BP class is the one that is placed in the world.
BP has minor functionality, audio/visual effects functionality and content references

Thigs should generally be in C++ when...
    Functionality that is used in more then one places
    Used per tick, especially if it concerns many actors.
    complext in nature and bug prone or maintennace heavey
    likley to be extended signifcandtly later
    concering complex and cirtical features such as save games, networking
    important variables, enums and so on.

And things typically in BP
    the majority of content references
    anything that is straightforward and/or visual in nature
    one of functionality, isolated functionality, not part of core architecture
    functionality that is still being prototyped and rapidly iterated on.
    Anything else that would not get any benefit being in C++ in terms of performence, scaling, bug proof and so forth

C++ variables and pure functions greatly improve BP workflow. Slips casting.
Blueprint C++ libaries are great if you want a function that need access across many different BPs.
Mostly useful for stateless functions.
Even if most fonctionality in C++ it should be standard to provide deletgates and events. Invite content team to participate, prototype and tweak.

Comments