Hi guys, I found the node “Get All Actors of Class” may return null sometimes, even if the matched actor is always stay in level, and i promise i didn’t have blueprint to change my target actor.
I think the possible reason is “Traget Actor isn’t exist”
In my case, the target actor is placed in level and i doesn’t be destroyed at some time.
Also, in the debug log,
at first “Get All Actors of Class” works,
at some time “Get All Actors of Class” doesn’t work,
after that, “Get All Actors of Class” works again.
So it manifests that my Target Actor exists along the way.
It confused me because it seems like a ghost, sometimes appear but sometimes dont. I wonder why it happened and how can i aviod it? Thanks a lot!
In my deemo, I use “Get All Actors of Class” in BP_Slime and i want to get a actor which class is BP_Judger.
And here is my testing print and debug log.
Image1 BP_Slime
Image2 Debug Log
Image3 World Outliner
LogBlueprintUserMessages: [BP_Slime_Parent13] 1
LogBlueprintUserMessages: [BP_Slime_Parent12] 1
LogBlueprintUserMessages: [BP_Slime_Parent11] 1
LogBlueprintUserMessages: [BP_Slime_Parent10_25] 1
LogBlueprintUserMessages: [BP_Slime_Parent_C_19] 0
LogScript: Warning: Script Msg: Attempted to access index 0 from array ‘CallFunc_GetAllActorsOfClass_OutActors’ of length 0 in ‘/Game/LianJiaCheng/Blueprint/Slime/BP_Slime_Parent.BP_Slime_Parent_C:UserConstructionScript’!
LogBlueprintUserMessages: [BP_Slime_Parent_C_0] 0
LogScript: Warning: Script Msg: Attempted to access index 0 from array ‘CallFunc_GetAllActorsOfClass_OutActors’ of length 0 in ‘/Game/LianJiaCheng/Blueprint/Slime/BP_Slime_Parent.BP_Slime_Parent_C:UserConstructionScript’!
LogBlueprintUserMessages: [BP_Slime_Parent_C_0] 0
LogScript: Warning: Script Msg: Attempted to access index 0 from array ‘CallFunc_GetAllActorsOfClass_OutActors’ of length 0 in ‘/Game/LianJiaCheng/Blueprint/Slime/BP_Slime_Parent.BP_Slime_Parent_C:UserConstructionScript’!
LogBlueprintUserMessages: [BP_Slime_Parent4] 1
LogBlueprintUserMessages: [BP_Slime_Parent3_8] 1
LogBlueprintUserMessages: [BP_Slime_Parent2_5] 1
LogBlueprintUserMessages: [BP_Slime_Parent20] 1
LogBlueprintUserMessages: [BP_Slime_Parent_2] 1
Debug Log