Check singular game object among an array if active

Hey all,

i’m currently working on a system using each players location that on entering the world, assigns a UI to them. (The base of this is working). And in that UI i’m planning on having an array of gameobjects that switch on/off depending on which room they are in.

The reason for this is to manage turning off-on parts of a game map locally to increase performance and allow for me to create a teleportation to player system.

Each gameobject in the array would essentially be a relay to say this part of the map is active for this player and to activate this map object when you teleport to them. Essentially as i’d need to check each of these until I find the one that’s active, this variable can then be used to set the active map on teleport.

Short version: I’m only interested in a way to essentially relay if a gameobject is already active within a array. I can figure out the rest and will probably post the full graph when I’ve finished it.

Thanks,

Nerzarn

Never tested or used it but perhaps these two will be of help to you:

image

1 Like

Cheers, I think the basis helps, this feels like it’s heading in the right direction. I forgot branches were a thing. I’ll do a full post once it’s all in though. :slight_smile: