Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement