浏览代码

Minor changes to TerrainLitGUI due to interface change.

/main
Yao Xiaoling 6 年前
当前提交
9c110290
共有 1 个文件被更改,包括 13 次插入2 次删除
  1. 15
      com.unity.render-pipelines.high-definition/HDRP/Editor/Material/TerrainLit/TerrainLitUI.cs

15
com.unity.render-pipelines.high-definition/HDRP/Editor/Material/TerrainLit/TerrainLitUI.cs


};
private HeightParametrization m_HeightParametrization = HeightParametrization.Amplitude;
bool ITerrainLayerCustomUI.OnTerrainLayerGUI(TerrainLayer terrainLayer, Terrain terrain, bool maskMapUsed)
private static bool DoesTerrainUseMaskMaps(Terrain terrain)
{
var terrainLayers = terrain.terrainData.terrainLayers;
for (int i = 0; i < terrainLayers.Length; ++i)
{
if (terrainLayers[i].maskMapTexture != null)
return true;
}
return false;
}
bool ITerrainLayerCustomUI.OnTerrainLayerGUI(TerrainLayer terrainLayer, Terrain terrain)
if (!maskMapUsed)
if (!DoesTerrainUseMaskMaps(terrain))
return false;
var layerBlendMode = terrain.materialTemplate.GetFloat("_LayerBlendMode"); // Don't use the member field layerBlendMode as ShaderGUI.OnGUI might not be called if the material is folded.

正在加载...
取消
保存