UE4 Beginner C++ Questions
So I'm trying to understand the C++ UE4 pipeline a little better. Pardon my newbieness in these matters :). At the very last, whoever answers this will at least provide the documentation staff with some places to start.
1. Notation. I see a hungarian notation on a lot of these new C++ classes and functions; the heavy extent of its use being something new to me coming from unrealscript. Can someone give a comprehensive breakdown of the naming conventions that Epic uses for its functions and classes?
A couple examples: The "A" in "AGameInfo". Does it mean "abstract"?
Another example: FPostConstructInitializeProperties. What does the "F" mean?
You also see it also in FVector and FRotator:
Another prefix is used in TSharedPtr. These are just some to name a few.
2. Inheritance. I see this a lot (bolded):
Why is there a super modifier for one of the arguments at the end? I want to believe that this is telling the function to inherit the super form of that argument's value, but that just sounds confusing. Aren't there "vtables" for variables too, not just functions? And if this is the case, how would you declare super for multiple arguments?
The super modifier also does bring up questions about member scoping, and how to access different values up the inheritance chain (e.g. super.super.MemberValue).
3. MyPlayerController.generated.h - What is a generated.h and their purpose outside of your typical MyPlayerController.h header file and how do I go about creating them for my own projects from scratch (And do I need to)?
4. UFUNCTION(reliable, client), etc. At first glance as an unrealscripter, this sounds intuitive until you realize that you don't know what arguments can be passed into this thing and in what order they have to be, etc. What about UFUNCTION() with no arguments. What is different about that? In the absence of UFUNCTION declaration above the actual function, what is treated differently?
5. Saw something like this: "UPROPERTY(editinline)". This question is in the same vain as #4, in that I'm asking about properties and ordering for this macro.
6. When I see something like:
Is the part in bold the same as typing "function AYourGameInfoClass(const class VariableName)" in unrealscript?
How would you 'instantiate' a reference to a new class, as opposed to creating an actual class instance?
7. In UE3, for blend nodes, we had "node names" that looked for similarily named variables in unrealscript. When the values of these variables changed, so did the blend values. Will we be having C++ and blueprints interfacing with each other in the same manner? And if so, how do we set up code to listen for animation updates in the blueprint?
asked Mar 11 '14 at 02:06 AM in C++ Programming
ue4-archive ♦♦ STAFF
I'm in the process of redoing the gameplay programming docs at the moment as they have become pretty outdated. :( I'll try to answer a few of the questions you asked, though someone else may need to help out. :)
I'm going to let someone else tackle 6 and 7 as well as add to what I said or correct anything I might have gotten wrong.
answered Mar 11 '14 at 02:06 AM
ue4-archive ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here