I have tried all of these ways, but still failed. I also tried setActive, but I just get errors using that. Please help I really need to understand this as I have multiple things I need to make appear after one another. Also the object I’m adding this script to is a fps controller. Side note the object LT_Birute_v1 is a solid and the object birutedialog is an invisble object, these codes I tried don’t work with either. Sorry I’m really new at this. http://imgur.com/a/lVBTN This link will provide pictures with some clarification.
using UnityEngine;
using System.Collections;
public class appear : MonoBehaviour {
public GameObject myGameObject;
void OnCollisionEnter (Collision col)
{
if(col.gameObject.name == "birutedialog")
{
myGameObject.GetComponent<MeshRenderer>().enabled = true;
myGameObject.GetComponent<Renderer>().enabled = true;
}
if(col.gameObject.name == "LT_Birute_v1")
{
myGameObject.GetComponent<MeshRenderer>().enabled = true;
myGameObject.GetComponent<Renderer>().enabled = true;
}
}
}