//        public override void OnInspectorGUI()
//        {
//            base.OnInspectorGUI();

//            var text = @"
//<size=12>How does the <b>Hybrid mode</b> work?</size>
//1. Select the length of doors in the 'New door length' field.
//2. Click the 'Add door positions' button.
//3. Click on the tile where the doors can start.
//4. Drag the mouse to last possible tile of the door line.

//<b>What if the door disappears?</b> The door line you drew is probably too short.
//<b>What is the solid outline?</b> It shows the length of a single door.
//<b>What is the dashed outline?</b> It shows the all the possible positions where the doors can be.
//";

//            var style = new GUIStyle(EditorStyles.helpBox) {richText = true};
//            EditorGUILayout.TextArea(text.Trim(), style);
//            //EditorGUILayout.HelpBox("How does the <b>Hybrid mode</b> work?", MessageType.Info);
//        }

        protected override void DrawAllDoors()
        {
            var gameObject = doors.transform.gameObject;
            var grid       = gameObject.GetComponentInChildren <Grid>();

            var color = Color.red;

            foreach (var doorLine in doors.HybridDoorModeData.DoorLines)
            {
                DoorsInspectorUtils.DrawDoorLine(doorLine, grid, color);
            }
        }
        public void OnSceneGUI()
        {
            var gameObject = doors.transform.gameObject;
            var grid       = gameObject.GetComponentInChildren <Grid>();
            var doorLines  = doors.SimpleDoorModeData.GetDoorLines(doors);

            var color = Color.red;

            foreach (var doorLine in doorLines)
            {
                DoorsInspectorUtils.DrawDoorLine(doorLine, grid, color);
            }
        }
        private void DrawDoor(Grid grid, Vector3Int from, Vector3Int to)
        {
            var length   = new OrthogonalLine(from, to).Length;
            var doorLine = new DoorLineGrid2D()
            {
                From   = from,
                To     = to,
                Length = length,
            };

            var color = Color.red;

            DoorsInspectorUtils.DrawDoorLine(doorLine, grid, color);
        }
        protected override void DrawPreview(Vector3Int from, Vector3Int to)
        {
            var gameObject = doors.transform.gameObject;
            var grid       = gameObject.GetComponentInChildren <Grid>();
            var length     = doors.HybridDoorModeData.DefaultLength;
            var doorLine   = new DoorLineGrid2D()
            {
                From   = from,
                To     = to,
                Length = length,
            };

            var color = Color.red;

            DoorsInspectorUtils.DrawDoorLine(doorLine, grid, color);
        }