Hi,
I've recently started implementing a boss character into my project, and for some reason Dialogue System isn't automatically adding in an EventSystem on the room loading?
I get a notification mentioning that it didn't detect an EventSystem object and was adding one in, but for some reason two of my newer scenes don't have this functionality on. I only realised it when I added some dialogue choices in but found I couldn't select anything.
Is there something I have to do or a prerequisite to have the system fill it in?
Thanks
EventSystems not autoadding
Re: EventSystems not autoadding
Hi,
The diaogue UI and quest log window will both check for an EventSystem and add one if it's missing -- but only if the "Add EventSystem If Missing" checkbox is ticked. Make sure this checkbox is ticked on at least one of these UIs.
The diaogue UI and quest log window will both check for an EventSystem and add one if it's missing -- but only if the "Add EventSystem If Missing" checkbox is ticked. Make sure this checkbox is ticked on at least one of these UIs.
-
- Posts: 111
- Joined: Mon Apr 08, 2019 8:01 am
Re: EventSystems not autoadding
Hey Tony,
It seems like it's already been ticked on the dialogue UI, but it still doesn't add an EventSystem on loading certain levels. Could something be blocking or spoofing the check somehow? Either way it's not a huge issue because I can just add an EventSystem in the editor, but it would be nice to find out why.
It seems like it's already been ticked on the dialogue UI, but it still doesn't add an EventSystem on loading certain levels. Could something be blocking or spoofing the check somehow? Either way it's not a huge issue because I can just add an EventSystem in the editor, but it would be nice to find out why.
Re: EventSystems not autoadding
Are there any errors or warnings in the Console?
At runtime, is the EventSystem GameObject added to the scene, but it just doesn't accept input?
If it's not there at all, is it possible that something else is deleting it?
At runtime, is the EventSystem GameObject added to the scene, but it just doesn't accept input?
If it's not there at all, is it possible that something else is deleting it?
-
- Posts: 111
- Joined: Mon Apr 08, 2019 8:01 am
Re: EventSystems not autoadding
Normally it will say something in the console when it adds an EventSystem GameObject, but for some reason it doesn't do so in some scenes. The gameObject does not show up at all on the objects list.
Re: EventSystems not autoadding
That suggests one of two things is happening:Mackerel_Sky wrote: ↑Sun Mar 15, 2020 6:58 am Normally it will say something in the console when it adds an EventSystem GameObject, but for some reason it doesn't do so in some scenes. The gameObject does not show up at all on the objects list.
1. It isn't doing the check, or
2. It checks and finds an EventSystem. But something later then destroys the EventSystem.
You can get a little more info by editing Assets / Plugins / Pixel Crushers / Dialogue System / Scripts / UI / Utility / UITools.cs.
The RequireEventSystem() method starts on line 19. Add the 2 lines indicated below:
Code: Select all
public static void RequireEventSystem()
{
Debug.Log("Dialogue System is checking for an EventSystem in the scene."); //<--ADD THIS.
var eventSystem = GameObject.FindObjectOfType<UnityEngine.EventSystems.EventSystem>();
if (eventSystem != null) Debug.Log("Dialogue System found an EventSystem in the scene."); //<--ADD THIS.
if (eventSystem == null)
{
...
-
- Posts: 111
- Joined: Mon Apr 08, 2019 8:01 am
Re: EventSystems not autoadding
For some reason it started working again when I opened my project today :Y.
Not sure why this is the case, but I'll keep an eye on things in case it comes back.
Not sure why this is the case, but I'll keep an eye on things in case it comes back.
Re: EventSystems not autoadding
Sounds good. Glad it's working now at least.