Skip to content

Instantly share code, notes, and snippets.

Avatar

Julien Lebosquain MrJul

  • Flynware
  • Lyon, France
View GitHub Profile
@MrJul
MrJul / TextureAlphaPremultiplier.cs
Last active Jan 2, 2020
Pre-multiply alpha channel when importing Unity textures
View TextureAlphaPremultiplier.cs
using System;
using JetBrains.Annotations;
using UnityEditor;
using UnityEngine;
namespace UnityProject.Editor {
public sealed class TextureAlphaPremultiplier : AssetPostprocessor {
public void OnPreprocessTexture() {
View gist:5959933
Index: Renci.SshNet/Channels/ChannelDirectTcpip.cs
===================================================================
--- Renci.SshNet/Channels/ChannelDirectTcpip.cs (revision 28721)
+++ Renci.SshNet/Channels/ChannelDirectTcpip.cs (working copy)
@@ -114,11 +114,13 @@
{
exception = exp;
}
-
+
View Enum Constraint
// definitions
public abstract class ClassConstraint<TClass>
where TClass : class
{
public class GenericClassWhereIWantTEnumRestricted<TEnum>
where TEnum : struct, TClass
{
}