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";
            }
  • 相关阅读:
    python爬取网页
    python异常处理
    本周总结
    改变promise状态有三种resolve、reject、throw
    详解Promise.race()可以解决多个异步请求那个请求先返回
    Promise.all()方方详解
    你不知道的Promise构造函数Promise(excutor)
    你不知道的Promise状态变化机制
    Promise练习文件读取
    关于async函数的错误处理
  • 原文地址:https://www.cnblogs.com/furenjun/p/hightmap.html
Copyright © 2011-2022 走看看