Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: pakkit on April 16, 2014, 05:32:48 AM

Title: Hiding Drawcalls with Scripts
Post by: pakkit on April 16, 2014, 05:32:48 AM
I want to hide buttons in certain conditions and trigger them to be available at certain times, How would I accomplish this? I heard you use Draw calls to do this, but how would you implement it in a script?
Title: Re: Hiding Drawcalls with Scripts
Post by: ArenMook on April 16, 2014, 11:05:54 AM
If you want to hide something, disable the object. Don't touch draw calls.
Title: Re: Hiding Drawcalls with Scripts
Post by: pakkit on April 16, 2014, 02:42:31 PM
Ok, how do I hide the buttons?
Title: Re: Hiding Drawcalls with Scripts
Post by: Tripwire on April 16, 2014, 04:04:44 PM
Ok, how do I hide the buttons?

  1. public GameObject button01;
  2.  
  3.  
  4. public void DisableButton()
  5. {
  6.      button01.SetActive(false);
  7. }
  8.  

Just drag the Button GameObject onto the script and voila