void OnSpawned() { if (localEM == null) { localEM = GetComponentInParent <GOLocalEventManager>(); } SceneLinkedSMB <AnimationEventManager> .Initialise(GetComponent <Animator>(), this); }
private void Awake() { if (useLocalEvents && localEM == null) { localEM = GetComponent <GOLocalEventManager>(); if (localEM == null) { localEM = GetComponentInParent <GOLocalEventManager>(); } if (localEM == null) { localEM = GetComponentInChildren <GOLocalEventManager>(); } } }