This file contains 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
/* | |
Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader. | |
Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites, | |
then reuse this Material on all appropriate Sprite Renderers. | |
(You can use Shader.SetGlobalFloat to set that Pixels Per Unit value for all your shaders: | |
https://docs.unity3d.com/ScriptReference/Shader.SetGlobalFloat.html) | |
This is not for scaled or rotated artwork. If you need those features, look at low res render textures. | |
Use this however you want. |
This file contains 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
/* Save this file with a jsx extension and place in your | |
Illustrator/Presets/en_US/Scripts folder. You can then | |
access it from the File > Scripts menu */ | |
var decimalPlaces = 3; | |
if (app.documents.length > 0) { | |
if (app.activeDocument.selection.length < 1) { | |
alert('Select a path'); |