using System.Collections; using System.Collections.Generic; using UnityEngine; public class LayerCollisionHandler : MonoBehaviour { public int[] ignoreLayers; private bool recursiveIgnore; // Start is called before the first frame update void Start() { foreach (int layer in ignoreLayers) { Physics.IgnoreLayerCollision(this.gameObject.layer,layer); } } // Update is called once per frame void Update() { } }