This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| // @NOTE the attached sprite's position should be "top left" or the children will not align properly | |
| // Strech out the image as you need in the sprite render, the following script will auto-correct it | |
| [RequireComponent (typeof (SpriteRenderer))] | |
| // Generates a nice set of repeated sprites inside a streched sprite renderer | |
| // @NOTE Vertical only, you can easily expand this to horizontal with a little tweaking | |
| public class RepeatSpriteBoundary : MonoBehaviour { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| // @NOTE the attached sprite's position should be "top left" or the children will not align properly | |
| // Strech out the image as you need in the sprite render, the following script will auto-correct it | |
| [RequireComponent (typeof (SpriteRenderer))] | |
| // Generates a nice set of repeated sprites inside a streched sprite renderer | |
| // @NOTE Vertical only, you can easily expand this to horizontal with a little tweaking | |
| public class RepeatSpriteBoundary : MonoBehaviour { |