2D Toolkit Forum

2D Toolkit => Support => Topic started by: quangtu89 on August 09, 2013, 11:02:31 am

Title: question about depthmask
Post by: quangtu89 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
Title: Re: question about depthmask
Post by: unikronsoftware 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.
Title: Re: question about depthmask
Post by: quangtu89 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 .
Title: Re: question about depthmask
Post by: unikronsoftware 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
Title: Re: question about depthmask
Post by: quangtu89 on August 10, 2013, 01:41:17 pm
Thank for support .