Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using UnityEngine;
- public class GameEventListeners : MonoBehaviour
- {
- [SerializeField] List<EventListenerContainer> containers;
- private void OnEnable ()
- {
- foreach (var container in containers)
- container.Listener.OnEnable ();
- }
- private void OnDisable ()
- {
- foreach (var container in containers)
- container.Listener.OnDisable ();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment