private void OnEnable() { m_target = target as UIDialog; TypewriterText typewriterText = m_target.text as TypewriterText; if (typewriterText) { m_typewriterTextEditor = Editor.CreateEditor(m_target.text) as TypewriterTextEditor; } }
protected override void OnEnable() { if (target) //fix some log errors when compiling code while this component in in the scene { base.OnEnable(); m_typingSpeed = serializedObject.FindProperty("m_typingSpeed"); m_fillAmount = serializedObject.FindProperty("m_fillAmount"); m_typingSound = serializedObject.FindProperty("m_typingSound"); m_target = target as TypewriterText; } }
virtual protected void OnEnable() { m_typeWriterText = text as TypewriterText; m_timerToContinue = timeToContinueText; if (m_typeWriterText) { m_typeWriterText.OnFilledTextEvent += OnTypeWriterFilledText; m_typeWriterText.unscaledTime = unscaledTime; } if (onEnableEvent != null) { onEnableEvent.Invoke(); } }