using System.Collections; using System.Collections.Generic; using UnityEngine; public class DoorBlocking : MonoBehaviour { // Start is called before the first frame update void Start() { if (InventoryUIManager.Instance.FindItemInWarehouseByName("ScrollOfDarkness").Count > 0) { if (gameObject.GetComponent()) gameObject.GetComponent().isEnabled = false; if (gameObject.GetComponent()) gameObject.GetComponent().isEnabled = false; } } // Update is called once per frame void Update() { } }