ORK and Two EventSystems

Announcements, support questions, and discussion for the Dialogue System.
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

ORK and Two EventSystems

Post by chud575 »

Howdy,

So when I launch an ORK based scene, I get two event systems. After digging around in the demo scene, I realized the reason you don't have this issue is because you are telling ORK to use the Legacy UI. Also, for the record - the UI I'm using does have the "Add Event System if needed" bool unchecked, and it adds an event system anyways.

When I dug around in the code, I noticed that the Boolean isn't implemented. But that's not as important, because what I think is happening is that DM creates the EventSystem before ORK does.

There are two issues here:
1. I can't tell ORK to buzz off with it's eventsystem unless I recompile the source
2. ORK's event system is using its own input module, so it doesn't coexist with your dialogue panels (your panels don't work without a Standalone Input Module)

What do you think?
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK and Two EventSystems

Post by Tony Li »

chud575 wrote:the UI I'm using does have the "Add Event System if needed" bool unchecked, and it adds an event system anyways.
I fixed that oversight in the upcoming v1.7.0. In the meantime, you can make the same change in your copy of Scripts / Supplemental / UI / Dialogue UI / UnityUIDialogueUI.cs by changing this line in the FindControls() method from:

Code: Select all

UITools.RequireEventSystem();
to:

Code: Select all

if (addEventSystemIfNeeded) UITools.RequireEventSystem();
This should allow the Dialogue System's UI to use ORK's EventSystem and input module. The Dialogue System doesn't require any specific input module (such as Standalone Input Module). Devs use it with the Rewired input module, various VR input modules, etc. I suspect the issue is just that two EventSystems are trying to be created.
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

Re: ORK and Two EventSystems

Post by chud575 »

Yes, that did the trick, thanks Tony,

Moving on - I can't seem to control the DM with the keyboard, how can I troubleshoot this?
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK and Two EventSystems

Post by Tony Li »

Hi,

On your Unity UI Dialogue UI, tick Auto Focus.

Some additional options:
  • Allow Steal Focus: Checks if the player has used the mouse to click away from any navigable UI elements; if so, it refocuses on the last-focused UI element.
  • Dialogue > Response Menu > Explicit Navigation For Template Buttons: If you're using a Button Template, this sets up Explicit navigation instead of Automatic. With Explicit navigation, the player can only use the keyboard/joystick to navigate the response buttons. With Automatic navigation, the player can navigate around all active Unity UI elements, not just the response buttons.
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

Re: ORK and Two EventSystems

Post by chud575 »

Tony Li wrote:
  • Allow Steal Focus: Checks if the player has used the mouse to click away from any navigable UI elements; if so, it refocuses on the last-focused UI element.
  • Dialogue > Response Menu > Explicit Navigation For Template Buttons: If you're using a Button Template, this sets up Explicit navigation instead of Automatic. With Explicit navigation, the player can only use the keyboard/joystick to navigate the response buttons. With Automatic navigation, the player can navigate around all active Unity UI elements, not just the response buttons.
Doesn't seem to be working :-/
Sorry to bug you with this as it seems almost like it's ORK's fault.
I observed the same relatively empty scene (with dialogue and a few objects) in two manners:
1. Created my own event system and didn't enable ORK
2. Enabled ORK and used its event system

both event systems claim that the active selected object is the continue button, but only in option 1 can I press "Enter" or "Submit" (or more specifically - use the keyboard) to interact with DM.

The strange part is keyboard works fine, for example if I load up an ORK menu everything works.
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

Re: ORK and Two EventSystems

Post by chud575 »

small update - apparently the escape key works
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK and Two EventSystems

Post by Tony Li »

The escape key is different. The only part of the Dialogue System core engine that listens for Unity input is the Dialogue Manager's Input Settings > Cancel and Cancel Conversation keys, which default to the escape key. (Although you can override it, such as with this script for Rewired.)

Everything else input-wise isn't specific to the Dialogue System. Unity UI Dialogue UI just uses Unity UI's navigation and input.

When I tested Unity UI with ORK, I didn't enable continue button mode. I only confirmed that response menu navigation worked. Later today I'll test it with Continue Button mode set to Always and then reply back here.

What versions of Unity, ORK, and the Dialogue System are you using?
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

Re: ORK and Two EventSystems

Post by chud575 »

Unity 5.6.0f3
Ork 2.10.1
DM 1.6.9

Thanks for taking a look!

Edit - btw everything works fine except keyboard navigation
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK and Two EventSystems

Post by Tony Li »

Thanks! I'll let you know what I find. I plan to use all the defaults from ORK. If you're doing anything custom with the ORK EventSystem or anything like that, please let me know.
chud575
Posts: 50
Joined: Thu May 11, 2017 10:57 am

Re: ORK and Two EventSystems

Post by chud575 »

Tony Li wrote:Thanks! I'll let you know what I find. I plan to use all the defaults from ORK. If you're doing anything custom with the ORK EventSystem or anything like that, please let me know.
after some more extensive testing (aka starting from scratch) I believe something in my original project went corrupt. Your key commands work just fine with ork and the demo (and continue button set to always)
Post Reply