Download

Cant understand Unreal Engine 4 Programming.

Hi,

i am watching tutorials for a couple of days now, but i can not understand how the programming with c++ in Unreal really works ^^ (Very confusing with header and source file and the whole Ustuff in there).

I have previously used the Unity engine where it is very simple :slight_smile: (i am able to develop a complete game) but unreal engine is so much different.
If i search for some sampels i only found someone who is modify some existing content, but i want to learn it from scratch to understand it better how it works.

Can someone give me a sample for spawning a Gameobject like a cube and control the cube with the WSAD keys in c++ ?
I didnt found anything like this.

In Unity this is very simple i only need to define a Transform using a command “instantiate” and then use if sentence for keyinput,
if one sentence gets true i can use thespawnedobject.translate(vector3) in this if-sentence.

Thank you very much for your help :slight_smile: .

You should check out the new c++ tutorials on that Epic put up on youtube.
https://www.unrealengine.com/blog/new-videos-for-learning-unreal-c

That said depending on how quickly you learn it can take anywhere from a couple weeks to a couple months to be up to speed. Stick with it though, its totally worth it ! :smiley:

Hi and welcome!

First of all, if you come from Unity, welcome to real world.

Before starting you should read the documentation and watch some videos from Unreal Youtube channel to make an idea. Also get familiar with Blueprints, you can do everything with them with out touching a C++ line.

Unity gives you some false ideas about game development and development in general, that’s why you have trouble now to understand Unreal. You just need to familiarize a bit with Unreal.

https://wiki.unrealengine.com/Unity3D_Developer’s_Guide_to_Unreal_Engine_4 Check out this guide if you are familiar with Unity
https://docs.unrealengine.com/latest/INT/Programming/index.html Explore and have fun :stuck_out_tongue:
https://wiki.unrealengine.com/Category:Code Specifically C++ tutorials
My advice - don’t ignore blueprints. They are powerful tool and works very well alone and with c++

Thank all very much for the nice help, i will check out the links :wink:

Edit: That is exactly what i need, thank you ^^ Very helpfull. Thank you again. :slight_smile: :slight_smile:

Em…I think pretty much everyone forgot to say that Unreal uses C++ while Unity uses C#…how do you expect to code for Unreal when you don’t know C++? Also, if you have no idea why we have headers and stuff like that…you should either just use blueprints, or buy a c++ book.

@noatom: Thank you for you comment, i know that unity is using C#, but that should be no problem. I learn programming language by doing some stuff, and look at some examples, that is the reason why i like samples and tutorials. :D.
Yesterday i have learned what headers are, and i was able to test some stuff.

But now i am confronted with another problem. I am using Visual Studio and the intellisense is very very slow :frowning: and sometimes it didnt work, what can i do to fix that?
The Monodevelop(Programming Editor) from unity when using monobehaviour is very fast i only need to press the first letters of the command and press return and get the complete command, does this works with C++ Unreal Engine ? :confused:

Thank you all again. :slight_smile:

Intellisense doesn’t work very well with large C++ Code-Bases, which UE4 definitely is.

There are some plug-ins that exists if you have VSPro though, though their name escapes me right now. If anybody does have ay methods for radically speeding up the Intellisense, I’m eager to here it as well.

Try Visual Assist X (also known as VAX by in the Unreal Engine 4 documentation) for better intellisense in C++. It’s not free, but I feel it’s a must-have if you’re serious about exploring a large codebase. It has better auto-complete, better syntax highlighting, the ability to switch between a .cpp and a .h for a class with a keypress (you have to setup shortcuts yourself in Visual Studio), and if you press ‘.’ at the end of a pointer, it’ll automatically turn it into a ‘->’. There are a lot of other features, but those are just a few off the top of my head. I suggest you try the trial and see how it works out for you.

http://www.wholetomato.com/

You want VisualAssist by Whole Tomato.

Edit: Somehow didn’t see the above post!

I didn’t try myself, but it seems that using QTCreator is a viable and free alternative : https://forums.unrealengine.com/showthread.php?11883-Guide-to-use-QtCreator-for-Unreal-Engine-4-!

I you are coming fromUnity (as I am) check this out.

http://staraban.com/en/unreal-engine-4-key-consepts-of-cpp-programming-and-comp-with-uniy/

Also my suggestion is don’t get scared by C++, as UE4 C++ is a simplified form of C++, just try to modify the examples to create your own actors, do the rest in blueprints.

Remember also Unity looked complex with the Transform/component architecture, vs Inheritance…

What helped me is realizing that coding everything isn’t the way to go. Almost every C++ tutorial ends up turning the values into Blueprint Ready nodes (UPROPERTY, UFUNCTION) anyway. Familiarize yourself with Blueprints, then when you need additional functionality, try your hand at the C++.

Emmm it’s normal C++ compiled by normal C++ compiler, you can do everything that C++ can, UE4 APIs and UHT simply makes things easier :stuck_out_tongue:

Exactly. When I started using the unreal engine, I said : “I want to do only the coding, I don’t want to touch to blueprint, this is for lowly level designer” (just kidding, level designer out there :D)

Then I also realized that the blueprint are pretty awesome if correctly used. So don’t hesitate to try some blueprint tutorial :smiley:

Agree I was thinking about memory management, string manipulation etc… imho those are the biggest hurdles for someone coming from C# and Unity