How i can create something like it in my script

I try with it but doesnt work
class MyClass : MonoBehaviour {
public delegate void OnActionElement ();
public event OnActionElement destroy;
}
How i can create something like it in my script

I try with it but doesnt work
class MyClass : MonoBehaviour {
public delegate void OnActionElement ();
public event OnActionElement destroy;
}
@vzenix
Use UnityEngine.Events to make it.
Something like:
using UnityEngine.Events;
public UnityEvent myEvent;
void Update () {
if(Input.GetKeyDown(KeyCode.Space)){
myEvent.Invoke();
}
}
public void someFunction() {
print("here");
}
And assign someFunction() in the inspector.
The solution is here "https://answers.unity.com/questions/984182/custom-event-handler-in-inspector.html" ...
– vzenix