This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
// Here we simulate a managed object using native memory resources which has the same | |
// behavior as a Unity Object with "null-ness" and checks. It demonstrates why if(obj) | |
// is usually how you should be doing your checks ... | |
internal class Program | |
{ | |
private static void Main( string[] args ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using JetBrains.Annotations; | |
using UnityEditor; | |
using UnityEngine; | |
namespace UnityProject.Editor { | |
public sealed class TextureAlphaPremultiplier : AssetPostprocessor { | |
public void OnPreprocessTexture() { |