Unity 3D 使用TerrainCompose 调用RTP 报错:

Unity 3D:5.2 version

TerrainCompose:1.92 version

RTP:3.2d version

Unity 3D  使用TerrainCompose 调用RTP 报错:

Can't access alphamapTexture directly...
UnityEngine.Debug:LogError(Object)
ReliefTerrain:GetControlMaps() (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:465)
ReliefTerrain:RefreshTextures(Material, Boolean) (at Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs:273)
ReliefTerrainEditor:OnDisable() (at Assets/ReliefPack/Editor/ReliefTerrain/ReliefTerrainEditor.cs:124)

 

解决方案:

  打开CS文件: Assets/ReliefPack/Scripts/ReliefTerrain/ReliefTerrain.cs   定位到457行;

  将以下内容:

    PropertyInfo info = terrainDataType.GetProperty("alphamapTextures", BindingFlags.Instance | BindingFlags.NonPublic);

  修改为:

     PropertyInfo info = terrainDataType.GetProperty("alphamapTextures", BindingFlags.Instance | BindingFlags.Public);

posted @ 2015-09-22 15:47  那些消散不去的是寂寞  阅读(530)  评论(0编辑  收藏  举报