Why do I need to cast to one actor after getting it from a class but not the other?
I'm making pong as a mini project and came into a strange issue. While doing my score system I get the actor representing the score from "get all actors from class" node then "get" then set it's text render plus 1 when a player scores.
This works fine, however, when I try to do the same thing for the opposite score actor I can't connect the "get text render node as it does not appear, I instead need to directly cast to the score actor and change it.
This still works in the end but I'm confused as to why I can get the text from just the "get" for one actor and not the other, the two actors are exactly the same other than the name, so I'm pretty stumped.
asked May 19 '19 at 05:03 PM in Blueprint Scripting
My bet is that Right Score has a Text Render and Left Score does not.
Also, Get All returns correct class already, no need to cast at all. Sometimes if you copy / paste that node or use the filter, the node does not get updated correctly. Right click it and refresh manually.
Follow this question
Once you sign in you will be able to subscribe for any updates here