UGUI Dialogue System Issues with Canvas Scaler and Positioning
Posted: Fri Mar 13, 2015 8:02 am
Okay, so I've been trying to update the dialogue system to utilize UGUI, but I'm having a few problems. First of all, despite the fact that I have a Canvas using Screen Space Overlay and which has a Canvas Scaler that is set to Scale with Screen Size, the dialogue system does not have its size updated when it is first instantiated into the game. That is to say, while it will scale with changes to the screen size once you have begun playing, it will always start at the same size no matter your resolution. It is always 300 pixels across when you first start, regardless if you are playing it 960x540 or 1920x1080.
This issue is compounded by issues I am also having with positioning. When the Dialogue UI is instantiated, it receives a bizarre transform that shifts it from the bottom of the screen, to several hundred pixels to the left and below the game window. I have been able to replicate the transform issue by dragging the prefab into the scene, and then parenting it to the Dialogue System Canvas afterwards. If I bring the the Dialogue UI into the scene by dragging it onto the Dialogue UI Canvas (thus parenting it immediately) this issue is negated and the UI is in the proper position.
If anyone has some ideas for where to start on these issues, please let me know, especially if these were known issues that have been fixed, it would probably allow me to convince everyone to update to the latest version of this plugin. I originally thought these might be issues on Unity's end, perhaps it wouldn't scale it because it wasn't in the scene, but in another part of this game I repeatedly instantiate Dialogue Panels with buttons, text and input fields and have never had these sorts of issues with them. Currently I'm looking through the Source Code trying to write a script to fix all of these issues after the fact, but a solution to the issue altogether is obviously preferred.
This issue is compounded by issues I am also having with positioning. When the Dialogue UI is instantiated, it receives a bizarre transform that shifts it from the bottom of the screen, to several hundred pixels to the left and below the game window. I have been able to replicate the transform issue by dragging the prefab into the scene, and then parenting it to the Dialogue System Canvas afterwards. If I bring the the Dialogue UI into the scene by dragging it onto the Dialogue UI Canvas (thus parenting it immediately) this issue is negated and the UI is in the proper position.
If anyone has some ideas for where to start on these issues, please let me know, especially if these were known issues that have been fixed, it would probably allow me to convince everyone to update to the latest version of this plugin. I originally thought these might be issues on Unity's end, perhaps it wouldn't scale it because it wasn't in the scene, but in another part of this game I repeatedly instantiate Dialogue Panels with buttons, text and input fields and have never had these sorts of issues with them. Currently I'm looking through the Source Code trying to write a script to fix all of these issues after the fact, but a solution to the issue altogether is obviously preferred.