So I have the following code:
public class Appear : MonoBehaviour
{
public GameObject objectOne;
public GameObject objectTwo;
void Update()
{
if (objectOne.SetActive(false))
{
objectTwo.SetActive(true);
}
}
}
It doesn’t work and I don’t know why. All I want to do is activate ‘objectTwo’ when ‘objectOne’ is deactivated. So basically in the game, if an object gets de activated or destroyed, then object two will appear.