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"

Why ASomeactor::Beginplay() calls Super::BeginPlay()?

Is Super class is the UObject class? Can someone explain me this mechanism? I totally dont understand this... I know that this is required to run some blueprint but what stands behind it all. IS Super word is reserved?

Product Version: UE 4.10
more ▼

asked Feb 20 '16 at 01:56 PM in C++ Programming

avatar image

23 5 7 9

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

1 answer: sort voted first

This is just Unreal's way of calling the same function of the base class. The base class usually performs some sort of initialization that child classes require.

In normal C++ code you'd write BaseClass::BeginPlay();

In UE4 Super is auto generated and is just a typedef that acts as an alias to the parent class. Other languages have it built in as a keyword.

Based on your confusion, I highly recommend you read up on object orientated programming.

more ▼

answered Feb 20 '16 at 03:18 PM

avatar image

269 9 5 13

avatar image Shadowriver Feb 20 '16 at 05:27 PM

To add what Bino said

At AActor class BeginPlay() only calls blueprint BeginPlay event, so if you miss it you will break that blueprint event, but actor should work anyway (main actor initiation code is in other more impotent events). In higher classes you might break more things so you should always call Super::BeginPlay() anyway, for safety you should call parent function on every function you override.

In C++ in normaly you would need to type parent class name insted of "Super" (and you can still do that, that is even better way to access deeper parents), Super let you automatically target class parent

(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