/// <summary>
    /// Raises the draw gizmos event.
    /// </summary>
    public void OnDrawGizmos()
    {
        if (!ShowGrid)
        {
            return;
        }

        Gizmos.color = GridColor;

        int _size = 5;

        for (int i = 0; i < 10; i++)
        {
            Vector3 _pos_x1 = new Vector3(m_GridMovePosition.x - (GridSize * _size), 1, m_GridMovePosition.z - (GridSize * _size) + (GridSize * i));
            Vector3 _pos_x2 = new Vector3(m_GridMovePosition.x + (GridSize * _size), 1, m_GridMovePosition.z - (GridSize * _size) + (GridSize * i));
            Vector3 _pos_z1 = new Vector3(m_GridMovePosition.x - (GridSize * _size) + (GridSize * i), 1, m_GridMovePosition.z - (GridSize * _size));
            Vector3 _pos_z2 = new Vector3(m_GridMovePosition.x - (GridSize * _size) + (GridSize * i), 1, m_GridMovePosition.z + (GridSize * _size));

            Gizmos.DrawLine(_pos_x1, _pos_x2);
            Gizmos.DrawLine(_pos_z1, _pos_z2);

            for (int a = 1; a <= 10; a++)
            {
                Vector3 _node_point = _pos_x1 + new Vector3(GridSize * a, 0, 0);
                Vector3 _offset     = new Vector3(-GridSize * 0.25f, 10, GridSize * 0.5f);

                CustomGizmos.Text("" + _node_point.x + ":" + _node_point.z, _node_point + _offset, GridColor, 14, FontStyle.Normal);
            }
        }
    }
        private void DrawRegisterGizmos()
        {
            ICECreatureRegister _register = ICECreatureRegister.Instance;

            if (_register == null)
            {
                return;
            }

            if (!_register.UseDebug)
            {
                return;
            }

            Gizmos.color = new Color(Color.blue.r, Color.blue.g, Color.blue.b, 0.75f);
            Vector3 _s = new Vector3(0.5f, 0.15f, 0.5f);

            Gizmos.DrawCube(transform.position + (Vector3.up * 0.25f), _s);
            Gizmos.DrawCube(transform.position + (Vector3.up * 0.50f), _s);
            Gizmos.DrawCube(transform.position + (Vector3.up * 0.75f), _s);
            Gizmos.color = new Color(Color.blue.r, Color.blue.g, Color.blue.b, 1f);
            CustomGizmos.Text("CREATURE REGISTER", transform.position, Gizmos.color, 14, FontStyle.Bold);

            foreach (ReferenceGroupObject _group in _register.ReferenceGroupObjects)
            {
                if (_group.ReferenceGameObject == null)
                {
                    continue;
                }

                if (_register.RegisterDebug.ShowReferenceGizmos && !_group.Status.isPrefab)
                {
                    Gizmos.color = new Color(_register.RegisterDebug.ColorReferences.r, _register.RegisterDebug.ColorReferences.g, _register.RegisterDebug.ColorReferences.b, 0.25f);
                    Vector3 _pos  = _group.ReferenceGameObject.transform.position;
                    float   _size = Mathf.Clamp(_group.ReferenceGameObject.transform.lossyScale.magnitude, 0.25f, 1) * 0.25f;
                    Gizmos.DrawSphere(_pos, _size);
                    _pos.y += 2;

                    if (_register.RegisterDebug.ShowReferenceGizmosText)
                    {
                        Gizmos.color = new Color(_register.RegisterDebug.ColorReferences.r, _register.RegisterDebug.ColorReferences.g, _register.RegisterDebug.ColorReferences.b, 1f);
                        CustomGizmos.Text(_group.ReferenceGameObject.name + " (SCENE REFERENCE)", _pos, Gizmos.color, 12, FontStyle.Italic);
                    }
                }

                if (_register.RegisterDebug.ShowCloneGizmos)
                {
                    foreach (GameObject _item in _group.ActiveObjects)
                    {
                        if (_group.ReferenceGameObject == _item)
                        {
                            continue;
                        }

                        Gizmos.color = new Color(_register.RegisterDebug.ColorClones.r, _register.RegisterDebug.ColorClones.g, _register.RegisterDebug.ColorClones.b, 0.25f);
                        Vector3 _pos  = _item.transform.position;
                        float   _size = Mathf.Clamp(_item.transform.lossyScale.magnitude, 0.25f, 1) * 0.25f;
                        Gizmos.DrawSphere(_pos, _size);

                        if (_register.RegisterDebug.ShowCloneGizmosText)
                        {
                            _pos.y      += 2;
                            Gizmos.color = new Color(_register.RegisterDebug.ColorClones.r, _register.RegisterDebug.ColorClones.g, _register.RegisterDebug.ColorClones.b, 1f);
                            CustomGizmos.Text(_item.name + " (CLONE)", _pos, Gizmos.color, 12, FontStyle.Italic);
                        }
                    }
                }

                if (_register.RegisterDebug.ShowSpawnPointGizmos && _group.PoolManagementEnabled)
                {
                    foreach (SpawnPointObject _point in _group.ValidSpawnPoints)
                    {
                        if (_point.SpawnPointGameObject == null)
                        {
                            continue;
                        }

                        GameObject[] _objects = _point.GetAllSpawnPointGameObjects();

                        foreach (GameObject _object in _objects)
                        {
                            Gizmos.color = new Color(_register.RegisterDebug.ColorSpawnPoints.r, _register.RegisterDebug.ColorSpawnPoints.g, _register.RegisterDebug.ColorSpawnPoints.b, 0.25f);
                            Vector3 _pos  = _object.transform.position;
                            float   _size = Mathf.Clamp(_object.transform.lossyScale.magnitude, 0.25f, 1) * 0.25f;
                            Gizmos.DrawSphere(_pos, _size);

                            if (_point.UseRandomRect)
                            {
                                CustomGizmos.Box(_object.transform, _point.RandomRect, new Vector3(0, _point.RandomRect.y * 0.5f, 0));
                            }
                            else
                            {
                                CustomGizmos.Circle(_pos, _point.SpawningRangeMin, CustomGizmos.GetBestDegrees(_point.SpawningRangeMin, 360), false);
                                CustomGizmos.BeamCircle(_pos, _point.SpawningRangeMax, CustomGizmos.GetBestDegrees(_point.SpawningRangeMax, 360), false, _point.SpawningRangeMax - _point.SpawningRangeMin, "", false, true);
                            }

                            if (_register.RegisterDebug.ShowSpawnPointGizmosText)
                            {
                                _pos.z      += _point.SpawningRangeMax;
                                _pos.y      += 4;
                                Gizmos.color = new Color(_register.RegisterDebug.ColorSpawnPoints.r, _register.RegisterDebug.ColorSpawnPoints.g, _register.RegisterDebug.ColorSpawnPoints.b, 1f);
                                CustomGizmos.Text(_point.SpawnPointGameObject.name + " (SP)", _pos, Gizmos.color, 12, FontStyle.Italic);
                            }
                        }
                    }
                }
            }
        }