BlueprintNativeEvent not Called on UObject
EDIT: I think this might be a bug. I have made some simple tests, where I have a minimal BP, that overrides a NativeEvent from a class (which directly extends UObject) and then is instanciated inside a test actor: The Fallback _Implementation keeps getting called. Native Events directly on Actors seem to work just fine, even thoufh hot reload does not update the events with no return value.
I am cuzrrently trying to make a simple Pickup System, with Items, that contain so called "Weapon Mutators". Each Item can contain multiple mutators, and each time an item is picked up, it will add the mutators to the list of mutators in the weapon component. The mutators, have a BlueprintNativeEvent, that shall be called each time a shot is fired. However, the Event is not triggered and instead, the fallback _Implementation is called instead. Here are the important parts of my Source:
Images of both the pickup and the mutator BP can be found here:
I have been trying arround stuff for about 4 hours now, but cant get it to work. Please help.
The following code and blueprint show how I was able to use an actor blueprint in my level to call the blueprint override function of an object blueprint. Let me know if this is not the result you are looking for.
I first created two classes (ClassA as an actor and ClassB as an object):
ClassA Header: ClassA Source: ClassB Header: ClassB Source: ClassA Blueprint:
Something to note about ClassB is the "NewObjectFromBlueprint" function. This function is what creates the "CREATE" node in the blueprint. More information on this node and it's code can be found at (https://wiki.unrealengine.com/Blueprint_Node:_Create_Object_from_Blueprint). With this setup you can override the MyNativeEventFunc in a ClassB blueprint and have it print out as long as an instance of ClassA blueprint is placed in the level.
answered Mar 27 '15 at 02:32 PM
Your event function should be void if not you can not override in Blueprint, and your event function should look like this in blueprint (should be without the Custom Event text, i make a quick one for example)
answered Mar 23 '15 at 06:26 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here