-5

Как сделать массив из GameObject в C# и обращаться к ним для их невидимости? Вот GameObject которые надо пихнуть в массив:

public GameObject pot_1; 
public GameObject pot_2; 
public GameObject pot_3; 
public GameObject pot_4; 
public GameObject pot_5; 
public GameObject pot_6; 
public GameObject pot_7; 
public GameObject pot_8; 
public GameObject pot_9; 
public GameObject pot_10;

И ещё, где надо создавать массив, в методе Start или же просто в Class?

aepot
  • 49,560

1 Answers1

-1

вот так в Start пихай GameObject[] pots = new GameObject[10] {pot_1,pot_2,pot_3,pot_4,pot_5,pot_6,pot_7,pot_8,pot_9,pot_10}