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";
            }
  • 相关阅读:
    298. Binary Tree Longest Consecutive Sequence
    128. Longest Consecutive Sequence
    59. Spiral Matrix II
    54. Spiral Matrix
    186. Reverse Words in a String II
    151. Reverse Words in a String
    61. Rotate List
    Beyond Compare脚本:命令行批量比较文件并生成html格式的差异报告
    Moving XML/BI Publisher Components Between Instances
    VSTO学习笔记
  • 原文地址:https://www.cnblogs.com/furenjun/p/hightmap.html
Copyright © 2011-2022 走看看