Maintain a list of all the FontData features.
defaultFontData holds a list of the FontData values. For example defaultFontData will return the size of the current font by returning fontSize. Data should not be written into defaultFontData. It is intended to be read only.
// Display values from FontData that are stored in properties.
using UnityEngine; using UnityEngine.UI;
public class Example : MonoBehaviour { [SerializeField] protected FontData m_FontData = FontData.defaultFontData;
void Start() { Debug.Log("font: " + m_FontData.font); Debug.Log("fontStyle: " + m_FontData.fontStyle); } }
Did you find this page useful? Please give it a rating: