Hello Guest

Author Topic: How to make a tk2dUIProgressBar bar, invisible or disappear?  (Read 4182 times)

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
How to make a tk2dUIProgressBar bar, invisible or disappear?
« 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
« Reply #1 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...

test84

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
« Reply #2 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to make a tk2dUIProgressBar bar, invisible or disappear?
« Reply #3 on: February 11, 2014, 09:09:40 pm »
Its not a game object, its a tk2dUIScrollBar which is attached to a gameobejct.