x

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"

Get All Actors Of Class within Function Library doesn't find any actors

I'm using Cast to node in one of my functions within a Function Library. The function is a custom Print String for debugging purposes.

For some reason the Get All Actors Of Class node returns no actors and therefore the value of the Debug Display Duration never gets read. One BP_DialogueManager class actor that I'm casting to exists in the level. Up until recently it was working fine. The funny thing is that now sometimes it works and sometimes it doesn't.

alt text

The issue emerged before I upgraded my project from 4.16 to 4.17 and it is present in the 4.17 version as well.

I have a backup of my project from few days ago and the same logic works just fine in there.

Any suggestion whether it is a bug or something that I've missed on my part is welcome.

Product Version: UE 4.17
Tags:
more ▼

asked Aug 25 '17 at 06:40 AM in Blueprint Scripting

avatar image

JN
6 3 3

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

3 answers: sort voted first

You can try manually providing it with a World Context see if that helps, make a new actor input and wire that to the world context, and when you call the function plug a reference to self in.

more ▼

answered Aug 25 '17 at 08:55 AM

avatar image

DanielOrchard
913 17 21 37

avatar image JN Aug 25 '17 at 09:16 AM

Thank you for the suggestion. Passing the calling BP refrence to the World Context works. Is this how it's supposed to work with Function Libraries?

Just the weird think is that it's been working for me without any reference for almost 2 months (on 4.16).

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

I don't think the cast to node is necessary. Try removing it. The GetAllActorsOfClass node has a drop down where you can simply choose the class of object that you wish to get.

more ▼

answered Aug 25 '17 at 12:07 PM

avatar image

Pittnee
71 1 4 4

avatar image JN Aug 26 '17 at 05:02 AM

Thank you, I just learned something new. However, from the function behaviour point of view it didn't make any difference.

For now I'm adding the references to the calling actors and passing them to the function. With some 200 points of call it's just too much work.

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

With the 4.17.2 update the problem has been eliminated. Everything works fine without the need to provide the World Context.

more ▼

answered Nov 15 '17 at 01:32 AM

avatar image

JN
6 3 3

(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