public override void OnInspectorGUI() { DrawDefaultInspector(); if (!EditorApplication.isPlaying) { return; } NotificationDataEvent notificationDataEvent = (NotificationDataEvent)target; if (GUILayout.Button("Fire default")) { notificationDataEvent.Fire(new NotificationData("Something important happened!", 2f, 1f, 0.2f)); } }