I’m trying to load a jpeg image from a url to be used as my texture (for, say, a Box).
I figured out I should probably be doing something with the UrlAssetInfo or UrlLocator classes, but I’m afraid I just can’t seem to be able to get this done.
It i very confusing to use (for example, if I register using "assetManager.registerLocator( X, UrlAssetInfo.class) - what goes in the “X” place? In the ZipLocator of the tutorials, we wrote “town.zip” but putting the url there doesn’t help).
I have been programming quite a lot with Java at college-level a few years ago, and so I’d be really comfortable if someone could point out a useful source for me to learn how to do this (if an answer isn’t readily available) - I’m feeling as if I’m searching in the dark and don’t know what I’m doing and that frustrates me
I’ve been all around these pages, searched the javadoc like a nice java student and what I tried didn’t work.
My code looked exactly the same as what you’ve written, only for some stupid reason I was writing “UrlAssetInfo” instead of “UrlLocator”.
I changed that. Now it works
Your post really helped me understand I was in the (sort of) right direction and eventually get it done - Thank you!
Indeed, the compiler forced me to cast the class to Class which should have prompted me something’s wrong, but I was so unsure of what I was doing I really didn’t think that I was just a step away from a working code.