Asset not found XNA

前端 未结 4 1366
半阙折子戏
半阙折子戏 2020-12-02 02:33

I am very new to XNA and I began by following a tutorial that draws an image on the screen. I was able to move my image into the Content folder but when I try to use it in

4条回答
  •  情歌与酒
    2020-12-02 03:09

    In XNA 4.0 Content Reference project has a Content Root Directory property (set to Content by default) that specifies the name of the subdirectory that will hold the final output files of pipeline content generated from the project folder. Therefore, if you create Content directory inside Content Reference project the Face asset will be placed in Content/Content directory and you will have to load it like this

    mSpriteTexture = Content.Load(@"Content/Face");
    

    despite setting Content.RootDirectory = "Content"

提交回复
热议问题