Skip to content

Instantly share code, notes, and snippets.

@Syy9
Created July 31, 2018 22:56
Show Gist options
  • Save Syy9/023182893162441cc20f99b175ae95e8 to your computer and use it in GitHub Desktop.
Save Syy9/023182893162441cc20f99b175ae95e8 to your computer and use it in GitHub Desktop.
How to change inspector lock
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public static class ChangeInspectorLock {
[MenuItem("Hoge/Fuga %g")]
public static void ChangeLock()
{
var tracker = ActiveEditorTracker.sharedTracker;
tracker.isLocked = !tracker.isLocked;
tracker.ForceRebuild();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment