So I made this script when the player enters the trigger a gameobject gets deleted and text is supposed to change in inspector but it doesnt. its a string text
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class House : ScareTactics
{
public GameObject Relic;
private void OnTriggerEnter(Collider col)
{
if(col.tag == "Player")
{
ShakeCamera(1, 3);
Relic.SetActive(false);
string name = col.gameObject.GetComponent<TypeWritterEffect>().fullText = "hello";
}
}
private void OnTriggerStay()
{
}
private void OnTriggerExit()
{
}
}