mipmapBias in the Texture Importer

Straight to the bat: Our method of adjusting the mipmapBias properties procedurally for textures at the start of our game doesn't seem to work anymore like it used to in 3.1.

Any ideas on why this could be happening? Our code is pretty straight forward as is described in the following pseudocode:

1) Call to Start()

2) Find objects of type Texture and cache in an array t2d[]

3) foreach Texture in t2d set mipmapBias to some value

Before updating to 3.2, this worked perfectly fine. We would see our textures getting displayed really sharp.

Update (posting the code below):

void updateBias()
    Texture[] t2d = Resources.FindObjectsOfTypeAll(typeof(Texture)) as Texture[];

    foreach(Texture t in t2d)
        t.mipMapBias = -1.68f;

3.2 added mipMapBias to the TextureImporter class, so you'd be better off using that now; doing things in the Editor is always better if you can.

However, it doesn't sound like that should break your code, if you're using Texture.mipMapBias at runtime, which should override the Importer settings. Maybe posting actual code that we can look at would be best, if this is not helping you.



using UnityEngine;
using UnityEditor;

class MipMapBiasMenu {

static Object[] selection;

[MenuItem("Assets/Set Global Mipmap Bias", true)] static bool ValidateSetBias () {
    selection = Selection.GetFiltered(typeof(Texture2D), SelectionMode.DeepAssets);
    return (selection.Length > 0); 
[MenuItem("Assets/Set Global Mipmap Bias", false, 1011)] static void SetBias () {
    foreach (Texture texture in selection) {
        string path = AssetDatabase.GetAssetPath(texture);
        (AssetImporter.GetAtPath(path) as TextureImporter).mipMapBias = -1.68F;