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.
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.
asked Aug 25 '17 at 06:40 AM in Blueprint Scripting
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.
answered Aug 25 '17 at 08:55 AM
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.
answered Aug 25 '17 at 12:07 PM
With the 4.17.2 update the problem has been eliminated. Everything works fine without the need to provide the World Context.
answered Nov 15 '17 at 01:32 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here