Announcement

Collapse
No announcement yet.

C++/Blueprint Override Function Error when Compiling.

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

    C++/Blueprint Override Function Error when Compiling.

    Hello, I have a function that should be overriding in a blueprint file that I declared in a cpp .h file. Every time I click compile on the blueprint it gives me the error
    which was declared in a parent with a different signature
    &
    Cannot override '::calculateNoise' at Calculate Noise which was declared in a parent with a different signature
    I keep looking online and have asked some discord channels with no answers. Is there something obvious I am doing wrong?

    this is the header file the function is the calculateNoise();
    Click image for larger version

Name:	header-file-declaration.png
Views:	274
Size:	15.8 KB
ID:	1701703
    and this is the blueprint fileClick image for larger version

Name:	theblueprint.png
Views:	273
Size:	235.5 KB
ID:	1701704

    #2
    The UFunction macro is making the calculateNoise_Implementation(); declaration so you need to delete that line

    In the cpp file you will only have calculateNoise_Implementation()

    .h
    Code:
        UFUNCTION(BlueprintNativeEvent)
        TArray<int32> calculateNoise();
    .cpp
    Code:
    TArray<int32> AExample::calculateNoise_Implementation()
    {
        TArray<int32> intArray;
        intArray.Init(1,1);
        return intArray;
    }

    Comment


      #3
      I figured it out I just had to click the override button on the left side on the blueprint if you hover over functions I had just created a function with the same name and its not the same thing

      Comment

      Working...
      X