using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class class1 : MonoBehaviour {

    public static class1 Instance
    {
        private set;
        get;
    }

    void Awake()
    {
        Instance = this;
    }

    void OnDestroy()
    {
        if (Instance != null)
        {
            Instance = null;
        }
    }


    public delegate void FunVoid();
    public delegate void FunString(string str);

    public FunVoid delFun;
    public FunString delFunString;

    // Use this for initialization
    void Start () {

        delFun();
        delFunString("11111");
    }

    // Update is called once per frame
    void Update () {

    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class class2 : MonoBehaviour {

    public static class2 Instance
    {
        private set;
        get;
    }

    void Awake()
    {
        Instance = this;
    }

    void Start()
    {
        class1.Instance.delFun += class2Fun;
        class1.Instance.delFunString += class2FunString;
    }

    void OnDestroy()
    {
        if (Instance != null)
        {
            Instance = null;
        }
        class1.Instance.delFun -= class2Fun;
        class1.Instance.delFunString -= class2FunString;
    }
    // Use this for initialization


    // Update is called once per frame
    void Update () {

    }

    void class2Fun()
    {
        Debug.Log("class2Fun()");
    }

    void class2FunString(string str)
    {
        Debug.Log("class2FunString()");
    }
}
.