private void DrawColorMapParams()
        {
            GColorMapGeneratorParams param = GTextureToolParams.Instance.ColorMap;

            param.Terrain = EditorGUILayout.ObjectField("Terrain", param.Terrain, typeof(GStylizedTerrain), true) as GStylizedTerrain;

            lockLivePreviewTerrain = true;
            SetLivePreviewTerrain(param.Terrain);
            GTextureToolParams.Instance.ColorMap = param;
        }
        public void Generate(RenderTexture targetRt)
        {
            GColorMapGeneratorParams param = GTextureToolParams.Instance.ColorMap;

            if (param.Terrain == null || param.Terrain.TerrainData == null)
            {
                GCommon.FillTexture(targetRt, Color.black);
            }
            else
            {
                RenderColorMap(param.Terrain, targetRt);
            }
        }