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

Disable.cs

Uploaded by

shlokpatel3469
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Disable.cs

Uploaded by

shlokpatel3469
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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