Announcement

Collapse
No announcement yet.

How Can I Override a BlueprintNativeEvent Function in a Component?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How Can I Override a BlueprintNativeEvent Function in a Component?

    I have a component that inheriate from UMeshComponent.

    I got a BlueprintNativeEvent Function, which represent the surface function. By default, this is a sphere surface.

    I got code like this:

    .h:

    Code:
        UFUNCTION(BlueprintNativeEvent)
        void ImplicitSurfaceFunction(float x, float y, float z, float& result);
        virtual void ImplicitSurfaceFunction_Implementation(float x, float y, float z, float& result);
    .cpp:

    Code:
    void USurfaceMeshComponent::ImplicitSurfaceFunction_Implementation(float x, float y, float z, float& result)
    {
        result = (x*x) + (y*y) + (z*z) - 100.0f;
    }
    But... How can I override this function in blueprint?

    #2
    Your UFUNCTION is missing the BlueprintCallable specifier. Like this:
    Code:
    UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
    Edit: Misread your post. You should be able to override it in the Blueprint Editor. Under functions there is an override button, in which it should show the method.

    Last edited by yellowpaper; 11-17-2017, 09:04 AM.

    Comment

    Working...
    X