- Home /
Dialogue System only plays the same words
I've been modifying Brackeys dialogue system tutorial to trigger with raycasts from a mouse click. My only issue is that the dialogue will only play the same dialogue over and over. Every time I instance the script onto another gameobject, it just displays the dialogue from the first ones. I'm using FindObjectofType to find the manager which plays the dialogue. Could I change this to getcomponent somehow?
For example, If I have Cube 1 named Bill and Cube 2 named Joe, Only Bill's dialogue will play, even if I click on Joe.
How can I get my script to only work specifically for the text on the gameobject I'm clicking on? Here's what I have so far:
Comment