Skip to content

Instantly share code, notes, and snippets.

@pazzaar
pazzaar / gist:17ab22412c7045fba2e002405d6d6cdd
Created September 4, 2021 09:19
Unity mesh info including LOD levels
using UnityEngine;
using System.Collections;
using UnityEditor;
public class MeshInfo : EditorWindow
{
bool showLOD1info = false;
bool showLOD2info = false;
bool showLOD3info = false;
bool showLOD4info = false;
@pazzaar
pazzaar / AnimatorExtensions
Last active April 6, 2024 06:02
Animator rebind function that also maintains some state
using System.Collections.Generic;
using UnityEngine;
public static class AnimatorExtensions
{
public static void RebindAndRetainState(this Animator anim)
{
List<AnimatorStateInfo> animStates = new List<AnimatorStateInfo>();
for (int i = 0; i < anim.layerCount; i++)
{