码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2015-09-22 16:31:14      阅读:393      评论:0      收藏:0      [点我收藏+]

标签:

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);

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

标签:

原文地址:http://www.cnblogs.com/jqm304775992/p/4829141.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!