Skip to content

Instantly share code, notes, and snippets.

@MrJul
MrJul / TextureAlphaPremultiplier.cs
Last active May 17, 2025 16:25
Pre-multiply alpha channel when importing Unity textures
using System;
using JetBrains.Annotations;
using UnityEditor;
using UnityEngine;
namespace UnityProject.Editor {
public sealed class TextureAlphaPremultiplier : AssetPostprocessor {
public void OnPreprocessTexture() {
// definitions
public abstract class ClassConstraint<TClass>
where TClass : class
{
public class GenericClassWhereIWantTEnumRestricted<TEnum>
where TEnum : struct, TClass
{
}