static void Initialize() { initialized = true; callback = OnEvent; // This is stored in a persistant variable to force the callback from getting garbage collected! NativeAPI.input_subscribe(InputSource.Any, BtnState.Any, callback); }