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
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
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:
thing.GetComponent("arrayScript").monstruos[];
This assumes that the object is called “thing” and that script one is called “arrayScript.”