Skip to content

Instantly share code, notes, and snippets.

@adammyhre
adammyhre / InspectorLock.cs
Last active May 12, 2025 04:28
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;