XNA png import
PostPosted: Tue Aug 26, 2008 8:38 pm
Anyone here use XNA 2.0 and VS 2005 C#.NET?
I'm having a problem getting my pngs loaded onto the load content method, I used
mySprite = new SoldierSprite(Content.Load<Texture2d>("TestSprite"), new Vector2(0f,0f), new Vector2(178f,261f));
but every time the program runs it says it can't find "TestSprite" which is loaded in the solution Items as a png... I mean, the file is sitting there right in front of me, loaded into the program and I copied and pasted its name into this location just as stated in Beginning XNA 2.0 Game Programming from Novice to Professional... but IT SAYS IT CAN'T FIND IT ... Is there something else I have to do to the file for VS to find it and use it in XNA?
Confused and Lost,
Pascal
I'm having a problem getting my pngs loaded onto the load content method, I used
mySprite = new SoldierSprite(Content.Load<Texture2d>("TestSprite"), new Vector2(0f,0f), new Vector2(178f,261f));
but every time the program runs it says it can't find "TestSprite" which is loaded in the solution Items as a png... I mean, the file is sitting there right in front of me, loaded into the program and I copied and pasted its name into this location just as stated in Beginning XNA 2.0 Game Programming from Novice to Professional... but IT SAYS IT CAN'T FIND IT ... Is there something else I have to do to the file for VS to find it and use it in XNA?
Confused and Lost,
Pascal