Hello, I want to implement health bar. I have custom texture for it. My idea was to draw it as a sprite and show it partially. In 2DTK I'd use tk2dClippedSprite for such functionality. Is it possible to do using Unity's Sprite?
Yes. take a look at 2D example project in the asset store and watch There are a healthBar implemented. Him explain exactly how to do it. And there is a script inside the project that you can use it in your own project.
This is not really what I need. Example project just resizes tinted sprite. What I need is to clip my health bar texture is not simple and I cannot just stretch it depending on player's health.
You can use 9 sprites to realize SlicedSprite, so 3 sprites can make up a 3-slicedsprite. I mean, we have to write a class ourselves.
Well, using 9 sprites instead of 1 just to simulate clipping is too overhead, but thanks for suggestion!