using System.Collections; using System.Collections.Generic; using UnityEngine; public class SetObjectToDelete : MonoBehaviour { private DeleteManager dltMng; // Start is called before the first frame update void Start() { dltMng = GameObject.Find("DeletionManager").GetComponent(); } // Update is called once per frame void Update() { } public void SetObjToDelete() { dltMng.SetObjectToDelete(this.gameObject); } }