using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Start() { print("Start. Init the delegate callback"); catcher.OnKeyPressedCallback += OnKeyPressed; } void OnDestroy() { print("Script was destroyed. Remove Delegate"); catcher.OnKeyPressedCallback -= OnKeyPressed; } private void OnKeyPressed(ConsoleKey key) { print("Callback"); ... } }