Skip to content

Instantly share code, notes, and snippets.

@addie-lombardo
addie-lombardo / CustomInspectorCreator.cs
Last active April 9, 2022 07:34 — forked from LotteMakesStuff/CustomInspectorCreator.cs
Editor extension that adds a tool to automagically generate boilerplate custom inspector code~ YES! Just drop it into a folder called 'Editor' and it adds a 'custom inspector' option into the Project window!
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Generates a boilerplate custom inspector script for Monobehaviours and populates it with its serialized fields.
@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
@gorlak
gorlak / tools-engineer-checklist.md
Last active April 15, 2024 21:57
Tools Engineer Checklist

This list is provided as a guide for tools engineers of all skill levels looking for jobs in the game industry. It's meant as a guide to topics that should be pursued broadly in order to be well spoken in an interview. I doubt any hiring manager requires deep knowedge across every topic, but an ideal candidate would be somewhat knowledgable (aware of its existence if asked directly) with all topics here.

Each list of bullets increases in difficulty, so later bullets are more applicable to senior (or even director) level candidates.

Good luck.

@gorlak

Math

@ashblue
ashblue / normalize-slope.cs
Last active March 16, 2023 20:08
Unity 2D slope normalizer for walking up and downhill with corner snapping. Based upon https://www.youtube.com/watch?v=xMhgxUFKakQ
// @NOTE Must be called from FixedUpdate() to work properly
void NormalizeSlope () {
// Attempt vertical normalization
if (grounded) {
RaycastHit2D hit = Physics2D.Raycast(transform.position, -Vector2.up, 1f, whatIsGround);
if (hit.collider != null && Mathf.Abs(hit.normal.x) > 0.1f) {
Rigidbody2D body = GetComponent<Rigidbody2D>();
// Apply the opposite force against the slope force
// You will need to provide your own slopeFriction to stabalize movement
@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 12, 2024 02:26
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close