Skip to content

Instantly share code, notes, and snippets.

View lucatronica's full-sized avatar

Luca Harris lucatronica

View GitHub Profile
@smkplus
smkplus / UnityShaderCheatSheet.md
Last active May 7, 2024 07:34
Controlling fixed function states from materials/scripts in Unity

16999105_467532653370479_4085466863356780898_n

Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
 
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
@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)
@RodGreen
RodGreen / SwitchShortcutsProfileOnPlay.cs
Created September 12, 2019 21:54
Automatically switches editor shortcut profile when playing Unity3D
using UnityEngine;
using UnityEditor;
using UnityEditor.ShortcutManagement;
using System.Linq;
[InitializeOnLoad]
public class SwitchShortcutsProfileOnPlay
{
private const string PlayingProfileId = "Playing";
private static string _activeProfileId;