Skip to content

Instantly share code, notes, and snippets.

@phi-lira
phi-lira / UniversalPipelineTemplateShader.shader
Last active March 9, 2026 19:36
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
@WikkidEdd
WikkidEdd / CreateSymlinkProject.cs
Last active November 19, 2023 11:45
Creates a symlinked version of a Unity project so you can easily do network development. Add script to Editor folder. Run from "Utils/Create Symlink Project" then choose directory to put symlink'd project in.
using UnityEngine;
using UnityEditor;
using System.Diagnostics;
public class CreateSymlinkProject {
[MenuItem("Utils/Create Symlink Project")]
static void DoIt()
{
string folderName = EditorUtility.SaveFolderPanel("Symlink Project Location", "", "");
@DustinCampbell
DustinCampbell / using-msbuildworkspace.md
Created April 10, 2018 21:36
Using MSBuildWorkspace

Introduction

Roslyn provides a rich set of APIs for analyzing C# and Visual Basic source code, but constructing a context in which to perform analysis can be challenging. For simple tasks, creating a Compilation populated with SyntaxTrees, MetadataReferences and a handful of options may suffice. However, if there are multiple projects involved in the analysis, it is more complicated because multiple Compilations need to be created with references between them.

To simplify the construction process. Roslyn provides the Workspace API, which can be used to model solutions, projects and documents. The Workspace API performs all of the heavy lifting needed to parse SyntaxTrees from source code, load MetadataReferences, and construct Compilations and add references between them.