【发布时间】: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]])"}
似乎有一种简单的方法可以做到这一点,但它却让我们望而却步。 我们将非常感谢您的帮助!
【问题讨论】: