Skip to content

Instantly share code, notes, and snippets.

View MrJul's full-sized avatar

Julien Lebosquain MrJul

  • Flynware
  • Lyon, France
View GitHub Profile
// definitions
public abstract class ClassConstraint<TClass>
where TClass : class
{
public class GenericClassWhereIWantTEnumRestricted<TEnum>
where TEnum : struct, TClass
{
}
@MrJul
MrJul / TextureAlphaPremultiplier.cs
Last active May 18, 2023 03:07
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() {