using UnityEngine; [RequireComponent(typeof(SphereCollider))] public class SingularityCore : MonoBehaviour { //This script is responsible for what happens when the pullable objects reach the core //by default, the game objects are simply turned off //as this is much more performant than destroying the objects void OnTriggerStay (Collider other) { if(other.GetComponent()){ other.gameObject.SetActive(false); } } void Awake(){ if(GetComponent()){ GetComponent().isTrigger = true; } } }