Skip to content

Instantly share code, notes, and snippets.

@IronWarrior
IronWarrior / shaderlab-bettershaders.xml
Created February 14, 2024 20:52
Unity ShaderLab + Better Shaders Notepad++ UDL, styled like VS2022 dark theme
<!--
Dark theme Visual Studio 2022 style syntax highlighter for Unity Shaderlab + jbooth's Better Shaders.
Derived from ShaderLab highlighter by redcool007:
https://github.com/notepad-plus-plus/userDefinedLanguages/blob/master/UDLs/ShadeLab_by-redcool007.xml
This is my first time making a N++ UDL; feel free to make suggestions for improvements. Will add attributes
and other keywords as I go.
-->
<NotepadPlus>
@IronWarrior
IronWarrior / MathM.cs
Created August 12, 2022 23:37
Managed implementation of various System.Math functions.
static class MathM
{
public const float PI = (float)System.Math.PI;
public const float TwoPI = PI * 2;
public const float HalfPI = PI * 0.5f;
public static float Sin(float x)
{
float x3 = x * x * x;
float x5 = x3 * x * x;
@IronWarrior
IronWarrior / UnityProjectJunctionTool.cs
Last active March 14, 2024 01:35
Unity editor tool to create dummy Unity projects to allow a single project to be open in multiple editor instances.
// gist by Roystan (IronWarrior): https://gist.github.com/IronWarrior/005f649e443bf51b656729231d0b8af4
// Video demo: https://twitter.com/DavigoGame/status/1300842800964018178
//
// CONTRIBUTIONS:
// Mac and Linux support added by Creature Coding: https://creaturecoding.com/
//
// PURPOSE:
// Unity does not permit a project to be open in two different editor instances.
// This can be frustrating when building projects with multiplayer networking,
// as it would require you to create a build every time you wish you test your netcode.