static public bool IsValid (List<EventDelegate> list) { if (list != null) { for (int i = 0, imax = list.Count; i < imax; ++i) { EventDelegate del = list[i]; if (del != null && del.isValid) return true; } } return false; }
private void OnEnable() { if (EventDelegate.IsValid(onChange)) { eventReceiver = null; functionName = null; } if (font != null) { if (font.isDynamic) { trueTypeFont = font.dynamicFont; fontStyle = font.dynamicFontStyle; mUseDynamicFont = true; } else if (bitmapFont == null) { bitmapFont = font; mUseDynamicFont = false; } font = null; } if (textScale != 0f) { fontSize = ((!(bitmapFont != null)) ? 16 : Mathf.RoundToInt((float)bitmapFont.defaultSize * textScale)); textScale = 0f; } if (trueTypeFont == null && bitmapFont != null && bitmapFont.isDynamic) { trueTypeFont = bitmapFont.dynamicFont; bitmapFont = null; } }