Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Initializing Texture - File Doesn't Exist #8

Closed
tylerrrr07 opened this issue Jan 28, 2012 · 5 comments
Closed

Error Initializing Texture - File Doesn't Exist #8

tylerrrr07 opened this issue Jan 28, 2012 · 5 comments
Labels

Comments

@tylerrrr07
Copy link

I encountered an issue on load where textures would not properly initialize. It seems that after the error messages all go away (once for every single texture in the level) the textures seem to load ok but its very annoying. This issue also crops up upon placing textures within the level.

From what I can tell via debugging and the error provided is that this is an issue of the texture item's relative path also containing the parent folder.

For Example:

Content Root Folder: C:\Project\Content
Content Root Folder contains a sub folder called "Sprites" and as such texture item's relative path should be: Sprites/file.ext
Error message states it can't find the file: C:\Project\Content\Content\Spites\file.ext (notice the duplicate entry for "Content")

In debugging I was able to find that within the initialiseTexture method of the TextureItemEditor.cs file, the parameter textureFileName was "Content\Sprites\file.ext" - I traced this up a few steps and found it came from some properties collections and got nervous about changing anything much further and decided to post my findings here.

@SteveDunn
Copy link
Owner

Hi there, could you provide your level file and texture folder?
Thanks for the feedback and I'll get right on it.
Cheers,
Steve.
steve@dunnhq.com

@SteveDunn
Copy link
Owner

This looks to be because the 'content root folder' doesn't have a trailing back-slash, so .NET is assuming it's a file and not a folder. I'll fix this so that it forces the trailing slash.

SteveDunn added a commit that referenced this issue Jan 29, 2012
@SteveDunn
Copy link
Owner

This should now be fixed. Please let me know if you're still having issues with it.

@SteveDunn
Copy link
Owner

I'm closing this, but do let me know if there's still an issue

@tylerrrr07
Copy link
Author

Looks to be resolved. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants