Ejemplo n.º 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
        }
    }
Ejemplo n.º 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();
         }
     }
 }
Ejemplo n.º 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();
         }
     }
 }