2D Toolkit Forum

2D Toolkit => Support => Topic started by: test84 on February 10, 2014, 09:06:11 pm

Title: How to make a tk2dUIProgressBar bar, invisible or disappear?
Post by: test84 on February 10, 2014, 09:06:11 pm
Hi,

If we want to make a normal Unity GO disappear or invisible, we put it's renderer's enabled property to false. But how can I do the same with a tk2dUIProgressBar?

Thanks.
Title: Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
Post by: unikronsoftware on February 11, 2014, 09:40:15 am
You can just SetActive(false) or if you want you can find all the renderrs and disable them...
Title: Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
Post by: test84 on February 11, 2014, 08:59:19 pm
Thanks.

Like this?

my_Progress_Bar.gameObject.SetActive(false);

BTW, why calling SetActive doesn't work on the progress bar itself? Isn't it a GameObject?

Thanks man.
Title: Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
Post by: unikronsoftware on February 11, 2014, 09:09:40 pm
Its not a game object, its a tk2dUIScrollBar which is attached to a gameobejct.