Scarfy didn't load when running debug

So I ran into an issue where the scarfy texture was not appearing in my window. Wasn’t getting any errors or problems so checked my logic and it seemed to check out. I’ve seen a few topics where “Run build task” (compile) solved things, so have that a shot.

Viola! The texture now appears when running debug.

My question is…why? It looks like the instructor was able to run in debug without any issues before compiling, so what could potentially cause this? I tend not to be satisfied with a fix until I know why a fix worked.

Cheers!

I am also having this problem where Scarfy’s texture isn’t loaded in :frowning:
“Run Build Task” hasn’t seemed to fix it for me either

Hi there!

I could certainly help solve why Scarfy isn’t being loaded. But I would need to see your code so I can debug the issue.

As for the OP, I don’t have an answer for you. Debugging runs the build task first so doing it separately shouldn’t yield a different result.

Hello, I am having the same issue and can’t for the life of me find the problem. Scarfy just doesn’t load in but I’m not receiving any problems that i can notice. Everything was showing like it should, up until i added the Texture2D lines for adding the image. I have added three screenshots. Two showing my code and one showing the window that appears when running debug. I have tried re watching the video and going through my code but I don’t see an issue with the code. If you could point me in the right direction of my mistake that would be fantastic.



image
Thank you in advance!! :slight_smile:

1 Like

You have scarfyRec assigning to itself on line 17. scarfyRec.height = scarfyRec.height should be scarfyRec.height = scarfy.height

3 Likes

Thank you for coming back to me so quickly. Cant believe i didnt notice that i must have read that section a good few times trying to figure out the issue. As stated i adjusted the code to suit and the issue was resolved and everything else working.

Many Thanks for the help! :slight_smile:

1 Like

I had also made the mistake of scarfyRec assigning to itself. This fixed my issue, thanks Tuomo

Check if the image really is in textures/scarfy.png and not in something like dapper-dasher-master-textures/textures/scarfy.png

Privacy & Terms