Пример #1
0
 public static U_Mutex Instance()
 {
     if (null == _mutex)
     {
         _mutex = new U_Mutex();
     }
     return(_mutex);
 }
Пример #2
0
    void OnlyOneCanRun()
    {
        string appID   = Application.productName;
        bool   isFirst = U_Mutex.Instance().IsFirst(appID);

        if (false == isFirst)
        {
            Application.Quit();
        }
    }