Few Questions :)
Few Questions :)
Hi, I have been playing with the demo version for about a week now... and with the sale going on, I'd like to see if i can fix (or figure out) my main problems with the system and buy it if everything work out
1) Whenever I click play, there is a 1-5 frame where i see the UI frame displayed before it turn off... I tried adding a canvas group and changing the alpha value, that seemed to work for about 2 days, but the problem came back eventually.... I also tried manually disabling gameobjects under the canvas but nothing worked... any suggestion to fix this? (EDIT : I might have actually fixed it... I added DialogueSystemController to the top of the Script Execution Order and it seemed to have fixed it)... so i guess you can disregard this one... two remaining
2) In my project, I load the dialogue manager at the start and keep it in my "do not destroy" game object... i then manually call conversations when needed using "DialogueManager.StartConversation(stringVar);" which works perfectly for what i need... However, I'd like to be able to do a "if conversation exist(stringVar)" before to avoir errors... and I was not able to find that function...
3) Finally, I tried using the "set component enabled" to disable components when there is a dialogue occuring... However, most of my interaction (in a point and click game) are made by buttons (dozens of them which varies depending on the scene)... i'd like to turn off actual GameObjects (which are holding all the interactions) when a conversation occurs so that players cannot keep playing while a conversation is occuring...
If i can manage to find solutions to those 3 issues i will 100% get the plugin as it works really well and does everything I need it to!
Thank you very much for your time and have a great day!
1) Whenever I click play, there is a 1-5 frame where i see the UI frame displayed before it turn off... I tried adding a canvas group and changing the alpha value, that seemed to work for about 2 days, but the problem came back eventually.... I also tried manually disabling gameobjects under the canvas but nothing worked... any suggestion to fix this? (EDIT : I might have actually fixed it... I added DialogueSystemController to the top of the Script Execution Order and it seemed to have fixed it)... so i guess you can disregard this one... two remaining
2) In my project, I load the dialogue manager at the start and keep it in my "do not destroy" game object... i then manually call conversations when needed using "DialogueManager.StartConversation(stringVar);" which works perfectly for what i need... However, I'd like to be able to do a "if conversation exist(stringVar)" before to avoir errors... and I was not able to find that function...
3) Finally, I tried using the "set component enabled" to disable components when there is a dialogue occuring... However, most of my interaction (in a point and click game) are made by buttons (dozens of them which varies depending on the scene)... i'd like to turn off actual GameObjects (which are holding all the interactions) when a conversation occurs so that players cannot keep playing while a conversation is occuring...
If i can manage to find solutions to those 3 issues i will 100% get the plugin as it works really well and does everything I need it to!
Thank you very much for your time and have a great day!
Re: Few Questions :)
Hi,
Thanks for checking out the Dialogue System!
1. Your dialogue panel has an Animator component, typically with a CanvasGroupAnimatorController assigned.
2. Your dialogue panel has a Canvas Group whose alpha is set to 1 (i.e., visible).
3. The Unity UI Dialogue UI component's Dialogue > Panel > Animation Transitions fields are non-blank (i.e., they specify trigger parameters).
If that's the case, set the Canvas Group's alpha to 0 to resolve the issue.
Thanks for checking out the Dialogue System!
You shouldn't have to fiddle with Script Execution Order. Does the problem also happen with the example scene "Examples / Unity UI Examples / Generic UI Example Scene"? The problem you described usually happens under these circumstances:HawkX wrote:Hi, I have been playing with the demo version for about a week now... and with the sale going on, I'd like to see if i can fix (or figure out) my main problems with the system and buy it if everything work out
1) Whenever I click play, there is a 1-5 frame where i see the UI frame displayed before it turn off... I tried adding a canvas group and changing the alpha value, that seemed to work for about 2 days, but the problem came back eventually.... I also tried manually disabling gameobjects under the canvas but nothing worked... any suggestion to fix this? (EDIT : I might have actually fixed it... I added DialogueSystemController to the top of the Script Execution Order and it seemed to have fixed it)... so i guess you can disregard this one... two remaining
1. Your dialogue panel has an Animator component, typically with a CanvasGroupAnimatorController assigned.
2. Your dialogue panel has a Canvas Group whose alpha is set to 1 (i.e., visible).
3. The Unity UI Dialogue UI component's Dialogue > Panel > Animation Transitions fields are non-blank (i.e., they specify trigger parameters).
If that's the case, set the Canvas Group's alpha to 0 to resolve the issue.
Use DialogueManager.MasterDatabase.GetConversation():HawkX wrote:2) In my project, I load the dialogue manager at the start and keep it in my "do not destroy" game object... i then manually call conversations when needed using "DialogueManager.StartConversation(stringVar);" which works perfectly for what i need... However, I'd like to be able to do a "if conversation exist(stringVar)" before to avoir errors... and I was not able to find that function...
Code: Select all
if (DialogueManager.MasterDatabase.GetConversation(stringVar) != null) {
DialogueManager.StartConversation(stringVar);
}
Use Set Active On Dialogue Event, which is for GameObjects, or Dialogue System Events, which gives you much finer control since it uses UnityEvents. Or write script methods named OnConversationStart and OnConversationEnd.HawkX wrote:3) Finally, I tried using the "set component enabled" to disable components when there is a dialogue occuring... However, most of my interaction (in a point and click game) are made by buttons (dozens of them which varies depending on the scene)... i'd like to turn off actual GameObjects (which are holding all the interactions) when a conversation occurs so that players cannot keep playing while a conversation is occuring...
If i can manage to find solutions to those 3 issues i will 100% get the plugin as it works really well and does everything I need it to!
Thank you very much for your time and have a great day!
Re: Few Questions :)
wow... you really are amazing
first, you answer SOOO fast, and you have answer to everything!! thats really something!
setting alpha group to 0 fixed the first few frame issue!
and both of your other answer were spot on as well! THANK YOU!
Another super small question... since I added the dialogue manager prefab to my scene, the scene cannot seem to stay "saved"... i often have to save it 5 to 10 times in a row for the little * to go away in the title bar... is there some super easy fix you know about that?
I was also wondering, if i have other followup questions in the future, (which i might eventually) do you prefer i keep this topic and reply here instead of creating a new one?
Again, thank you so much for your time! I will 100% buy your system!
first, you answer SOOO fast, and you have answer to everything!! thats really something!
setting alpha group to 0 fixed the first few frame issue!
and both of your other answer were spot on as well! THANK YOU!
Another super small question... since I added the dialogue manager prefab to my scene, the scene cannot seem to stay "saved"... i often have to save it 5 to 10 times in a row for the little * to go away in the title bar... is there some super easy fix you know about that?
I was also wondering, if i have other followup questions in the future, (which i might eventually) do you prefer i keep this topic and reply here instead of creating a new one?
Again, thank you so much for your time! I will 100% buy your system!
Re: Few Questions :)
Hi,
Glad I could help!HawkX wrote:wow... you really are amazing
first, you answer SOOO fast, and you have answer to everything!! thats really something!
setting alpha group to 0 fixed the first few frame issue!
and both of your other answer were spot on as well! THANK YOU!
This is a Unity bug with Unity UI canvases in some versions of Unity. Sorry about the nuisance; the same thing happens to me, too, even in projects that don't use the Dialogue System.HawkX wrote:Another super small question... since I added the dialogue manager prefab to my scene, the scene cannot seem to stay "saved"... i often have to save it 5 to 10 times in a row for the little * to go away in the title bar... is there some super easy fix you know about that?
A new topic makes it easier for other readers to find answers to their similar questions, but feel free to do whatever's most convenient.HawkX wrote:I was also wondering, if i have other followup questions in the future, (which i might eventually) do you prefer i keep this topic and reply here instead of creating a new one?
Thanks!HawkX wrote:Again, thank you so much for your time! I will 100% buy your system!
Re: Few Questions :)
Sorry for bothering you again lol...
After setting Canvas Group Alpha to 0, the first few frame glitch was gone... However, I cannot see the panels at all anymore!
In the prefab, there is a "NOTE" saying "to see the panel, set group alpha to 1"... hehe...
When setting it back to 1, the bug is back and the canvas are visible again... any other suggestion?
Also, I added the "Set Active on Dialogue Event" component in one of my scene... selected the database, put trigger "on conversations" since that is what i use (also tried both others to be sure)... but that still doesnt seem to accept Gameobject... i dragged in my 2 empty gameobjects which holds all the stuff i want to make invisible during conversation (both on start to false, both on end back to true), but the icons in the 2 element slots is the one for the Rect Transform and not for the gameobject icon... and i dont think you can set rect transform to not active (false)...
http://i.imgur.com/FXHfMIr.png
After setting Canvas Group Alpha to 0, the first few frame glitch was gone... However, I cannot see the panels at all anymore!
In the prefab, there is a "NOTE" saying "to see the panel, set group alpha to 1"... hehe...
When setting it back to 1, the bug is back and the canvas are visible again... any other suggestion?
Also, I added the "Set Active on Dialogue Event" component in one of my scene... selected the database, put trigger "on conversations" since that is what i use (also tried both others to be sure)... but that still doesnt seem to accept Gameobject... i dragged in my 2 empty gameobjects which holds all the stuff i want to make invisible during conversation (both on start to false, both on end back to true), but the icons in the 2 element slots is the one for the Rect Transform and not for the gameobject icon... and i dont think you can set rect transform to not active (false)...
http://i.imgur.com/FXHfMIr.png
Re: Few Questions :)
Hi,
If you want to continue with animation (e.g., fade in/out), here's what goes on under the hood:
1. When the scene starts, the Dialogue Panel's Animator enters its default state. If this state is set to Hide, it will play the Hide state. For example, if the Animator is using the built-in CanvasGroupAnimatorController, it will set the Canvas Group's alpha to 1 (visible) and gradually bring alpha down to 0 (invisible). You may want to set the default state to a state that immediately sets the panel invisible (e.g., the Hidden animation clip in the same folder as the CanvasGroupAnimatorController).
2. When a conversation starts, the dialogue UI sets the animator trigger parameter specified in the Animation Transitions section. The name of this trigger parameter defaults to "Show".
3. When a conversation ends, the dialogue UI sets the Hide animator trigger parameter (whose name defaults to "Hide"). It then waits until the animation state is done. When the animation state is done, it deactivates the Dialogue Panel GameObject.
If that info doesn't help, please feel free to send an example scene to tony (at) pixelcrushers.com. I'll be happy to take a look.
For a really quick fix, inspect the Dialogue Panel and remove the Animator and Canvas Group components. Then deactivate the Dialogue Panel GameObject. The Dialogue System will immediately hide/show the panel as needed, instead of animating it.HawkX wrote:After setting Canvas Group Alpha to 0, the first few frame glitch was gone... However, I cannot see the panels at all anymore!
In the prefab, there is a "NOTE" saying "to see the panel, set group alpha to 1"... hehe...
When setting it back to 1, the bug is back and the canvas are visible again... any other suggestion?
If you want to continue with animation (e.g., fade in/out), here's what goes on under the hood:
1. When the scene starts, the Dialogue Panel's Animator enters its default state. If this state is set to Hide, it will play the Hide state. For example, if the Animator is using the built-in CanvasGroupAnimatorController, it will set the Canvas Group's alpha to 1 (visible) and gradually bring alpha down to 0 (invisible). You may want to set the default state to a state that immediately sets the panel invisible (e.g., the Hidden animation clip in the same folder as the CanvasGroupAnimatorController).
2. When a conversation starts, the dialogue UI sets the animator trigger parameter specified in the Animation Transitions section. The name of this trigger parameter defaults to "Show".
3. When a conversation ends, the dialogue UI sets the Hide animator trigger parameter (whose name defaults to "Hide"). It then waits until the animation state is done. When the animation state is done, it deactivates the Dialogue Panel GameObject.
If that info doesn't help, please feel free to send an example scene to tony (at) pixelcrushers.com. I'll be happy to take a look.
"Set Active On Dialogue Event" accepts Transforms. RectTransform is a subclass of Transform, so it should be accepted. Can you drag the GameObjects from the Hierarchy view into the Target slots?HawkX wrote:Also, I added the "Set Active on Dialogue Event" component in one of my scene... selected the database, put trigger "on conversations" since that is what i use (also tried both others to be sure)... but that still doesnt seem to accept Gameobject... i dragged in my 2 empty gameobjects which holds all the stuff i want to make invisible during conversation (both on start to false, both on end back to true), but the icons in the 2 element slots is the one for the Rect Transform and not for the gameobject icon... and i dont think you can set rect transform to not active (false)...
Re: Few Questions :)
Thank you once more for such a great answer!
For the Alpha, I understood everything... will most likely take me a day or two to tweak it up but i should manage
For the 2nd part (setting game objects to off),
Yes I am able to drag the gameobject from the hierarchy to the Set active on Dialogue Event... however (as shown in the imgur screenshot) its the transform that is dragged and not the gameobject itself (at least when I use public GameObject something) and then drag a game object on a script, the icon is the one of the gameobject itself and not of the transform... as far as i know, you cannot "toggle off" a transform (setactive(false) or enabled = false)... and as expected, having both of them to false does nothing when playing the game itself.
Edit : I tried going the manual route and creating my own script (method) myself... with the following lines included :
when dragging the gameobjects to the public slots of that script, the icon was the right one, but that still did not work either... as i kept reading, i noticed you have a (Transform Actor) that you pass at the same time... however, i dont use an actor, the player is "invisible" and has no physical gameobject... (first person point and click) the dialogues are monologues actually
For the Alpha, I understood everything... will most likely take me a day or two to tweak it up but i should manage
For the 2nd part (setting game objects to off),
Yes I am able to drag the gameobject from the hierarchy to the Set active on Dialogue Event... however (as shown in the imgur screenshot) its the transform that is dragged and not the gameobject itself (at least when I use public GameObject something) and then drag a game object on a script, the icon is the one of the gameobject itself and not of the transform... as far as i know, you cannot "toggle off" a transform (setactive(false) or enabled = false)... and as expected, having both of them to false does nothing when playing the game itself.
Edit : I tried going the manual route and creating my own script (method) myself... with the following lines included :
Code: Select all
public GameObject go1;
public GameObject go2;
void OnConversationStart ()
{
go1.SetActive(false);
go2.SetActive(false);
}
void OnConversationEnd ()
{
go1.SetActive(true);
go2.SetActive(true);
}
Re: Few Questions :)
Although you assign a Transform/RectTransform to the slot, Set Active On Dialogue Event actually controls the transform's GameObject, not the transform itself. Sorry, there was a logic to it at one point in the Dialogue System's early life, but now it's just a little confusing.HawkX wrote:For the 2nd part (setting game objects to off),
Yes I am able to drag the gameobject from the hierarchy to the Set active on Dialogue Event... however (as shown in the imgur screenshot) its the transform that is dragged and not the gameobject itself (at least when I use public GameObject something) and then drag a game object on a script, the icon is the one of the gameobject itself and not of the transform... as far as i know, you cannot "toggle off" a transform (setactive(false) or enabled = false)... and as expected, having both of them to false does nothing when playing the game itself.
Re: Few Questions :)
The script messages OnConversationStart and OnConversationEnd both require a Transform parameter, and they're only invoked on the Dialogue Manager GameObject and the GameObjects specified as the conversation's primary participants. If you put the script (or Set Active On Dialogue Event) on the Dialogue Manager, I think it should work.HawkX wrote:Edit : I tried going the manual route and creating my own script (method) myself... with the following lines included :when dragging the gameobjects to the public slots of that script, the icon was the right one, but that still did not work either... as i kept reading, i noticed you have a (Transform Actor) that you pass at the same time... however, i dont use an actor, the player is "invisible" and has no physical gameobject... (first person point and click) the dialogues are monologues actuallyCode: Select all
public GameObject go1; public GameObject go2; void OnConversationStart () { go1.SetActive(false); go2.SetActive(false); } void OnConversationEnd () { go1.SetActive(true); go2.SetActive(true); }
Re: Few Questions :)
I actually though about doing that! hehe... however the Dialogue manager is on my 1st scene that gets loaded along with my other dont destroy on load... then i click new game/continue, which loads my 2nd scene (world map)... and if you go into an actual level (game scene), that is where the 2 game objects i want to setactive(false) are...