SetObjectToDelete.cs 508 B

12345678910111213141516171819202122232425
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class SetObjectToDelete : MonoBehaviour
  5. {
  6. private DeleteManager dltMng;
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. dltMng = GameObject.Find("DeletionManager").GetComponent<DeleteManager>();
  11. }
  12. // Update is called once per frame
  13. void Update()
  14. {
  15. }
  16. public void SetObjToDelete()
  17. {
  18. dltMng.SetObjectToDelete(this.gameObject);
  19. }
  20. }