Hello Guest

Author Topic: question about depthmask  (Read 4656 times)

quangtu89

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
question about depthmask
« on: August 09, 2013, 11:02:31 am »
I use depthmask obj of toolkit 2d . But its shape is rectangle. I want use it with other shape like circle . How to do it . Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: question about depthmask
« Reply #1 on: August 09, 2013, 11:52:34 am »
If you want another shape you'll need to modify the shader. It will be a lot more expensive as another shape though.
Alternatively you can take many squares and build a circle out of that - that will be a bit more efficient.

quangtu89

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: question about depthmask
« Reply #2 on: August 09, 2013, 07:14:35 pm »
Thanks for support
I have a question about change sprite collection runtime
Normally i move file data to Resources folder an load runtime to call SetSprite
But if i have a object which is using the collection in scene. Can i get collection of this object to set for other object in scene .

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: question about depthmask
« Reply #3 on: August 09, 2013, 07:17:06 pm »
Please create a new thread for unrelated questions.
Yes, just get sprite.Collection from the first and set on the second using SetSprite

quangtu89

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: question about depthmask
« Reply #4 on: August 10, 2013, 01:41:17 pm »
Thank for support .