Files
2025-05-29 22:31:40 +03:00

19 lines
446 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DisappearObject : MonoBehaviour
{
[SerializeField] private GameObject _GameObject;
private bool GameObjectIsFalse;
private void OnTriggerEnter(Collider col)
{
if(col.gameObject.tag == "Player" && !GameObjectIsFalse)
{
_GameObject.SetActive(false);
GameObjectIsFalse = true;
}
}
}