Skip to content

Instantly share code, notes, and snippets.

@aleannox
aleannox / FixClothBounds.cs
Created April 17, 2020 19:27
[Unity] Fixes wrong Skinned Mesh Renderer bounds occurring with Cloth component
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
// Fixes wrong Skinned Mesh Renderer bounds occurring with Cloth component.
// Attach this to camera.
//
// Idea: Before camera determines culling, we override the automatically computed
// bounds with our own for all game objects with a Skinned Mesh Render in the present scene.
// In this example, we use the bounds of the undeformed mesh
@gunderson
gunderson / FlyCamera.cs
Last active January 15, 2024 16:31
Unity Script to give camera WASD + mouse control
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@omgwtfgames
omgwtfgames / A set of Unity3D extension methods
Last active March 2, 2024 17:44
Some useful extension method for Unity3D
A collection of useful C# extension methods for the Unity engine.