I'm making text adventure game.
What I'm going to do is,
If I click the button(Unity.UI button),
the Gameobject that contains Conversation Trigger component(On Enable Setting) will appear.
and Dialogue event will activate.
when I click the button
Gameobject appears well....
but the problem is...
Conversation Trigger component disappears itself!
Well.. I can't understand why the component destroys itself.
Is there any special setting for Unity UI Button?
p.s Thanks for your time.
-----------------------------------------------------------------------------------
To add
I just write the script for the button like this:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SetActiveUI : MonoBehaviour
{
public GameObject GO;
public void OnClick()
{
{
GO.SetActive(true);
}
}
}
and setting for the button.