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;
        }
예제 #2
0
        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);
            }
        }