I wonder if there is a way in the sprite editor for a sprite that is set to multiple to set them all to a certain position without manually selecting them one by one ? I have like 50x sprites so it would be really convinient just to multi edit the pivot point. Any ideas ?
I’ve been using the following script for the editor which I found searching for the same thing in forums. It was written by David Robins ([here’s a video][1] of how to use it, and [where he posted the code][2] on Reddit. You put it in a directory named “Editor” within your project structure, and it will be loaded to the top menu of the Unity Editor when you restart it. It has been very useful for spritesheets. I’m still trying to find a solution that works for a group of individual sprites. Might try to modify this script to do it. Here’s the script within a class.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
public class MenuItems : MonoBehaviour {
[MenuItem("Sprites/Set Pivot(s)")]
static void SetPivots()
{
Object[] textures = GetSelectedTextures();
Selection.objects = new Object[0];
foreach (Texture2D texture in textures)
{
string path = AssetDatabase.GetAssetPath(texture);
TextureImporter ti = AssetImporter.GetAtPath(path) as TextureImporter;
ti.isReadable = true;
List<SpriteMetaData> newData = new List<SpriteMetaData>();
for (int i = 0; i < ti.spritesheet.Length; i++)
{
SpriteMetaData d = ti.spritesheet*;*