Exemple #1
0
        public static void EnsureHelper()
        {
            if (null != (object)instance)
            {
                return;
            }
            instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
            if (null != (object)instance)
            {
                return;
            }
            var go = new GameObject("[UnityThreadHelper]")
            {
                hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector
            };

            instance = go.AddComponent <UnityThreadHelper>();
            instance.EnsureHelperInstance();
        }
 public static void EnsureHelper()
 {
     if (null != (object) instance) return;
     instance = FindObjectOfType(typeof(UnityThreadHelper)) as UnityThreadHelper;
     if (null != (object) instance) return;
     var go = new GameObject("[UnityThreadHelper]")
     {
         hideFlags = HideFlags.NotEditable | HideFlags.HideInHierarchy | HideFlags.HideInInspector
     };
     instance = go.AddComponent<UnityThreadHelper>();
     instance.EnsureHelperInstance();
 }