2015-01-26 3 views
2

Monogame 프로그램에서 텍스트를 그리려합니다. SpriteFont를 사용하여 SpriteFont를 사용하려고하지만 SpriteFont를로드 할 때 다음 오류가 발생합니다.Error - SpriteFont가 구현되지 않았습니다.

//Here I try to load the SpriteFont 
//It is kept in the "Content/fonts" folder, with "Content" as the Content.RootDirectory 
Font = Content.Load<SpriteFont>("fonts/SpriteFont1"); 

//I then get this error 
An unhandled exception of type 'System.NotImplementedException' occurred in MonoGame.Framework.dll 
Additional information: The method or operation is not implemented. 

SpriteFont1 빌드 작업은 "Copy Always (항상 복사)"로 출력 디렉토리에 복사가 설정된 "내용"으로 설정됩니다. SpriteFont1.xnb 파일은 동일한 설정으로 Content 폴더에 있습니다. SpriteFont를로드 할 수 있도록 오류를 수정하려면 어떻게해야합니까?

+0

메서드가 구현되지 않았습니다. 이것은 Mono 라이브러리에있을 수 있습니다. 스택 추적은 어떤 방법을 보여줄 것입니다. –

+0

제목을 편집했습니다. "[제목에"태그 "가 포함되어 있어야합니까?] (http://meta.stackexchange.com/questions/19190/)"합의가 "아니오, 그렇지 않아야한다"는 것을 참조하십시오. –

답변

5

간단한 수정. 스택 트레이스 (Richard Schneider 덕분에)에 따르면 SpriteFont1.xnb 파일은 실제 .SpriteFont 파일과 같은 폴더에 있어야한다는 것을 알게되었습니다.

0

사실 .xnb 파일은 .SpriteFont에서 컴파일되므로 필요합니다. 따라서 .xnb 파일 만 Content 폴더에 복사해야합니다.

NotImplementedException은 .SpriteFont 파일을 직접로드하기 위해 LoadContent이 구현되어 있지 않기 때문입니다. (MonoGame 3.5에서 테스트 됨)