Skip to content

Instantly share code, notes, and snippets.

@kwalkerxxi
kwalkerxxi / AutoFitBoxCollider.cs
Created May 9, 2025 12:23 — forked from ArieLeo/AutoFitBoxCollider.cs
Autofit Box collider to Mesh Renderer Bounds, usefull when you are trying to adjust box collider on multiple objects at once
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
public static class AutoFitBoxCollider
{
[MenuItem("Tools/Autofit BoxCollider")]
private static void AutoFitBoxCollider()
{
var gos = Selection.gameObjects;
@kwalkerxxi
kwalkerxxi / MeshCut.cs
Created February 6, 2025 12:33 — forked from unitycoder/MeshCut.cs
Mesh cut algorithm for Unity
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MeshCut
{
private static Plane blade;
private static Transform victim_transform;
private static Mesh victim_mesh;
@kwalkerxxi
kwalkerxxi / CircularMenu.cs
Created February 6, 2025 12:33 — forked from alexanderameye/CircularMenu.cs
Circular menu for the Unity Editor
/*
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@kwalkerxxi
kwalkerxxi / MouseInputManager.cs
Created February 6, 2025 12:32 — forked from unitycoder/MouseInputManager.cs
RawInput Wrapper for Unity3d : Handles multiple cursors
// https://pastebin.com/4h3CqpYy
// Unity PINVOKE interface for pastebin.com/0Szi8ga6
// Handles multiple cursors
// License: CC0
using UnityEngine;
using System.Collections;
using System.Runtime.InteropServices;
using System;
@kwalkerxxi
kwalkerxxi / Easing.cs
Created February 6, 2025 12:31 — forked from unitycoder/Easing.cs
Robert Penner's easing equations for Unity
/**
* Easing
* Animates the value of a float property between two target values using
* Robert Penner's easing equations for interpolation over a specified Duration.
*
* Original Author: Darren David darren-code@lookorfeel.com
*
* Ported to be easily used in Unity by Marco Mastropaolo
*
* Credit/Thanks:
@kwalkerxxi
kwalkerxxi / UnitypackageExtractor.cs
Created February 6, 2025 12:31 — forked from unitycoder/UnitypackageExtractor.cs
Extract a .unitypackage to any directory (even outside the project folder) from within Unity
#define STOP_EXTRACTION_WHEN_WINDOW_CLOSED
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using System.Text;
using System.Threading;
using UnityEditor;
@kwalkerxxi
kwalkerxxi / PongWars.cs
Created February 6, 2025 12:31 — forked from unitycoder/PongWars.cs
Pong-Wars in Unity c#
// original JS source https://github.com/vnglst/pong-wars/blob/main/index.html
// https://unitycoder.com/blog/2024/01/29/pong-wars-in-unity/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PongWars : MonoBehaviour
{
Color DAY_COLOR = Color.white;
@kwalkerxxi
kwalkerxxi / CustomThumbnail.cs
Created February 6, 2025 12:30 — forked from unitycoder/CustomThumbnail.cs
Save Thumbnails for Scenes (unity editor script)
using System.IO;
using UnityEditor;
using UnityEngine;
namespace UnityLibrary
{
[CustomEditor(typeof(SceneAsset))]
public class CustomThumbnail : Editor
{
public override bool HasPreviewGUI() => true;
@kwalkerxxi
kwalkerxxi / .VoxelCollisionGenerator.cs.md
Created February 6, 2025 12:30 — forked from andrew-raphael-lukasik/.VoxelCollisionGenerator.cs.md
Tool to voxelize a Mesh Collider into multiple Box Colliders

GIF 21 01 2024 01-20-34

note: This is toy implementation, output is sub-optimal.

@kwalkerxxi
kwalkerxxi / .VoxelCollisionGenerator.cs.md
Created February 6, 2025 12:29 — forked from unitycoder/.VoxelCollisionGenerator.cs.md
Tool to voxelize a Mesh Collider into multiple Box Colliders

GIF 21 01 2024 01-20-34

note: This is toy implementation, output is sub-optimal.