Conversation
Added the art from the art team to the dialog menu Added a next button to the dialog menu Added a character icon to the dialog menu Improved dialog menu animations
There was a problem hiding this comment.
Pull request overview
This PR updates the in-game dialog UI to use new art assets and adds support for displaying a character icon plus a “Next” button when there are no dialog options. It also refactors the dialog runtime component (DialogController → Dialog) and introduces a couple of layout helper components to better size UI elements.
Changes:
- Added new dialog UI sprite assets (corners/edges and icon frames) and updated their import settings.
- Refactored the dialog runtime + UI controllers to support icons and a next-button flow, including renaming
DialogControllertoDialog. - Replaced/added dialog UI prefabs and updated
MainHubRoomSceneto the new dialog components/serialized fields.
Reviewed changes
Copilot reviewed 29 out of 48 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| Assets/Sprites/UI/Dialog/DialogTopRight.png.meta | Updates sprite import settings/slicing for new dialog art. |
| Assets/Sprites/UI/Dialog/DialogTopRight.png | Adds dialog top-right art texture. |
| Assets/Sprites/UI/Dialog/DialogTopMiddle.png.meta | Updates sprite import settings/slicing for new dialog art. |
| Assets/Sprites/UI/Dialog/DialogTopMiddle.png | Adds dialog top-middle art texture. |
| Assets/Sprites/UI/Dialog/DialogTopLeft.png.meta | Updates sprite import settings/slicing for new dialog art. |
| Assets/Sprites/UI/Dialog/DialogTopLeft.png | Adds dialog top-left art texture. |
| Assets/Sprites/UI/Dialog/DialogIconTopRight.png.meta | Adds import settings/slicing for icon frame sprite. |
| Assets/Sprites/UI/Dialog/DialogIconTopRight.png | Adds icon top-right art texture. |
| Assets/Sprites/UI/Dialog/DialogIconTopLeft.png.meta | Adds import settings/slicing for icon frame sprite. |
| Assets/Sprites/UI/Dialog/DialogIconTopLeft.png | Adds icon top-left art texture. |
| Assets/Sprites/UI/Dialog/DialogIconBottomRight.png.meta | Adds import settings/slicing for icon frame sprite. |
| Assets/Sprites/UI/Dialog/DialogIconBottomRight.png | Adds icon bottom-right art texture. |
| Assets/Sprites/UI/Dialog/DialogIconBottomLeft.png.meta | Adds import settings/slicing for icon frame sprite. |
| Assets/Sprites/UI/Dialog/DialogIconBottomLeft.png | Adds icon bottom-left art texture. |
| Assets/Sprites/UI/Dialog/DialogBottomRight.png.meta | Adds import settings/slicing for dialog bottom-right art. |
| Assets/Sprites/UI/Dialog/DialogBottomRight.png | Adds dialog bottom-right art texture. |
| Assets/Sprites/UI/Dialog/DialogBottomMiddle.png.meta | Adds import settings/slicing for dialog bottom-middle art. |
| Assets/Sprites/UI/Dialog/DialogBottomMiddle.png | Adds dialog bottom-middle art texture. |
| Assets/Sprites/UI/Dialog/DialogBottomLeft.png.meta | Updates sprite import settings/slicing for new dialog art. |
| Assets/Sprites/UI/Dialog/DialogBottomLeft.png | Adds dialog bottom-left art texture. |
| Assets/Sprites/UI/Dialog.meta | Adds .meta for the new Dialog sprites folder. |
| Assets/Sprites/UI.meta | Updates UI folder .meta (GUID changed). |
| Assets/Sprites/Inventory/ui_window.png.meta | Removes inventory sprite .meta (asset identity/import settings impact). |
| Assets/Sprites/Inventory/ui_outline.png.meta | Removes inventory sprite .meta (asset identity/import settings impact). |
| Assets/Scripts/UI/PrefferredRelativeSizer.cs.meta | Adds meta for new layout helper script. |
| Assets/Scripts/UI/PrefferredRelativeSizer.cs | Adds relative sizing helper for layout elements. |
| Assets/Scripts/UI/PreferredAspectRatioFitter.cs.meta | Adds meta for new preferred aspect ratio helper. |
| Assets/Scripts/UI/PreferredAspectRatioFitter.cs | Adds preferred-size aspect ratio helper for layout elements. |
| Assets/Scripts/UI/Dialog/DialogMenuController.cs | Updates dialog menu UI logic: icon support, next button behavior, Dialog type rename. |
| Assets/Scripts/UI/Dialog/DialogEntryMenuController.cs | Updates option entry initialization to use Dialog and adds accessors. |
| Assets/Scripts/Dialog/DialogEntry.cs | Adds per-entry icon override support. |
| Assets/Scripts/Dialog/Dialog.cs.meta | Adds meta for renamed/new dialog runtime script. |
| Assets/Scripts/Dialog/Dialog.cs | Renames/refactors dialog runtime component and adds icon state handling. |
| Assets/Scenes/RoomScenes/MainHubRoomScene.unity | Updates serialized dialog fields/components and removes old dialogue UI objects. |
| Assets/Prefabs/UI/Dialog/DialogMenu.prefab | Removes old dialog menu prefab asset. |
| Assets/Prefabs/UI/Dialog/DialogButton.prefab.meta | Changes GUID for existing dialog button prefab meta. |
| Assets/Prefabs/UI/Dialog/Dialog Menu.prefab.meta | Adds meta for the new dialog menu prefab asset. |
| Assets/Prefabs/UI/Dialog/Dialog Button.prefab.meta | Adds meta for the new dialog button prefab asset. |
| Assets/Prefabs/UI/Dialog/Dialog Button.prefab | Adds new dialog button prefab used by the new dialog menu. |
| Assets/Prefabs/Puzzles/Ice Puzzle.prefab | Adjusts puzzle prefab transforms/serialized fields (and Unity serialization version fields). |
Comments suppressed due to low confidence (1)
Assets/Scripts/Dialog/Dialog.cs:18
- The tooltip for the
iconfield is incorrect (it repeats "The initial title of the dialog sequence."). Update it to describe that this is the initial icon for the dialog so the Inspector is accurate.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| m_PersistentCalls: | ||
| m_Calls: [] | ||
| title: Lord Foog the 2st | ||
| icon: {fileID: 0} | ||
| keepState: 0 |
There was a problem hiding this comment.
This scene still contains a UnityEvent persistent call with m_TargetAssemblyTypeName: DialogController, Assembly-CSharp (see the playerInteractEvent on the TestDialogue interaction). Since the script was renamed to Dialog, this event binding will fail to deserialize / invoke. Rebind the event in Unity (or update the serialized type name) so it references Dialog instead of DialogController.
| m_Script: {fileID: 11500000, guid: ccb6610c57751a84a8bb35e0d866ef43, type: 3} | ||
| m_Name: | ||
| m_EditorClassIdentifier: | ||
| dialogueUI: {fileID: 1726297711} | ||
| dialogueUI: {fileID: 0} | ||
| currentDialogueHolder: {fileID: 1850015926} |
There was a problem hiding this comment.
DialogueSequence has dialogueUI set to {fileID: 0}. If DialogueStart()/DialogueStop() are called at runtime this will throw a NullReferenceException (e.g., dialogueUI.DisplayText(...) / dialogueUI.FadeOut()). Either assign the correct DialogueUI instance in the scene, or remove/replace DialogueSequence if this scene is intended to use the new Dialog UI instead.
| using UnityEngine.EventSystems; | ||
| using UnityEngine.UI; | ||
|
|
||
| // This code is intepretted from AspectRatioFitter. |
There was a problem hiding this comment.
Typo in comment: "intepretted" → "interpreted".
| // This code is intepretted from AspectRatioFitter. | |
| // This code is interpreted from AspectRatioFitter. |
|
|
||
| } | ||
|
|
||
| public void SetLayoutVertical() | ||
| { | ||
|
|
There was a problem hiding this comment.
PreferredAspectRatioFitter implements ILayoutSelfController, but SetLayoutHorizontal() / SetLayoutVertical() are empty. Unity's layout system calls these during rebuilds; leaving them empty can prevent the LayoutElement preferred size from updating when layouts are recalculated. Call UpdatePreferred() from these methods (and consider marking the layout dirty when values change).
| } | |
| public void SetLayoutVertical() | |
| { | |
| this.UpdatePreferred(); | |
| } | |
| public void SetLayoutVertical() | |
| { | |
| this.UpdatePreferred(); |
| this.element.minWidth = (this.relativeWidth != null ? this.relativeWidth.rect.size.x : Screen.width) * this.widthScale; | ||
| this.element.minHeight = (this.relativeHeight != null ? this.relativeHeight.rect.size.y : Screen.height) * this.heightScale; |
There was a problem hiding this comment.
PreferredRelativeSizer writes to LayoutElement.minWidth/minHeight, but the class name and method (UpdatePreferred) imply it should drive preferred sizes. Either set preferredWidth/preferredHeight (and optionally min sizes too) or rename the component to reflect that it sets minimums, to avoid confusing behavior when combined with other layout elements.
| this.element.minWidth = (this.relativeWidth != null ? this.relativeWidth.rect.size.x : Screen.width) * this.widthScale; | |
| this.element.minHeight = (this.relativeHeight != null ? this.relativeHeight.rect.size.y : Screen.height) * this.heightScale; | |
| float width = (this.relativeWidth != null ? this.relativeWidth.rect.size.x : Screen.width) * this.widthScale; | |
| float height = (this.relativeHeight != null ? this.relativeHeight.rect.size.y : Screen.height) * this.heightScale; | |
| this.element.preferredWidth = width; | |
| this.element.preferredHeight = height; | |
| this.element.minWidth = width; | |
| this.element.minHeight = height; |
|
|
||
| } | ||
|
|
||
| public void SetLayoutVertical() | ||
| { | ||
|
|
There was a problem hiding this comment.
PreferredRelativeSizer implements ILayoutSelfController, but SetLayoutHorizontal() / SetLayoutVertical() are empty. This means the layout system won't trigger recomputation during rebuilds, and changes to relativeWidth/relativeHeight won't necessarily update this element. Call UpdatePreferred() from these methods (and/or mark the layout dirty when the relative rect changes).
| } | |
| public void SetLayoutVertical() | |
| { | |
| this.UpdatePreferred(); | |
| } | |
| public void SetLayoutVertical() | |
| { | |
| this.UpdatePreferred(); |
Add the art from the art team to the dialog menu, and add a character icon and next button to the menu.