- Home /
how to open dialogue box without buttons?
i want the dialogue box to appear when i open a scene and not have to press a button or any keys on the keyboard is there a way to do this?
Answer by tormentoarmagedoom · Jan 21, 2019 at 04:08 PM
Good day.
As @KISP says you can directly open it at Start Function.
If you want some "delay", to open it after X seconds, (for example 5 seconds) you can use the method "Invoke"
void Start()
{
Invoke ("OpenDialogue", 5);
}
void OpenDialogue()
{
[things]
}
Another way is open it with a collider detection. Create a trigger collider (Called for example "Box1", and when the player (with another collider and a rigidbody) enters that trigger, activate the dialogue
void OnTriggerEnter(Collider other)
{
if (other.name=="Box1")
{
[things]
}
}
Bye!
thank this is very helpful but how does it work with the dialogue manager/
What is dialogue manager? It's not a Unity component...
Never$$anonymous$$d i was doing the wrong thing i got it to work with the invoke and i was having problems because i forgot a line of code and i didnt need a dialogue manager.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Arrays with zero length 1 Answer
Illuminating a 3D object's edges OnMouseOver (script in c#)? 1 Answer
How to make and exit dialogue window for an adroid game? 0 Answers