InControl with Dialogue Support
Posted: Wed Apr 06, 2016 6:00 pm
Hi There,
First off, really liking this plugin so far. I've been looking at it for a while and using Love/Hate and finally bit. I'm impressed with the support and depth of functionality.
What I'm currently trying to do is integrate InControl (for using controllers) into the Dialogue system and although am having some luck, I was looking for feedback on what the best way to proceed might be.
What I've figured out so far is how to trigger a proximity selector by manually calling the "OnUse" Message in proximity trigger from a script I throw on the game object with it when the button is pressed.
eg.
That seems a bit hacky but it works fine for now. The next thing I've been working on is making the UI Dialogue menu work with the controller. Since InControl will work fine with the new UI system, I could get an NPC conversation Continue button to work by setting it as the First Selected (Button) in the input manager. I know I can set the first focused with
I'm not sure at this point whether I'm going about this the wrong way in manually overriding each feature I need. Should be extending a class or something that can handle everything I need from an input perspective (from InControl) and map it to the Dialog System? If I extend PixelCrushers.DialogueSystem.UnityUIDialogueControls will that work? Or is that just one part of the pie. I've been looking at the examples given and it seems like that is the way to go, I'm not really sure where to start however.
It seems like if I could set the Continue buttons / Player Response options to be focused then it might work out of the box (via the UI system) but I'm not sure if thats the best path forward. Can anyone give me some pointers on the best way to wrap this? It seems like a relatively common problem and since I often use InControl, its a critical problem for me. I'm willing to help build a solution if it means getting a nice extension package or wrapper or whatever to help these packages play nice together.
Basically the critical stuff is just the conversation package but I don't want to start adding calls to FirstSelected to everything if theres an easier way to handle getting the menu focused when it opens ( which then InControl works fine via unity UI ), and I'm not really sure when the best time to trigger those even is (or how to get the correct continue button).
Thanks in advance,
Dylan
First off, really liking this plugin so far. I've been looking at it for a while and using Love/Hate and finally bit. I'm impressed with the support and depth of functionality.
What I'm currently trying to do is integrate InControl (for using controllers) into the Dialogue system and although am having some luck, I was looking for feedback on what the best way to proceed might be.
What I've figured out so far is how to trigger a proximity selector by manually calling the "OnUse" Message in proximity trigger from a script I throw on the game object with it when the button is pressed.
eg.
Code: Select all
dialogProximitySelector.CurrentUsable.gameObject.BroadcastMessage("OnUse", fromTransform, SendMessageOptions.DontRequireReceiver);
Code: Select all
EventSystem.current.SetSelectedGameObject(yourObject);
It seems like if I could set the Continue buttons / Player Response options to be focused then it might work out of the box (via the UI system) but I'm not sure if thats the best path forward. Can anyone give me some pointers on the best way to wrap this? It seems like a relatively common problem and since I often use InControl, its a critical problem for me. I'm willing to help build a solution if it means getting a nice extension package or wrapper or whatever to help these packages play nice together.
Basically the critical stuff is just the conversation package but I don't want to start adding calls to FirstSelected to everything if theres an easier way to handle getting the menu focused when it opens ( which then InControl works fine via unity UI ), and I'm not really sure when the best time to trigger those even is (or how to get the correct continue button).
Thanks in advance,
Dylan