UnityEditor.TagManagerInspector.DrawSortLayerListElement C# (CSharp) Method

DrawSortLayerListElement() private method

private DrawSortLayerListElement ( Rect rect, int index, bool selected, bool focused ) : void
rect UnityEngine.Rect
index int
selected bool
focused bool
return void
        private void DrawSortLayerListElement(Rect rect, int index, bool selected, bool focused)
        {
            rect.height -= 2f;
            rect.xMin -= 20f;
            bool enabled = GUI.enabled;
            GUI.enabled = this.m_IsEditable && this.CanEditSortLayerEntry(index);
            string sortingLayerName = InternalEditorUtility.GetSortingLayerName(index);
            string name = EditorGUI.TextField(rect, " Layer ", sortingLayerName);
            if (name != sortingLayerName)
            {
                base.serializedObject.ApplyModifiedProperties();
                InternalEditorUtility.SetSortingLayerName(index, name);
                base.serializedObject.Update();
            }
            GUI.enabled = enabled;
        }