Skip to content

Instantly share code, notes, and snippets.

View jbtwv's full-sized avatar
🥷

James Brooks jbtwv

🥷
  • Hamilton, New Zealand
  • 16:01 (UTC +12:00)
View GitHub Profile
@adammyhre
adammyhre / InspectorLock.cs
Last active May 1, 2026 03:46
Lock Inspector Icon and Transform Constrain Proportion Icon in Unity
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Toggles the Inspector lock state and the Constrain Proportions lock state.
/// </summary>
public static class LockInspector {
static readonly MethodInfo flipLocked;
static readonly PropertyInfo constrainProportions;