Hi
I would like to add some kind of function listener (if that now is the correct term) like the button’s OnClick to a custom script and how can I use it? Any help regarding this is very appreciated!
If you have no idea what I am talking about then it is this I am talking about.

Thanks!
I got it now. It is all thanks to this: CollisionCall.cs · GitHub It was to great help!
This is my finished script.
public class FPC_InteractObject : MonoBehaviour {
[System.Serializable]
public class InteractionEvent : UnityEvent {}
public InteractionEvent onInteraction = new InteractionEvent();
public void Interact()
{
onInteraction.Invoke();
}
}
The interaction function is then called by something else, like a player.