Add more information on "Invalid image specified"

Hello, I’m using UI Toolkit for runtime UIs on Unity 6000.0.23f1 version.

And sometimes I have this warning that appears on reimport, and I don’t have any idea where the problem is.

Could be really nice to have more information in the stacktrace or the message like : the image file injured, the USS file imported or anything that could explicitly helps us find the problem.

1 Like

Thank you for the feedback! Did you happen to move the image & or the file using it after its creation?

Which image? We have more than a hundred of images and I don’t know which one could cause this issue :frowning:

I thought this was related to a specific image. Please log a bug so we can take a look at it!

That would involve us to send the entire project :thinking:

Isn’t it possible to get a better stacktrace for this warning?

I totally agree with you about this. UI Element (for USS, UXML files) errors and warnings are hard to track. You mostly can’t know which property/attribute/selector/etc caused that error/warning.

Same here.
It would be the minimum to know which element is concerned by this warning, because there is not visual indicator whatsoever and I can’t see any problem with any of the current sprites in my document…

+1 to this

Thankfully for my project, my files were relatively small, but in my case, there was no obvious image error. I knew the only place I was using images in my UIToolkit was the backgrounds, so I just systematically went through to find the culprit.

This was very tedious.

I think a reference to the UXML or USS file that is causing the issue within the debug logger would be super helpful here. I couldn’t imagine how frustrating this would be if my project were VERY large. :melting_face: