Download

How to decide when I better use C++ or BP

Hi everyone,

I started learing the unreal engine but now I have a more general question.

How you decide if you coding in c++ or using BP to realize your stuff?
I which cases it is better to writing code in c++ and when it is better or enough to use the BP system?

Maybe you can give me some inspirations.

Thanks.

If it’s really slow or really giant/complex in Blueprint, do it in C++. That’s one of the main ones.

It’s depends on many factors

First are you alone or in a team? if you are alone it’s just a personnal choice. If you are in a team the best way is still code as much as you can while giving features in BP for every non coder (ex: Level Dsigner, Game Designer, etc.)

In my case even if im alone i use mostly the second one. Quick proto are made in BP then i code almost everything in c++ with some BP for level and game design stuff.

Hope it’s help

I look at it like this i code the logic/ behavior of the actor e.g: a weapon in C++.
This includes all the different parts including propertys to change stuff out.
And the assets needed for that type of object/ item …

Then derive a blueprint from that class and set all assets in there.
Or any propertys that is set in the class.

You expose this to Blueprints, that way you can easy change stuff out while having full control and have a edit one edit all solution.
That’s my 5 cents atleast.

I’m doing it like this:

If it’s something I’d like to change/tweak/iterate on very often, I go with blueprint. If it’s a more system-like job, I go with C++. Sometimes it’s also a bit of both: I have a dynamic level generation code that does a lot of grunt work in C++, but the “level chunk” base class calls BP events at key points during so the BP derived classes can have custom logic about how they’ll populate themselves with props and which pieces they can connect with.

I usually go like this too, but mostly because iteration times for c++ are really slow compared to BP. I would really prefer to go c++ all the way :slight_smile: