Access to Custom Font Asset in Editor Scripts, no Custom Font Class?


we are creating a game with several bitmap fonts that will be created via a custom editor (supports several different styles, outlines, etc.). To import these fonts into Unity we'd like to create a short editor script, parsing kerning information from a descriptor file.

So far I wasn't able to either create a new 'custom font' asset from script nor accessing one. There seems to be no Class for Custom Fonts from what I see in the documentation.

Is there really no Class for custom fonts or is it just undocumented?

Thx, Morothar

While there is no exposed API to edit these values, you should be able to use the SerializedObject and SerializedProperty classes to do so - see the docs for those classes for an example of usage.