Skip to content

Instantly share code, notes, and snippets.

@hmans
hmans / BobTheBuilder.cs
Last active April 27, 2024 23:26
A basic pipeline for performing headless Unity builds for multiple platforms at once.
/* This needs to live in a folder named "Editor", or it won't work. Doesn't have to be named
"BobTheBuilder", though. Name it whatever you want! */
using System;
using UnityEditor;
using UnityEngine;
public class BobTheBuilder
{
/* List of scenes to include in the build */
@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active April 4, 2024 13:42
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
@mandarinx
mandarinx / CustomHierarchyMenuItems.cs
Created April 3, 2016 15:27
Unity hierarchy tools
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Collections.Generic;
/// <summary>
/// A collection of useful shortcuts for manipulating the hierarchy in Unity.
/// Some of this was written by me (@adamgryu), some of it was collected from random Unity forums and StackOverflow.
/// Feel free to use any of this code freely, without any restrictions or references.
/// Tested with Unity 5.3.3.