0% found this document useful (0 votes)
17 views

Disable.cs

Uploaded by

shlokpatel3469
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Disable.cs

Uploaded by

shlokpatel3469
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

using System.

Collections;
using System.Collections.Generic;
using UnityEngine;

public class Disable : MonoBehaviour


{
[Header("Set this as the object you want to Disable.")]
public GameObject objectToDisable;

private void OnTriggerEnter(Collider other)


{
if (other.tag == "HandTag")
{
objectToDisable.SetActive(false);
}
}
}

You might also like