From TextureKey to ResourceLocator


I wanted to know how to use the ResoueceLocator(Tool) to get the same effect which "TextureKey.setLocationOverride(texLocURL);" did.

Well as you see I have to replace


with the new resource stuff, but actually I am not sure how to do it.
It maybe because I don't really know how TextureKey.setLocationOverride() worked in the first place, since it was just this one line and it seems that loading a model automatically checks the TextureKey for any locations.

But how does it work for the ResouceLocator?
I tried something like

ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, absolutelPath);

But I don't know where to use the returned value.

Actually, now you setup the ResourceLocatorTool with ResourceLocators and jME calls and uses the locateResource method internally.


Ok thanks, worked fine :smiley: