Sequencer Camera behave differently in build

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Orglod
Posts: 3
Joined: Mon Dec 05, 2022 3:54 am

Sequencer Camera behave differently in build

Post by Orglod »

Hi there

I am having an issue with the Sequencer command Camera()
I have created my custom camera angles to have specific shots during the conversation.
I am using the Camera attached to the player(The only one present in the scene).
The custom camera angles are used with multiple NPCs but the position of the angles is relative to the player.
I have specified the camera angles in the dialogue system controller display settings.
Everything works fine in Unity.
The problem appears when exporting the build.
Here is what happens:
When the camera should zoom on the an NPC it instead shows its original location in the 3D space.

This is what should happen(And it does when playing in Unity)
s1.jpeg
s1.jpeg (73.81 KiB) Viewed 222 times
This is what happens when built
Screenshot_20221205_102135.jpeg
Screenshot_20221205_102135.jpeg (206.88 KiB) Viewed 222 times
When defining the camera angles I did so in another room that is shown here.

How may I solve this problem?
Thank you in advance for your time

Best Regards
Francesco
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequencer Camera behave differently in build

Post by Tony Li »

Hi Francesco,

Is it possible that your build is using a different Dialogue Manager that is configured differently? In the Unity editor, please open the first scene in your project's build settings and play that in the editor's play mode. This will simulate the order in which scenes are played in your build.

If that doesn't help, make sure your camera is tagged MainCamera.

And if that doesn't help, temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Make a Development Build. Then reproduce the problem in the build. Review the Player.log file for messages such as:

Dialogue System: Sequencer.Play( Camera(angle)@0 )

and

Dialogue System: Sequencer: Camera(angle, GameObject)

The first command shows the Camera() command as the sequencer has parsed it, and when it is scheduled to play. The second command appears when the Camera() command actually plays, and it shows the GameObject it will use for the subject.
Orglod
Posts: 3
Joined: Mon Dec 05, 2022 3:54 am

Re: Sequencer Camera behave differently in build

Post by Orglod »

Thank you for you fast response.
It was very helpful. May I ask some more advice?

Indeed we had the Dialogue manager in the first scene(Main menu) where the angles where not specified.
I tried to put the custom angles there as well but it didn't work.
It did work when I removed the dialogue manager from the first scene and left it only in the scene where I need the Camera Angles to work.
But we have another problem.
(I am making the game with another person).
He made the saving function related to the dialogue manager and we need it to be in the Main Menu scene for it to be able to load the saved game.
I've tried making another model and creating a set of camera angles directly in the Main Menu scene but this solution doesn't work.

Any suggestion about what other fixes we may make?
Do you need additional data?

Thank you very much for your time and patience
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequencer Camera behave differently in build

Post by Tony Li »

Hi,

Please try this:

1. Back up your project.

2. Open a scene where the Dialogue Manager works correctly.

3a. If your camera angles are a prefab, assign the prefab to the Dialogue Manager's Camera & Cutscene Settings > Camera Angles field.

3b. If your camera angles are in a GameObject in the scene, make the GameObject a child of the Dialogue Manager. This way they will survive when the Dialogue Manager survives into a new change. Assign the GameObject to the Dialogue Manager's Camera & Cutscene Settings > Camera Angles field.

4. Make sure this Dialogue Manager has all of the components you want, such as the save system components.

5. Drag the Dialogue Manager GameObject into the Project view to create a prefab variant. Whenever you need to change the Dialogue Manager configuration, make changes on this prefab variant.

6. Add this Dialogue Manager prefab variant to the main menu scene. You can also add it to any other scenes that you would like to playtest directly in the editor's play mode.

Related info: How To: Manage Player Controls and Scene Changes
This article explains how the Dialogue Manager works with scene changes.
Orglod
Posts: 3
Joined: Mon Dec 05, 2022 3:54 am

Re: Sequencer Camera behave differently in build

Post by Orglod »

Point 3b did the trick
You are the best Tony
Thx again!
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Sequencer Camera behave differently in build

Post by Tony Li »

Glad to help!
Post Reply