ScriptReference/EditorWindow #502
Replies: 3 comments
-
|
You can implement |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
You can add a lock button to an EditorWindow using the following code: private static GUIStyle s_lockButton;
[SerializeField] private bool _isLocked;
private void ShowButton(Rect r)
{
s_lockButton ??= "IN LockButton";
using var cCS = new EditorGUI.ChangeCheckScope();
_isLocked = GUI.Toggle(r, _isLocked, GUIContent.none, s_lockButton);
if (cCS.changed)
Debug.Log($"{nameof(_isLocked)} Changed");
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
An |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ScriptReference/EditorWindow
https://docs.unity3d.com/ScriptReference/EditorWindow.html
Beta Was this translation helpful? Give feedback.
All reactions