19 lines
446 B
C#
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;
|
|
}
|
|
}
|
|
}
|