private void Awake() { Messenger messenger = Messenger.Require(this); if (m_Parent != null) { messenger.SetParent(Messenger.Require(m_Parent)); } }
private void OnValidate() { if (!UnityEditor.EditorApplication.isPlaying) { return; } Messenger.Require(this).SetParent(m_Parent == null ? Messenger.Root : Messenger.Require(m_Parent)); }
private void Awake() { Messenger node = Messenger.Require(this); for (int i = 0; i < m_Listeners.Length; ++i) { if (m_Listeners[i].Type && m_Listeners[i].Response.GetPersistentEventCount() > 0) { node.Register(m_Listeners[i].Type, m_Listeners[i].Response.Invoke); } } }