void OnEnable() { if (Instance == null) { // Load settings from TMP_Settings file TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings == null) { return; } if (settings.styleSheet != null) { Instance = settings.styleSheet; } else { Instance = Resources.Load("Style Sheets/TMP Default Style Sheet") as TMP_StyleSheet; } if (!m_isDictionaryLoaded) { Instance.LoadStyleDictionary(); } } }
/// <summary> /// Function to update the internal reference to a newly assigned style sheet in the TMP Settings. /// </summary> public static void UpdateStyleSheet() { // Reset instance s_Instance = null; RefreshStyles(); }
/// <summary> /// Static Function to load the Default Style Sheet. /// </summary> /// <returns></returns> public static TMP_StyleSheet LoadDefaultStyleSheet() { //Debug.Log("Loading Default StyleSheet."); if (Instance == null) { Instance = Resources.Load("TMP_DefaultStyleSheet") as TMP_StyleSheet; if (!m_isDictionaryLoaded) Instance.LoadStyleDictionary(); } return Instance; }
/// <summary> /// Static Function to load the Default Style Sheet. /// </summary> /// <returns></returns> public static TMP_StyleSheet LoadDefaultStyleSheet() { if (Instance == null) { // Load settings from TMP_Settings file TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings != null && settings.styleSheet != null) Instance = settings.styleSheet; else Instance = Resources.Load("Style Sheets/TMP Default Style Sheet") as TMP_StyleSheet; } return Instance; }
void OnEnable() { if (Instance == null) { // Load settings from TMP_Settings file TMP_Settings settings = Resources.Load("TMP_Settings") as TMP_Settings; if (settings.styleSheet != null) Instance = settings.styleSheet; else Instance = Resources.Load("TMP_DefaultStyleSheet") as TMP_StyleSheet; if (!m_isDictionaryLoaded) Instance.LoadStyleDictionary(); } }
public static TMP_StyleSheet LoadDefaultStyleSheet() { if (Instance == null) { TMP_Settings tMP_Settings = Resources.Load("TMP Settings") as TMP_Settings; if (tMP_Settings != null && tMP_Settings.styleSheet != null) { Instance = tMP_Settings.styleSheet; } else { Instance = (Resources.Load("Style Sheets/TMP Default Style Sheet") as TMP_StyleSheet); } } return(Instance); }
/// <summary> /// Static Function to load the Default Style Sheet. /// </summary> /// <returns></returns> public static TMP_StyleSheet LoadDefaultStyleSheet() { if (Instance == null) { // Load settings from TMP_Settings file TMP_Settings settings = Resources.Load("TMP Settings") as TMP_Settings; if (settings != null && settings.styleSheet != null) { Instance = settings.styleSheet; } else { Instance = Resources.Load("Style Sheets/TMP Default Style Sheet") as TMP_StyleSheet; } } return(Instance); }
private void OnEnable() { if (Instance == null) { TMP_Settings tMP_Settings = Resources.Load("TMP Settings") as TMP_Settings; if (!(tMP_Settings == null)) { if (tMP_Settings.styleSheet != null) { Instance = tMP_Settings.styleSheet; } else { Instance = (Resources.Load("Style Sheets/TMP Default Style Sheet") as TMP_StyleSheet); } if (!m_isDictionaryLoaded) { Instance.LoadStyleDictionary(); } } } }
void OnEnable() { //Debug.Log("TMP_StyleSheet - OnEnable() called."); if (Instance == null) { Instance = Resources.Load("TMP_DefaultStyleSheet") as TMP_StyleSheet; if (!m_isDictionaryLoaded) Instance.LoadStyleDictionary(); } }