Hello Guest

Author Topic: Sprite Visibility  (Read 6382 times)

mr_malee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Sprite Visibility
« on: September 17, 2013, 03:00:35 am »
hey, just wondering if there's an easy way to set sprite visibility in 2d toolkit? I would still like my game object to be active.

profanicus

  • 2D Toolkit
  • Full Member
  • *
  • Posts: 167
    • View Profile
Re: Sprite Visibility
« Reply #1 on: September 17, 2013, 05:49:27 am »
Yes, you can set the 'enabled' property on the sprite component.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite Visibility
« Reply #2 on: September 17, 2013, 10:07:33 am »
Almost correct - its the mesh renderer you want to turn off here to turn of the rendering. .renderer.enabled = false will do the job.

mr_malee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Sprite Visibility
« Reply #3 on: September 19, 2013, 07:34:31 pm »
thanks