- Home /
Stretching certain part of a sprite (like ui)
I want to have a line with two arrows at each end , and I want to give it an end point and start point and have it stretched between the two point but I don't want to mess up the arrows. I know we can do it by split sprites in ui image but how can I achieve this with sprite renderer?
Answer by Spartiate0033 · Sep 27, 2016 at 02:48 AM
I am not incredibly well versed with sprite renderer but I do not believe it is possible. However, your best bet may be LineRenderer. That way you can attach your arrows to the start and end positions of the line and not have to worry about scaling the sprite which could mess up the resolution.
As an aside, it would be useful to know if you're game is 2D or 3D and if the arrows are going to be in world, camera, or overlay.
my game allows the user to switch between 2d and 3d , but the sprites are for 2d view only
Your answer

Follow this Question
Related Questions
Texturing custom 2d sprite 0 Answers
(C#) Help with Spriterenderer.sprite 2 Answers
Unity streching sprite gameobject to fit two positions. 1 Answer
Scrolling sprite image 0 Answers