Hi,
first, thanks A LOT for this code, it really works well and saves me a lot of trouble. I discovered an issue, maybe I just don't have the newest sources downloaded (maybe create a pinned thread for it with the newest sources like the nGUI version thread?).
When saving and reloading the scene, the font is always set back to font type "normal". This is caused due to mFont.dynamicFont inside UIFontInspector.OnInspectorGUI being null after loading the project. I fixed it by inserting the last line of this code:
if (changed)
{
//force access to material property as it refreshes the texture assignment
Debug.Log("font changed...");
Material fontMat = mFont.material;
if (fontMat.mainTexture == null)
Debug.Log("font material texture issue...");
UIFont.OnFontRebuilt(mFont);
EditorUtility.SetDirty(mFont); //make sure the object is saved
}
Did I miss something? It seems to fix the problem, but maybe, it causes new ones?