Пример #1
0
        public static void EnableColliders(GameObject gameObject, bool enable)
        {
            Collider component = gameObject.GetComponent <Collider>();

            if (component != null)
            {
                component.enabled = enable;
            }
            int i          = 0;
            int childCount = gameObject.transform.childCount;

            while (i < childCount)
            {
                UnityUtils.EnableColliders(gameObject.transform.GetChild(i).gameObject, enable);
                i++;
            }
        }
Пример #2
0
 public unsafe static long $Invoke13(long instance, long *args)
 {
     UnityUtils.EnableColliders((GameObject)GCHandledObjects.GCHandleToObject(*args), *(sbyte *)(args + 1) != 0);
     return(-1L);
 }