2016-04-16 37 views
0

我和我的朋友想要在Monogame管道中的「構建內容」過程中實現一個自定義效果,該效果與網格相關聯。也就是說,如果一個模型由10個不同的網格組成,每個網格都有自己的效果,它會讓我們的生活變得更容易。Monogame自定義效果

就我而言,做這個曾經是微不足道的,這樣的事情:https://blogs.msdn.microsoft.com/shawnhar/2006/12/07/rendering-a-model-with-a-custom-effect/

現在做thigs在我們不工作,遺憾的是這種方式。我們編寫了自定義模型處理器,自定義模型材質處理器和自定義紋理處理器。

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]])"} 

好像有這樣做的一個簡單的方法,但它躲開我們。 我們將不勝感激您的幫助!

回答