SHARE
TWEET

Untitled

a guest Mar 21st, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public GameObject[] items;
  2. // Start is called before the first frame update
  3. void Start()
  4. {
  5.  
  6.     items[0].SetActive(false);
  7.     items[1].SetActive(false);
  8.     items[2].SetActive(false);
  9.     items[3].SetActive(false);
  10.  
  11.     for (int i=0;i<items.Length;i++)
  12.     {
  13.         Debug.Log(items[i].name);
  14.         if (items[i].name== "kids_wooden_desk")
  15.         {
  16.             items[i].SetActive(true);
  17.         }
  18.         Debug.Log(items[i].activeSelf);
  19.     }
  20.  
  21.     //g.SetActive(true);
  22.     }
  23. private void OnDestroy()
  24. {
  25.  
  26. }
  27. // Update is called once per frame
  28. void Update()
  29. {
  30.  
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top