Cinemachine and UI

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mudukke
Posts: 73
Joined: Wed Sep 27, 2023 4:15 am

Cinemachine and UI

Post by mudukke »

I am having issues with the cinemachine and UI

For example, my character chats to themselves so it cuts to cinemachine camera shot. However, when the dialogue ends the UI doesn't disappear and it doesn't cut back to the original camera.

I am not sure what I am doing wrong
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cinemachine and UI

Post by Tony Li »

Hi,

It sounds like the dialogue isn't actually ending. Maybe it's waiting for a continue button click? If this is the case, you can simulate a continue button click with the Continue() sequencer command such as: Continue()@{{end}}

To see if the conversation is ending or not, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. When the conversation ends, you should see this line in the Console window:

Dialogue System: Conversation ending.

More info: Logging & Debugging
mudukke
Posts: 73
Joined: Wed Sep 27, 2023 4:15 am

Re: Cinemachine and UI

Post by mudukke »

I don't have a watch tab and I can't add is there another way to add
watch.jpg
watch.jpg (105.54 KiB) Viewed 11775 times
mudukke
Posts: 73
Joined: Wed Sep 27, 2023 4:15 am

Re: Cinemachine and UI

Post by mudukke »

Just to add for some reason when the dialogue ends it doesn't cut back to my player camera. It cuts back other CM cameras in the scene that's in a timeline and the camera priority for these is set to zero while my player camera is set to 10.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cinemachine and UI

Post by Tony Li »

Hi,

The Watches tab only appears in play mode.

However, I think this is the key:
mudukke wrote: Wed Dec 06, 2023 5:20 amJust to add for some reason when the dialogue ends it doesn't cut back to my player camera. It cuts back other CM cameras in the scene that's in a timeline and the camera priority for these is set to zero while my player camera is set to 10.
If you've changed Cinemachine vcam priority levels during the conversations, you need to set them back at the end of the conversation. The Dialogue System won't automatically do that for you, unless you're using a Cinemachine Priority On Dialogue Event component to change priorities.
mudukke
Posts: 73
Joined: Wed Sep 27, 2023 4:15 am

Re: Cinemachine and UI

Post by mudukke »

Thanks, Tony that worked! The other issue I have is the dialogue panel. I turn it off once conservation ends in the timeline. However, how do I turn it back on within the scene when the timeline ends? Also is there anything in the documentation regarding smooth transitions of cameras from the timeline to the cameras in the scene?
sequence.png
sequence.png (12.85 KiB) Viewed 11761 times
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cinemachine and UI

Post by Tony Li »

Hi,

To show the dialogue UI again, use: SetDialoguePanel(true)

This command works best when it's used at the end of a dialogue entry's sequence or the beginning of the next one. Example:

Code: Select all

SetDialoguePanel(false);
Timeline(Your-Timeline)->Message(TimelineDone);
SetDialoguePanel(true)@Message(TimelineDone)

To reset back to the gameplay Cinemachine vcam, set the vcams' priorities so the gameplay vcam has the highest priority. Example:

Code: Select all

SetDialoguePanel(false);
CinemachinePriority(CM_Cutscene1, 99);  // Higher than CM_PlayerCam.
Timeline(Your-Timeline)->Message(TimelineDone);
SetDialoguePanel(true)@Message(TimelineDone);
CinemachinePriority(CM_Cutscene1, 0)@Message(TimelineDone); // Lower than CM_PlayerCam.
Post Reply