2
font = Content.Load<SpriteFont>("TopBarFont");
无论发生什么事情,或者我改变了什么,我都会得到这个错误。SpriteFont不能与MonoGame配合使用
An unhandled exception of type 'System.NotImplementedException' occurred in MonoGame.Framework.dll Additional information: The method or operation is not implemented.
我TopBarFont.spritefont在设置为内容的内容文件夹,并始终复制到像我的所有其他资产的输出目录。
我SpriteFont类文件看起来像这样,
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Open Sans Light</FontName>
<Size>36</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Regular</Style>
<CharacterRegions>
<CharacterRegion>
<Start> </Start>
<End>~</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
我看到一些其他职位,只需使用2D纹理和绘制,但只是没有。那默认使用拉带的全部目的。
尝试添加TopBarFont.xnb到其中.SpriteFont –
MonoGame有一个内容创建工具相同的文件夹,你应该使用。 – robot9706