Why doesn't this code do anything? (textureImporterSettings.mipmapBias = -0.5;)

Here’s the script code which I have put inside the editor folder,

it’s supposed to change the mipmap bias for every imported texture:

(Javascript)

private var textureImporter = new TextureImporter();

function Start() {
	textureImporter.mipMapBias = -0.5;
	AssetDatabase.Refresh();
}

Pretty simple, but I know for a fact it’s not affecting the mipMapBias, because I’ve changed the mipmap bias individually for the textures and there’s a big difference in sharpness.

Long story short, that code above isn’t doing what I want! (it doesn’t do anything at all) I even used the Refresh for asset database, didn’t help at all, do I have to re-import the textures after I change the mip map bias? How do I do that? How do I make that code do what I want?

I believe you need to retrive the importer based upon a path to a asset:

after that you can change the importer settings.

hmmm, I’ll play with that then and see what happens! thanks!