博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决:Cannot find ContentTypeReader HeightmapCollision.HeightMapInfoReader
阅读量:4502 次
发布时间:2019-06-08

本文共 1104 字,大约阅读时间需要 3 分钟。

在调试 hightmap图生成 3d地形,在调用

  terrain = Content.Load<Model>("terrain");语句时出现以下错误提示:

原因:

需要更改 HeightMapInfoContent.cs 文件中的以下方法中的 HeightMapInfo类和HeightMapInfoReader类的命名空间,改成你实际的命名空间名称,该命名空间名称应与你项目命名空间名称一致:

(注:上面说的两个类在HeightMapInfo.cs文件中。)

 

      
public 
override 
string GetRuntimeType(TargetPlatform targetPlatform)
        {
          ...
        }
        
public 
override 
string GetRuntimeReader(TargetPlatform targetPlatform)
        {
         ...
        }

 

如下图所示:

 本例修改结果如下所示:

 

///
 
<summary>
        
///
 Tells the content pipeline what CLR type the
        
///
 data will be loaded into at runtime.
        
///
 
</summary>
        
public 
override 
string GetRuntimeType(TargetPlatform targetPlatform)
        {
            
return 
"
hightmapTerrain.HeightMapInfo, 
" +
                
"
hightmapTerrain, Version=1.0.0.0, Culture=neutral
";
        }
        
///
 
<summary>
        
///
 Tells the content pipeline what worker type
        
///
 will be used to load the data.
        
///
 
</summary>
        
public 
override 
string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            
return 
"
hightmapTerrain.HeightMapInfoReader, 
" +
                
"
hightmapTerrain, Version=1.0.0.0, Culture=neutral
";
        }

 

posted on
2012-04-21 14:20 阅读(
...) 评论(
...)

转载于:https://www.cnblogs.com/furenjun/archive/2012/04/21/hightmap.html

你可能感兴趣的文章
jQuery(属性操作)
查看>>
Python之路【第九篇】:Python面向对象
查看>>
background和background-image一点小区别
查看>>
ASCII码对照表
查看>>
HackerRank "Training the army" - Max Flow
查看>>
jquery next()方法
查看>>
深入剖析js命名空间函数namespace
查看>>
SQLHelper
查看>>
用标准Struts2+mvc写的用户管理
查看>>
Cocos2d-x 3.0 编译出错 解决 error: expected &#39;;&#39; at end of member declaration
查看>>
Ubuntu12.04下载Repo
查看>>
python基础教程_学习笔记10:异常
查看>>
MATLAB——scatter的简单应用
查看>>
linux下复制粘贴快捷键
查看>>
什么是对象
查看>>
记录开发小程序
查看>>
WinSock服务程序
查看>>
巴西柔术第五课:过腿
查看>>
文件的操作
查看>>
网上图书商城项目学习笔记-007登录功能实现
查看>>