Get an array from other script

HI, I have try a lot things for do this, but i can’t:

in Script one i have

public GameObject monstruos;

I wanna call this script in other script, how can I do that?

Thanks :smiley:

To access that in a different script, you could first make it static. You could also make a variable in the other script that would be the Game Object that the script with the array is attached to (Script One). Then type in this where you need to acces the array:


This assumes that the object is called “thing” and that script one is called “arrayScript.”