What Happens When You Cast To An Actor With Multiple Instances On The Scene?

I’m a bit new to Unreal Engine, and this casting thing sounds quite complicated to me.

  1. So, imagine I have an Actor blueprint with a number of arrays inside it. If I put three instances of that Actor into the scene, and then I cast from my player character to that Actor BP, does this cast gain access to all instances, or does it only choose one instance?

I’m trying to read the array data from through casting, but since my array is Instance Editable, each instance has different values inside the array.

  1. So, I’m wondering how can I read the values of each instance of that Actor? Is there a way to gain access to the instance of my choice without cycling through all of them?

Keep in mind that these actors are not available in the scene in BeginPlay, and they are being spawned after the game begins. So, I cannot use Eyedrop tool to set my target instance.

Hey @MehrdadKM!

Popular misconception- casting isn’t for communication! Lots and lots of people think that. What casting is for is:
You get an object or class. Say “BP_Letter” as in alphabet.
This isn’t very specific as it could be one of any 26 letters.
So you cast: “Cast BP_Letter to BP_Letter_A”.
Now, your object you have will behave as the letter A.
Think of it like a “Re-molding”. Like a cast for forging or setting a bone, not like a fishing line (how most people think of it until they fully get it).

But none of this has anything to do with retrieving the object “BP_Letter.”
There are many ways to do this, and the choice is yours!

Check out the documentation here for communication between actors, and you can use collisions, getactorofclass, and the like to seek out actors in your environment!