Check for event trigger from one script to another

I have a script that consist of an event and a function that is triggered when this is called. Now I have another script. How do I check if the event from first script is triggered?

First script

public class MyEventManager: MonoBehaviour
{ 

  private static MyEventManager _instance;

  public static MyEventManager Instance
    {
        get
        {
            if (_instance == null)
                _instance = FindObjectOfType<MyEventManager>();

            return _instance;
        }
    }

  public delegate void OpenEventHandler(bool wasOpened);
  public event OpenEventHandler Opening;

   public void OpeningObj()
    {
        OpeningObj(true);
    }

    public void OpeningObj(bool wasOpened)
    {
        Opening?.Invoke(wasOpened);
    }

Second script

private MyEventManager eventMan;

private void Start () {
        eventMan= (MyEventManager ) GameObject.FindObjectOfType (typeof (MyEventManager ));

        browserOverlay.Opening+= this.CalledFromFunction;
    }

private void CalledFromFunction()
{
  Debug.Log("Is Called");
}

I get the error – No overload for 'CalledFromFunction' matches delegate 'MyEventManager.OpenEventHandler'

Answer

Since you use a singleton approach, you don’t actually need the private MyEventManager eventMan; in the other class. You can get access to the manager from anywhere with the public static property you have declared ( public static Instance MyEventManager), so to get acces to the manager just use MyEventManager.Instance, since it’s static it will be accessible from anywhere.

To react to some event the listener need to subscribe to the event. It’s done like this:

public class ListenerClass : MonoBehaviour
{
    void Start()
    {
        MyEventManager.Instance.Opening += OnOpening;
    }

It means whenever the Opening event is triggered in the manager, the OnOpening method of the listener class should be called:

    void OnOpening(bool value)
    {
        // do stuff when the Opening event is triggered 
    }
}

EDIT: my browser failed to load the second part where you have posted the second script and the error message.
You get the error because you have declared the event delegate as a function that takes 1 boolean argument and has no return value ( void OpenEventHandler(bool wasOpened) but in the second script you set the event handler to the method that doesn’t have arguments, therefore it doesn’t match the delegate signature.
You need to change

private void CalledFromFunction()

to

private void CalledFromFunction(bool value)

to get the method match the delegate.