예제 #1
0
    public static void EnsureHelper()
    {
        lock (syncRoot)
        {
#if !NO_UNITY
            if (null == (object)instance)
            {
                instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
                if (null == (object)instance)
                {
                    var go = new GameObject("[UnityThreadHelper]");
                    go.hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector;
                    instance     = go.AddComponent <UnityThreadHelper>();
                }
                instance.EnsureHelperInstance();
            }
#else
            if (null == instance)
            {
                instance = new UnityThreadHelper();
                instance.EnsureHelperInstance();
            }
#endif
        }
    }
예제 #2
0
    public static void EnsureHelper()
    {
        lock (syncRoot)
        {
#if !NO_UNITY
            if (null == (object)instance)
            {
                instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
                if (null == (object)instance)
                {
                    var go = new GameObject("[UnityThreadHelper]");
                    go.hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector;
                    instance = go.AddComponent<UnityThreadHelper>();
                    instance.EnsureHelperInstance();
                }
            }
#else
		    if (null == instance)
		    {
			    instance = new UnityThreadHelper();
			    instance.EnsureHelperInstance();
		    }
#endif
        }
    }
 public static void EnsureHelper()
 {
     if (null == (object)instance)
     {
         WaitOneExtension.isWebPlayer = Application.isWebPlayer;
         instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
         if (null == (object)instance)
         {
             var go = new GameObject("[UnityThreadHelper]");
             go.hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector;
             instance     = go.AddComponent <UnityThreadHelper>();
             instance.EnsureHelperInstance();
         }
     }
 }
예제 #4
0
 public static void EnsureHelper()
 {
     if (null == (object)instance)
     {
         WaitOneExtension.isWebPlayer = Application.isWebPlayer;
         instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
         if (null == (object)instance)
         {
             var go = new GameObject("[UnityThreadHelper]");
             go.hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector;
             instance = go.AddComponent<UnityThreadHelper>();
             instance.EnsureHelperInstance();
         }
     }
 }