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 is BlueprintNativeEvent calling the C++ implementation when there is a blueprint override?

I followed the three class creation tutorials (blueprint, code and code+blueprint). In the third tutorial (here) it walks you through setting up a BlueprintNativeEvent.

The documentation says:

there is a native default implementation of the function that is called if the Blueprint does not override the function. This is useful for things where you want some sort of default behaviour if the Blueprint does not implement it, but want the Blueprint to be able to override the functionality if desired. These are more costly, so we only put them in where the functionality is needed. When you override the BlueprintNativeEvent, you can still call the native implementation, if desired, by right clicking on the event or function entry node, and selecting "Add call to parent".

In my case however when I overlap the sphere the blueprint implementation is called (the light changes to a random color) AND the native implementation is called (the light goes out). I only see the light (and it's new random color) when overlap end fires and the native implemention toggles the light on.

As the docs say its supposed to be optional that the naitive implemenation is called by right clicking on the event in the event graph and selecting "Add call to parent". However that menu item is disabled. This was built in UE4.1.

TLDR; Seems like, in this example at least, the naitive implementation is always being called for a BlueprintNativeEvent even when overridden in a blueprint despite the documentation saying otherwise.

Product Version: Not Selected
more ▼

asked Apr 29 '14 at 04:54 PM in C++ Programming

avatar image

414 30 96 63

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

1 answer: sort voted first

I believe I found the issue. There is a minor error in the "Class Creation Basics: Code and Blueprints" tutorial. The text is correct but the corresponding blueprint diagram shows sphere1's OnComponentBeginOverlap being used event instead of LightSwitchBoth OnOverlap.

Instead it should look like this:

alt text

more ▼

answered Apr 29 '14 at 08:31 PM

avatar image

414 30 96 63

(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