Skip to content

Dialog art#60

Open
Flaqzar wants to merge 2 commits intomainfrom
Dialog-Art
Open

Dialog art#60
Flaqzar wants to merge 2 commits intomainfrom
Dialog-Art

Conversation

@Flaqzar
Copy link
Copy Markdown
Contributor

@Flaqzar Flaqzar commented Apr 11, 2026

Add the art from the art team to the dialog menu, and add a character icon and next button to the menu.

Flaqzar added 2 commits April 10, 2026 18:52
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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (DialogControllerDialog) 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 DialogController to Dialog.
  • Replaced/added dialog UI prefabs and updated MainHubRoomScene to 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 icon field 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.

Comment on lines 889 to 893
m_PersistentCalls:
m_Calls: []
title: Lord Foog the 2st
icon: {fileID: 0}
keepState: 0
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment on lines 1115 to 1119
m_Script: {fileID: 11500000, guid: ccb6610c57751a84a8bb35e0d866ef43, type: 3}
m_Name:
m_EditorClassIdentifier:
dialogueUI: {fileID: 1726297711}
dialogueUI: {fileID: 0}
currentDialogueHolder: {fileID: 1850015926}
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
using UnityEngine.EventSystems;
using UnityEngine.UI;

// This code is intepretted from AspectRatioFitter.
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in comment: "intepretted" → "interpreted".

Suggested change
// This code is intepretted from AspectRatioFitter.
// This code is interpreted from AspectRatioFitter.

Copilot uses AI. Check for mistakes.
Comment on lines +94 to +99

}

public void SetLayoutVertical()
{

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
}
public void SetLayoutVertical()
{
this.UpdatePreferred();
}
public void SetLayoutVertical()
{
this.UpdatePreferred();

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +67
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;
Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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;

Copilot uses AI. Check for mistakes.
Comment on lines +77 to +82

}

public void SetLayoutVertical()
{

Copy link

Copilot AI Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
}
public void SetLayoutVertical()
{
this.UpdatePreferred();
}
public void SetLayoutVertical()
{
this.UpdatePreferred();

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants