Retrieve name of GameObject in Dialogue
Posted: Thu Jan 07, 2021 11:22 pm
First off, thank you for building such an amazing system - your documentation is really thorough, and I have been loving how powerful this is as I continue using it and learning.
In my game, there are "road signs" (i.e. starting a conversation with it will have it read "Route 2" or "Kentucky", and so on). Basically, a non-living readable object. Instead of creating an actor for each of these road signs, I was hoping to reuse one conversation and simply have the dialogue text display the name of the actor game object so that I can use the exact same road sign prefab while only changing the gameobject's name. Is this something that is possible? I've tried a number of solutions, and when debugging with the Info setting on, it did print the following:
This is what I was hoping to see, but when I call the conversant variable in the Dialogue Text field, it returns an empty string (I assume because the Conversant dropdown is empty, but I thought I read that it then defaults to the gameobject name which was printed in the log above). Below is my super basic configuration:
If you need any additional information, just let me know. Thanks for your time!
In my game, there are "road signs" (i.e. starting a conversation with it will have it read "Route 2" or "Kentucky", and so on). Basically, a non-living readable object. Instead of creating an actor for each of these road signs, I was hoping to reuse one conversation and simply have the dialogue text display the name of the actor game object so that I can use the exact same road sign prefab while only changing the gameobject's name. Is this something that is possible? I've tried a number of solutions, and when debugging with the Info setting on, it did print the following:
Code: Select all
Dialogue System: Starting conversation 'Road Sign', actor=Route 2(UnityEngine.Transform), conversant=Player (UnityEngine.Transform).UnityEngine.Debug:Log(Object, Object)
If you need any additional information, just let me know. Thanks for your time!