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"

BindUFunction failed to find function

Hey i got a runtime error, saying "Failed to find function TurnBackToSpawner in TitanSpinningAxe...." It doesnt find the function which i provided inside of fname() but its inside of the same cpp file alt text

alt text

Product Version: UE 4.21
err1.png (44.0 kB)
err2.png (32.1 kB)
more ▼

asked Jan 12 '19 at 09:11 PM in C++ Programming

avatar image

9 2 1 5

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

1 answer: sort voted first

Is TurnBackToSpawner defined in your .h file and is it marked as a UFUNCTION()? Any function you're binding in anyway should always be marked as UFUNCTION().

It's easier to see your code & errors if you paste them in rather than screenshot so if the above isn't right, maybe doing that will help us find your problem.

more ▼

answered Jan 12 '19 at 10:42 PM

avatar image

1.5k 6 6 12

avatar image Triplexx Jan 13 '19 at 12:09 PM

Thanks, its now working. So what the UFUNCTION() adds to my func?

avatar image phil_me_up Jan 13 '19 at 03:09 PM

UFUNCTIONS are used to expose your methods to the Unreal System. I think of it like using Reflection systems in C# although it's not strictly true.

Best way to decide if you need a UFUNCTION or not: 1) Do you want to call this method in a blueprint? 2) Should this method act as an event to call some blueprint code? 3) Is this method being bound in any way?

If the answer to any of these is yes, add a UFUNCTION. In case 1 and 2, you'll also need some additional specifiers such as BlueprintCallable or BlueprintImplementableEvent. More information on this is here: https://docs.unrealengine.com/en-us/Programming/UnrealArchitecture/Reference/Functions

Whilst you're at it, look at UCLASS and UPROPERTY too.

(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