zoukankan      html  css  js  c++  java
  • 解决:Cannot find ContentTypeReader HeightmapCollision.HeightMapInfoReader

    在调试 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";
            }
  • 相关阅读:
    [网站设计]网站设计的流程
    教你几招如何看透一个人
    难得迷茫
    java 日期 加减 运算
    第01章 SQL Server数据库基础 读后感
    [网站设计]如何设计一个成功的网站
    [网站设计] 素材网罗
    转载个人毕业5年职业感想
    SWTDesigner
    [存档]asp.net夜话之十一:web.config详解收藏
  • 原文地址:https://www.cnblogs.com/furenjun/p/hightmap.html
Copyright © 2011-2022 走看看