To what extent can I avoid blueprints?

I want to use UE4 to help myself better understand c++, but I hear that using 100% code in UE4 is a huge pain, especially since you have to completely relaunch the editor every time you want to build (different from Unity). Is it possible to create variables that can be modified in the editor like in Unity3D?

In other words, is it possible to 100% avoid blueprints? and regardless of if I can or not, what do you all do to make your testing and debugging easier?

Thanks in advance!

This is exactly one of the benefits of Blueprints - you can even create Blueprints from your custom classes in order to expose those variables to the editor.
I try to avoid Blueprints as far as possible, but people generally seem to like them, so maybe you should try them out first?

You can expose any member/ property with the UPROPERTY() macro.
Take a look at Programming Guide > Gameplay Programming Reference > Properties](Unreal Engine UProperties | Unreal Engine 5.1 Documentation)

The ones you be most intrested in are.


*EditDefaultsOnly, EditAnywhere, BlueprintReadOnly, BlueprintReadWrite and Category = "CategoryName"*

And yes you can avoid Blueprints but not using them at all is counter productive.
I my self prefer to add all the logic and members in code.

Then i use Blueprints to reference any assets so i dont have to hard code any paths.
And also expose any members i want to tweak on the fly.

Hope it helps.

That does help, thank you!

At first I was going to avoid the blueprints too, as I’m mostly a programmer and just the idea of visually scripting something is awful, as it would take a lot more time than just writing the code. But then I realized blueprints are really helpful when I want to prototype something fast. You know when you are trying new things the code often changes and due to high compile times it is just awful to wait around 15s to compile the project after a small change. So yeah, blueprints definitely are useful, but I wouldn’t use them in the final product.

But yeah, nowadays I mostly used them to set the location and meshes for the assets so I don’t have to do it manually in the code, and then just write the logic in the code. This makes iterating real fast.

, I was originally quite skeptical of blueprints, but you need to understand their role. Typically, a game designer needs to be able to modify some functionality of in-game objects, the level, etc, and thus a scripting interface of some sort is required. It’s all well and good to make a game yourself and just straight-up code anything, but if you want to develop quickly and in a more ‘realistic’ environment, do the heavy lifting in code, and call said heavy lifting via blueprints. For example;

I have a C++ class called Ship. BP_Ship is my blueprint version of this, and then any actual spaceships (my fighters, etc) inherit from BP_Ship, so I have base code functionality in C++, then base BP work in BP_Ship (such as handling events from my player controller), and my inheriting BP objects simply change the mesh, the camera positions, and the thrust/physics stats (all exposed to blueprints).

The above has been an extremely fast way to iterate - we can make any type of ship (fighters, cruisers, etc), and change the mesh and settings, and boom it works.

  • Double post -

Remember you can also compile in editor when you dont have new types or header changes.

That actually makes a lot of sense, i’ll have to look into it, i’m still learning a lot of the basics, so i don’t quite know how to do what you said quite yet, but it seems i’ll likely be doing just that.

I tried that, but when modifying the variable (turn speed in FPS example), and hitting recompile, nothing changed. Maybe it’s because the editor was launched from debug?

If you need any help, let me know - I’m always checking this section of the forum :slight_smile:

The general idea is to use UFUNCTION and UPROPERTY macros to expose your variables and functions to be used in blueprints in-editor. Have you used those macros before?

Rob actually just added support for ‘hot reload’ to work even when adding/removing variables, functions & classes!
/EpicGames/UnrealEngine/commit/26f250c9a26304440f34abc5e9b7457ff0b77bb2

Wow that’s incredible!

If you see this please tell Rob I say wow great job!

:slight_smile:

Thanks! I haven’t even gotten that far yet xD, i’m mostly just messing around with the example projects, before I begin to port one of my games into ue4. This engine has so many good things, it’s a bit overwhelming coming over from Unity @_@

That’s really cool! I assume this is in 4.4?

You dont need to create blueprint to exposd, already exposed varables, ; p