Loading PSD files at runtime with WWW

I’ve had much success loading png files at runtime, but am running into problems when trying to load PSD textures[same exact directory/name except for a .psd extension] in the same manner.

public void ReloadTexture()
    string fileLocation = "file://C://Users//xxx//Desktop//skins//metal_a.png";

IEnumerator WaitforWww(string fileLocation)
    WWW www = new WWW(fileLocation);
    yield return www;

    Texture tex2d = (Texture)www.texture;
    MaterialManager.SMaterialManager.humanMaterial.mainTexture = tex2d;

This code runs exactly as expected, however if I change the fileLocation to point to metal_1.psd, I get a white/red question mark as the texture that’s loaded into my material.

Do I need to handle psd files differently? Most of my research shows that I do not, but I cannot get a psd file to load with the same code that is successful with a png.


Did your research take you to the docs? Because it quite clearly says:

The data must be an image in JPG or
PNG format. If the data is not a valid
image, the generated texture will be a
small image of a question mark

At runtime you can only load either JPEG or PNG files. No other image formats are supported. Don’t confuse the Unity engine (the runtime) with the Unity editor. The editor supports much more formats. That’s most the time a matter of licenses. Unity bought a lot licenses to be able to support a lot different formats. However the runtime is something different. Because if they would include software that requires a special license you as developer would have to pay for it too.

If you need support for a certain format you need to find a .NET / mono compatible third-party loader library.