Skip to content

Instantly share code, notes, and snippets.

View MatthewMaker's full-sized avatar

Matt "Trip" Maker MatthewMaker

View GitHub Profile
@yasirkula
yasirkula / ShaderStripper.cs
Last active March 20, 2026 13:42
Stripping commonly unused shader variants in Unity's built-in render pipeline
//#define SHADER_COMPILATION_LOGGING
//#define SKIP_SHADER_COMPILATION
using System.Collections.Generic;
using UnityEditor.Build;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
public class ShaderStripper : IPreprocessShaders
@oktomus
oktomus / fork-custom-commands.md
Last active November 11, 2025 13:00
Fork custom commands

With custom commands, you are one shortcut away to run commands thanks to the Quick Launch (Ctrl+P, ⌘+P).

Custom commands can be configured in File > Preferences > Custom commands, or by editing the json file custom-commands.json located in AppData/Local/Fork on Windows and ~/Library/Application Support/com.DanPristupov.Fork/custom-commands.json on MacOS.

Please share your own custom commands :)

How to use

Fork commands are posted as comments on this gist. Press CTRL+F to search for commands.

@NicholasSheehan
NicholasSheehan / TextToTextMeshPro.cs
Last active October 23, 2025 10:15
Convert Unity Text Component to Text Mesh Pro Component
using TMPro;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
namespace NicholasSheehan
{
//Place in an editor folder
class TextToTextMeshPro : MonoBehaviour
{
@NicholasSheehan
NicholasSheehan / UIApplicationExitsOnSuspendFix.cs
Created July 4, 2019 13:34
UIApplicationExitsOnSuspend Info.plist Fix
#if UNITY_IOS
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEngine;
namespace NicholasSheehan
{
class UIApplicationExitsOnSuspendFix
@bitinn
bitinn / .a-unity-git-config.md
Last active April 2, 2025 07:53
My Unity git config
@MatthewMaker
MatthewMaker / UnifyLineEndings.cs
Created July 22, 2018 20:28 — forked from samoatesgames/UnifyLineEndings.cs
A script to unify the line endings of Unity3D scripts files
#if UNITY_EDITOR_WIN
using System;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngine;
public class UnifyLineEndings
@Split82
Split82 / UnityShadersCheatSheet.shader
Created April 17, 2018 10:07
Unity Shaders Cheat Sheet
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
@louisvalet
louisvalet / Colors
Last active November 17, 2020 09:35
I heard you needed colors
using UnityEngine;
public static class Colors
{
public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 );
public static readonly Color Acajou = new Color32( 76, 47, 39, 255 );
public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 );
public static readonly Color Aero = new Color32( 124, 185, 232, 255 );
public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 );
public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 );
@MatthewMaker
MatthewMaker / .gitignore
Last active May 6, 2022 23:56
Example .gitignore file for use with repositories which contain cross-platform Unity3D projects
# Created (partly) by http://www.gitignore.io
# other sources:
# http://www.gitignore.io
# http://www.yellosoft.us/git-unity
### MacOS ###
.DS_Store
.AppleDouble
.LSOverride
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
public class CleanEmptyFoldersEditorExtension : EditorWindow
{
private static string deletedFolders;
[MenuItem("Tools/Clean Empty Folders")]