Skip to content

Instantly share code, notes, and snippets.

View AlexandreDeRiemaecker's full-sized avatar

Alexandre De Riemaecker AlexandreDeRiemaecker

View GitHub Profile
@AlexandreDeRiemaecker
AlexandreDeRiemaecker / EnforcePresetPostProcessor.cs
Created February 5, 2021 14:42
Apply Unity Preset file found in folder of Spritesheet texture. Additionally slices the sheet when the texture name starts with "char_" (for a Manaseed character spritesheet). Based on https://docs.unity3d.com/Manual/DefaultPresetsByFolder.html
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Experimental;
using UnityEditor.Presets;
using UnityEngine;
namespace PresetsPerFolder