Override UI from another scene
Posted: Tue Nov 07, 2017 10:17 am
Hello,
The way our project is set is that we have a Master scene that is having all systems and UI related components and Map scenes that contain everything else related to the game (items, terrains, trigger GOs, ...). All my different dialogue UIs are contained under a Dialogue Handler GameObject that is having references for all dialogue UIs I am using.
Now, when I'm hitting a GameObject within, lets say, Map1 scene, I call OnUse() to display the associated dialogue. Howerver, I would like to use Override Dialogue UI to force a specific UI from my Master scene. Obviously, I can't do that using the editor as this is cross scene linking... I was thinking about creating my own custom OverrideDialogueUI class that is deriving from OverrideUIBase, just like you do in sources, but instead of using the public GameObject ui set in the editor (which can't be done), I would fetch it from my Dialogue Handler in the Master scene either upon a OnEnable() or the reference would be sent through an event.
Turns out, it didn't work as I am pretty sure your code is looking for your own implementation of OverrideDialogueUI and not mine. I could do some changes by using the sources version of Dialogue System, but that would be great if there could be a way for me to push the UI I want when using the dll version.
Any idea on what I can do to support my use-case?
The way our project is set is that we have a Master scene that is having all systems and UI related components and Map scenes that contain everything else related to the game (items, terrains, trigger GOs, ...). All my different dialogue UIs are contained under a Dialogue Handler GameObject that is having references for all dialogue UIs I am using.
Now, when I'm hitting a GameObject within, lets say, Map1 scene, I call OnUse() to display the associated dialogue. Howerver, I would like to use Override Dialogue UI to force a specific UI from my Master scene. Obviously, I can't do that using the editor as this is cross scene linking... I was thinking about creating my own custom OverrideDialogueUI class that is deriving from OverrideUIBase, just like you do in sources, but instead of using the public GameObject ui set in the editor (which can't be done), I would fetch it from my Dialogue Handler in the Master scene either upon a OnEnable() or the reference would be sent through an event.
Turns out, it didn't work as I am pretty sure your code is looking for your own implementation of OverrideDialogueUI and not mine. I could do some changes by using the sources version of Dialogue System, but that would be great if there could be a way for me to push the UI I want when using the dll version.
Any idea on what I can do to support my use-case?