Skip to content

Instantly share code, notes, and snippets.

View pointcache's full-sized avatar
💭
status

pointcache pointcache

💭
status
View GitHub Profile
@MechWarrior99
MechWarrior99 / UndoUtility.cs
Last active February 17, 2022 04:11
A utility class for working with Unity's Undo class. Mainly contains UndoPerformed and RedoPerformed events
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
using Object = UnityEngine.Object;
/// <summary>
/// Additional utilities for use with <see cref="Undo"/>.
/// </summary>
[InitializeOnLoad]
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active November 10, 2024 05:01
Template shader to use as guide to create Universal Pipeline ready shaders. This shader works with Universal Render Pipeline 7.1.x and above.
// When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME!
// However, if you want to author shaders in shading language you can use this teamplate as a base.
// Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader.
// This shader works with URP 7.1.x and above
Shader "Universal Render Pipeline/Custom/Physically Based Example"
{
Properties
{
// Specular vs Metallic workflow
[HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0
@allanolivei
allanolivei / gist:9260107
Created February 27, 2014 21:38
Unity 3d : Get Selected Folder in Project Window
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
public static class UnityUtil
{
public static string GetSelectedPathOrFallback()
{
string path = "Assets";