Skip to content

Instantly share code, notes, and snippets.

@dustingraham
dustingraham / ScriptableObjectWithId.cs
Created February 2, 2021 16:55
ScriptableObject with GUID
// Reference: https://github.com/Bunny83/UUID/blob/master/UUID.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
@miyconst
miyconst / DictionaryTest.cs
Created September 28, 2019 12:34
Simple performance comparison between C# Dictionary and if / switch statements
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace DictionaryTest
{
class Program
{
/* CPU: AMD Ryzen Threadripper 1950x @ 4.0 Ghz
* Count: 100000000
@unitycoder
unitycoder / SpriteBackgroundRemove.cs
Last active August 2, 2023 14:45
Sprite Background Remover (convert single color mask to transparent)
// original script : http://answers.unity3d.com/answers/252528/view.html
// modified by unitycoder.com
// Usage: Place this script in Editor/ folder
// Start the tool from menu, Window/Tools/Alpha-fy Images
using UnityEngine;
using UnityEditor;
using System.IO;