new Font() returns null

Greetings,

I wrote a script to import a texture from an Editor window. Then, I created a material and assigned it shader. Now I need to create a new custom font and set its material. Unfortunately, when I do

Font customFont = new Font();
AssetDatabase.CreateAsset(customFont, “Assets/Resources/Fonts/”);

or even if I tried to access one of its property before trying to creating the asset I get a : NullReferenceException error. Which is pretty odd because I did initialize the new font.

Thanks in advance.

Regards.

This is still an issue and from what I’ve been told by a Unity guy is that the C++ interpreter don’t actually create a new Font. Which is a pretty good excuse, but a good bug as well.