Get all actors of class warning

I use casting a lot throughout my project, and typically I use ‘get all actors of class’ unless the execution is in a loop or something frequently called. This is not pose a problem when I compile I get a warning. I cannot seem to get rid of the warning, is there any advice to doing this a third way.

Get all actors of class > get (index 0) > cast to object

When I do this method I often get a warning that says "item is already a <object>, you don’t need k2_node_dynamicCast_#’

Is there a way to do this without getting that warning? Is it a best practice to set the actor as a variable. Without using the ‘get’ indexed or without using a variable the Casting will not compile

You don’t have to cast anymore with Get All x of Class. You can remove the cast.

The error means you don’t have to cast into an object, as it’s already that object.

Thanks, that helped