Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

(Solved) What are componets in unreal?

I have a novice understanding of c++ and programming in general. I am confused by the syntax and functionality of components. Is this an unreal specific syntax. Is it even syntax or just some naming convention? I'm really just looking for a proper resource to understand their place in the unreal code and how to use them rather than just copying them down blindly.

This is an excerpt of the ue4 programming tutorial: /** StaticMeshComponent to represent the pickup in the level. */ UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Pickup) TSubobjectPtr PickupMesh;

what I don't understand here is Is component a thing or just a naming convention? In the last line TSubobjectPtr PickupMesh; I understand(i think) that its a pointer, however im unfamiliar with the syntax. I've never seen pointers done in this way.

tldr; What does this code mean or where is the best place i can find out?

Product Version: Not Selected
more ▼

asked Oct 22 '14 at 03:15 AM in C++ Programming

avatar image

3 1 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Unreal's C++ is actually C++ 11. However it uses a lot of macros and template classes, which is why it looks quite strange.

UPROPERTY, UCLASS, UOBJECT.. are unreal specific macros that are used for reflection. In the same way, TSubobjectPtr is a template pointer. Anything that starts with 'T' is a template class. They are all C++ constructs. You might want to go through the documentation to get a better idea about the various Macros and Template classes used in unreal.

However unlike normal C++ Unreal's C++ involves an additional step. ie Instead of directly compiling your code, Unreal generates some code based on your code by running the Unreal header tool. This is where the macros are parsed. Apart from that everything else is standard C++. But like any API, you need to get a good understanding of the API classes and functions in additon to language syntax.

Component: A component is a class (C++ class) which can be added to an Actor (another C++ class) to affect how the Actor behaves in the world.

Reference: https://docs.unrealengine.com/latest/INT/Programming/index.html https://docs.unrealengine.com/latest/INT/Programming/UnrealBuildSystem/index.html

more ▼

answered Oct 22 '14 at 03:26 AM

avatar image

3.4k 154 52 271

avatar image hfftu Oct 22 '14 at 06:57 AM

thank you sir, very helpful

avatar image mindfane Oct 23 '14 at 03:20 AM

Please mark this thread as solved.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question