Newbie Question/Problem - Input System maybe?
Newbie Question/Problem - Input System maybe?
Good Morning (or whatever descriptor for your timezone) I am new to The Dialogue System and I have run into a problem. Following the Quick Start video I created a small conversation in a separate testing project and it all worked just fine. However, after replicating this in my main poc project I cannot get the conversation to advance after start. I can get it to trigger and show up, but when I click either of my 2 dialog options for the player, it doesn't advance further. I HIGHLY suspect this is because of an input system conflict with the input system controller I am using for my player controller, but I am stuck at a) proving that to be the problem and b) how to merge and resolve conflicts with other input controllers if that IS in fact the problem. Any suggestions or advice would be very much appreciated.
Re: Newbie Question/Problem - Input System maybe?
Was able to confirm its an Input System conflict by the simple expedience of turning off all the controller scripts on my player object. Conversations immediately started responding to clicks in the dialogue options again.
So I know it's an input system conflict but I've tried turning USE_NEW_INPUT both on and off using the Welcome Screen, and neither option is helping with the problem. The result is the same (click events not getting registered by Dialogue System)I have also verified that my Players 'Active Input Handling' for the project is set to 'Both'
I figure I am probably missing something pretty obvious here but I can't for the life of me figure out what it is.
So I know it's an input system conflict but I've tried turning USE_NEW_INPUT both on and off using the Welcome Screen, and neither option is helping with the problem. The result is the same (click events not getting registered by Dialogue System)I have also verified that my Players 'Active Input Handling' for the project is set to 'Both'
I figure I am probably missing something pretty obvious here but I can't for the life of me figure out what it is.
Re: Newbie Question/Problem - Input System maybe?
Hi,
Thanks for using the Dialogue System!
Check your EventSystem GameObject. Make sure it's using an InputSystemUIInputModule component.
Keep the Dialogue System Welcome Window's USE_NEW_INPUT checkbox ticked. If you plan to use a Selector or Proximity Selector component or a UI Button Key Trigger component, please also see page 5 of the Input_Device_Manager_Manual.pdf included in the project or the Input System video. (You can do that later, after resolving this issue with response buttons.)
In your main project, try playing DemoScene1. Can you click on responses? If so, then check your own dialogue UI. It's easiest if nothing is assigned to your response buttons' (or response button templates') OnClick() events. In this case, the Dialogue System will automatically assign StandardUIResponseButton.OnClick to it. If you have assigned something to OnClick(), you'll need to also assign StandardUIResponseButton.OnClick.
While playing, keep an inspector view on your EventSystem GameObject. The bottom of the inspector will show what button is currently selected (focused). When you click on a response button, it should show that the response button is selected.
If the button isn't selected and nothing obvious shows up there, such as some other (maybe transparent) UI element being selected, then check that the dialogue UI's Canvas has a Graphic Raycaster.
Thanks for using the Dialogue System!
Check your EventSystem GameObject. Make sure it's using an InputSystemUIInputModule component.
Keep the Dialogue System Welcome Window's USE_NEW_INPUT checkbox ticked. If you plan to use a Selector or Proximity Selector component or a UI Button Key Trigger component, please also see page 5 of the Input_Device_Manager_Manual.pdf included in the project or the Input System video. (You can do that later, after resolving this issue with response buttons.)
In your main project, try playing DemoScene1. Can you click on responses? If so, then check your own dialogue UI. It's easiest if nothing is assigned to your response buttons' (or response button templates') OnClick() events. In this case, the Dialogue System will automatically assign StandardUIResponseButton.OnClick to it. If you have assigned something to OnClick(), you'll need to also assign StandardUIResponseButton.OnClick.
While playing, keep an inspector view on your EventSystem GameObject. The bottom of the inspector will show what button is currently selected (focused). When you click on a response button, it should show that the response button is selected.
If the button isn't selected and nothing obvious shows up there, such as some other (maybe transparent) UI element being selected, then check that the dialogue UI's Canvas has a Graphic Raycaster.
Re: Newbie Question/Problem - Input System maybe?
Hey thanks for the response! I went through and checked the things you mentioned.
The DemoScene1 played just fine and I was able to click the responses. For the UI I am using the included basic UI and haven't modified it or changed any of the OnClick events.
I am not yet using a Selector or anything else. I actually stripped the whole thing down to the barebones and fire off the conversation OnStart.
The EventSystem does have the 'Input System UI Input Module' component and is showing the proper response as being selected when I hover over it, it just doesn't do anything on click. BUT, I discovered that it does respond to the Enter key (arrow keys are also working to change the selection) so it seems to just be the mouse click that is getting swallowed.
The DemoScene1 played just fine and I was able to click the responses. For the UI I am using the included basic UI and haven't modified it or changed any of the OnClick events.
I am not yet using a Selector or anything else. I actually stripped the whole thing down to the barebones and fire off the conversation OnStart.
The EventSystem does have the 'Input System UI Input Module' component and is showing the proper response as being selected when I hover over it, it just doesn't do anything on click. BUT, I discovered that it does respond to the Enter key (arrow keys are also working to change the selection) so it seems to just be the mouse click that is getting swallowed.
Re: Newbie Question/Problem - Input System maybe?
Hey, I think i've got it figured out now.
After narrowing it down to just the mouse click getting swallowed I redid my forum search and ran into this old thread: https://www.pixelcrushers.com/phpbb/vie ... hp?p=44798
While that thread is for the standard/tutorial asset controllers, it was also perfect advice for the controller I am using (which for posterities sake is John Stair's RPG Cameras & Controllers). I added a Dialogue System Events component to my Player and in the OnConversationStart and OnConversationEnd events I disabled, then reenabled respectively the PlayerInput component. This seems to have done the work to fix it.
Thank you for your help!
After narrowing it down to just the mouse click getting swallowed I redid my forum search and ran into this old thread: https://www.pixelcrushers.com/phpbb/vie ... hp?p=44798
While that thread is for the standard/tutorial asset controllers, it was also perfect advice for the controller I am using (which for posterities sake is John Stair's RPG Cameras & Controllers). I added a Dialogue System Events component to my Player and in the OnConversationStart and OnConversationEnd events I disabled, then reenabled respectively the PlayerInput component. This seems to have done the work to fix it.
Thank you for your help!
Re: Newbie Question/Problem - Input System maybe?
Hi,
Thanks for sharing the solution to your issue. It'll help others in the future.
Thanks for sharing the solution to your issue. It'll help others in the future.
Re: Newbie Question/Problem - Input System maybe?
Hey there, Arakiel!
Could you please help with this point that you wrote?
".....in the OnConversationStart and OnConversationEnd events I disabled, then reenabled respectively the PlayerInput component." Could you please send screenshot of settings or something of these fields? Can't understand what exactly response by PlayerInput in my case. Tried to disable almost everything that affects on Input but no result. This will help me a lot
Could you please help with this point that you wrote?
".....in the OnConversationStart and OnConversationEnd events I disabled, then reenabled respectively the PlayerInput component." Could you please send screenshot of settings or something of these fields? Can't understand what exactly response by PlayerInput in my case. Tried to disable almost everything that affects on Input but no result. This will help me a lot
Re: Newbie Question/Problem - Input System maybe?
I'm assuming Arakiel added a Dialogue System Events component to the player GameObject, then configured the OnConversationStart() event to disable PlayerInput and OnConversationEnd() to re-enable it, like:
The Interaction tutorial video has more details on Dialogue System Events at 07:00.
Also make sure the conversation uses the player GameObject as the actor or conversant. (See Character GameObject Assignments)
The Interaction tutorial video has more details on Dialogue System Events at 07:00.
Also make sure the conversation uses the player GameObject as the actor or conversant. (See Character GameObject Assignments)