【问题标题】:Monogame Custom Effect单体游戏自定义效果
【发布时间】:2016-08-08 18:08:04
【问题描述】:

我和我的朋友想要在 Monogame 管道的“构建内容”过程中实现一个连接到网格的自定义效果。也就是说,如果一个模型由 10 个不同的网格组成,每个网格都有自己的效果,它会让我们的生活更轻松。

就我而言,这样做过去很简单,就像这样:https://blogs.msdn.microsoft.com/shawnhar/2006/12/07/rendering-a-model-with-a-custom-effect/

不幸的是,现在这种做事方式对我们不起作用。我们编写了自定义模型处理器、自定义模型材质处理器和自定义纹理处理器。

EffectMaterialContent myMaterial = new EffectMaterialContent();

myMaterial.Effect = new ExternalReference<EffectContent>(effectPath);

所以我们得到以下异常:

{"Could not find ContentTypeReader Type. Please ensure the name of the Assembly that contains the Type matches the assembly in the full type name: Microsoft.Xna.Framework.Content.ReflectiveReader`1[[Microsoft.Xna.Framework.Content.Pipeline.Graphics.EffectMaterialContent, MonoGame.Framework.Content.Pipeline, Version=3.6.0.199, Culture=neutral, PublicKeyToken=null]] (Microsoft.Xna.Framework.Content.ReflectiveReader`1[[Microsoft.Xna.Framework.Content.Pipeline.Graphics.EffectMaterialContent, MonoGam e.Framework.Content.Pipeline]])"}

似乎有一种简单的方法可以做到这一点,但它却让我们望而却步。 我们将非常感谢您的帮助!

【问题讨论】:

    标签: xna monogame


    【解决方案1】:

    我相信我们或多或少地解决了这个问题。这是我在 Monogame 社区论坛上发布的一个问题。它并不完整,但我相信它提供了对潜在问题的良好一般理解。

    http://community.monogame.net/t/mesh-effect-field/7462

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-02-16
      • 2021-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-15
      • 1970-01-01
      相关资源
      最近更新 更多