font = Content.Load<SpriteFont>("TopBarFont");无论出于什么原因,不管发生了什么,或者改变了什么,我总是会犯这样的错误。
An unhandled exception of type 'System.NotImplementedException' occurred in MonoGame.Framework.dll Additional information: The method or operation is not implemented.我将content文件夹中的TopBarFont.spritefont设置为content,并与其他所有资产一样,始终将其复制到输出目录。
我的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的纹理画出来,但是没有..。它默认使用DrawString的全部目的。
发布于 2015-07-10 11:03:08
使用这转换器将.SpriteFont转换成.xnb
https://stackoverflow.com/questions/31330724
复制相似问题