Skip to content

Instantly share code, notes, and snippets.

View unitycoder's full-sized avatar
‏‏‎

mika unitycoder

‏‏‎
View GitHub Profile
@unitycoder
unitycoder / Unity-ReferenceChecker.cs
Created May 29, 2026 06:36 — forked from noisecrime/Unity-ReferenceChecker.cs
WIP - Simple editor script to provide options in dropdown menu when clicking on an asset in the project browser to discover what other assets/scenes reference it.
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEngine;
/// <summary>
/// NoiseCrimeStudio OneShots are single scripts that provide specific funactionality.
/// </summary>
namespace NoiseCrimeStudios.OneShot.Editor
@unitycoder
unitycoder / PurrNet Notes Unity.md
Last active May 24, 2026 19:32
PurrNet Notes Unity

[InstantiateData] Can't spawn object because NetworkManager doesn't contain a HierarchyFactory. Modules are only registered once the NetworkManager is started. You can bypass spawning via UnityProxy.InstantiateDirectly.

Need to be connected into server first? Dont try to spawn at Start() method.

[InstantiateData] Can't spawn object in scene Main because it's not being tracked by the network manager. Only the default scene or scenes loaded through the sceneModule are tracked. You can bypass spawning via UnityProxy.InstantiateDirectly.

Need to be connected into server first? Dont try to spawn at Start() method.

@unitycoder
unitycoder / Microvolume.shader
Created May 16, 2026 12:01 — forked from ForgeCreations/Microvolume.shader
This is the current state of my Microvolume concept as a Unity Shader for URP. You're welcome to play around with it in any way you want.
Shader "Custom/Microvolume/LitURP"
{
Properties
{
[MainTexture]_BaseMap("Albedo", 2D) = "white" {}
[MainColor]_BaseColor("Albedo Color", Color) = (1, 1, 1, 1)
[Normal]_NormalMap("Normal Map", 2D) = "bump" {}
_NormalScale("Normal Scale", Range(0, 2)) = 1
@unitycoder
unitycoder / BoxColliderEditFaceCenterDots.cs
Created April 13, 2026 19:10 — forked from adrenak/BoxColliderEditFaceCenterDots.cs
BoxColliderEditFaceCenterDots makes resizing BoxColiders easy
#if UNITY_EDITOR
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEngine;
using UnityEngine.Rendering;
/// <summary>
/// While Unity’s built-in box collider edit tool is active, draws camera-facing
@unitycoder
unitycoder / developer-fix-ergonomy-issues.md
Last active March 29, 2026 14:50
Programmers: How to fix shoulder, neck, hand pain/issues easily! (Ergonomics tips)

Issues

  • Shoulder, neck, arm, wrist, back, hand pain or inflammation, dizziness, feeling nausea, headache, tinnitus..

Simple Fixes

@unitycoder
unitycoder / appstore-qr-code.js
Created March 20, 2026 10:26
[GreaseMonkey] App Store / Google Play URL QR Overlay (add QR code link to easily download this app)
// ==UserScript==
// @name App Store / Google Play URL QR Overlay
// @namespace https://unitycoder.com/
// @version 1.0
// @description Show a QR code for the current page URL in the top-right corner
// @match https://apps.apple.com/us/app/*
// @match https://play.google.com/store/apps/*
// @grant none
// ==/UserScript==
@unitycoder
unitycoder / BinaryLoadBenchmark.cs
Created March 14, 2026 20:04
Test DirectStorage loader in unity
// https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Unity.IO.LowLevel.Unsafe.AsyncReadManager.Read.html
// sample file https://files.fm/u/422tvs26s6
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Text;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
@unitycoder
unitycoder / Get a custom email address for FREE using Cloudflare + Gmail .md
Created February 23, 2026 19:06
Get a custom email address for FREE using Cloudflare + Gmail

// https://x.com/tokifyi/status/2025741929997361371

Get a custom email address for FREE using Cloudflare + Gmail Did you know you can just use Cloudflare email routing to get a custom email for free? Most people pay $6-12/month for Google Workspace or Microsoft 365 just to get a custom email. This setup costs you nothing except the domain itself. Here's what you need:

A domain name ($10-15/year from Namecheap, GoDaddy, etc. - students: free via GitHub Student Pack)
A Gmail account (free)

Cloudflare account (free)

@unitycoder
unitycoder / microgpt.py
Created February 12, 2026 07:03 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@unitycoder
unitycoder / fetch_vcdist.py
Created February 6, 2026 14:37 — forked from donno/fetch_vcdist.py
Downloads and extract the Visual C++ Redistributables.
"""Downloads and extract the Visual C++ Redistributables.
This is useful when working with minidump files as the user may be running
with a new different version of the runtime. This script aims to maintain
a copy of the various versions.
Versions are normally added once I encounter them, in November 2022, I added
a rather large back catalogue of versions.
This requires dark.exe from Wix (http://wixtoolset.org/releases/) and