Hi everyone!
I have an issue I hope someone would be able to answer, I checked the forum but didn't find anyone with the same problem.
My issue is that the mouse cursor remains visible and unlocked and I lose free-look camera control after my first conversation with an NPC.
Context
My game uses a first-person view, with free look and cursor lock working correctly when the game starts.
I'm using Adventure Creator (AC) integrated with Dialogue System for Unity.
I'm on Unity URP 6000.0.49f1, using the latest versions of both AC and DS. I installed the DS-to-AC bridge and followed all the setup steps from the Pixel Crushers integration manual.
I followed the documentation: I unchecked "Run Conversations in first-person?" in the Settings Manager and enabled "Lock cursor in screen’s centre when game begins?". I’ve also tried lots of checkboxes, re-ran the AC wizards, etc.
Possibly related
I tested the Dialogue System demo scene ("Sword Pickup") in the same project. To make it work, I clicked the Assign managers button inside:
Assets ► AdventureCreator ► Demo ► ManagerPackage
At the time, I thought this would only affect the demo scene. But as the Pixel Crushers documentation explains, this action overwrites AC's current global manager references. After returning to my original scene, many things were broken.
I then restored my previous managers manually and now most things are back to normal — except for the issue described above.
I'm a hobbyist working on my first project. Maybe it’s obvious to most people that you shouldn’t run a demo scene in the same project — but it wasn’t to me
I’m wondering if this is just something silly I’m missing, or if it’s normal behavior in first-person mode and I’m supposed to restore free-look manually after a cutscene. Or maybe it’s even a known bug?
Thanks a lot
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Blambition.
No worries re: demo scenes. The provided AC demo games can be run without switching Managers, I'll chat with DS's author about bring this ability to DS's sample scene as well.
But as you've found: if you switch Managers to test a different game in the same project, you just need to re-assign your own Managers when returning to your own game.
For the main issue: I can't reproduce this in a fresh First Person game using AC's Sample Scene from the New Game Wizard. Try this on your end - it'll be important to know if the presence of DS is the key factor here. In the sample scene, you should be able to walk over to the floating sphere and click on them to bring up an example Conversation.
Two ways you can affect the cursor's locked state are:
Do either of these steps bring back free-look in your own game?
Hi! The Dialogue System Extras page has an updated demo scene that doesn't require you to switch managers. The updated package will also be in DS version 2.2.56.
Hi both, and thanks again for your time and support.
Sorry for my late reply — we had national holidays here and I also have small kids, so I couldn’t spend as much time as I wanted testing everything.
About the sample scene: in my project, it wasn’t working properly. It started with a different camera, I couldn’t move, and basically nothing worked as expected. After that, I restored a previous version of my project using GitHub, one from before running the sample scene. With that version, the sample scene worked fine, but even after carefully copying the sphere, the dialogues, and double-checking all components and settings one by one, it still wouldn’t work properly in my own scene.
I also tested both suggestions from Chris:
Pressing the input named "ToggleCursor" — it toggled the cursor but didn’t solve the problem.
Using the "Player: Constrain" Action to control the cursor lock — that didn’t help either.
At this point, I’ve decided to test everything from scratch in a clean Unity project. I installed AC and made sure everything worked, then I added UCC instead of DS, and completed the integration — so far, it all seems to be working fine. My next step will be adding Dialogue System and following the integration process carefully.
Only to clarificate, in my main project I imported UCC but didn't touch or use it.
I’ll let you know if I manage to fix everything this way or if I run into the same (or new) issues after adding DS.
Thanks again for the support.
Hello again,
As I mentioned in the other post, I successfully integrated AC and UCC in a clean project. Since UCC takes control of the camera, I thought it made sense to set up UCC first, and then integrate Dialogue System, following all the official steps for both AC and UCC, hoping that this would solve the usual conflicts.
To be cautious, I did everything step by step:
I configured AC with Direct movement, mouse and keyboard, and context-sensitive interactions, as recommended.
I solved console errors in the demo scene.
I created a prefab for my player and tested it in a new, clean scene.
At this point, everything worked properly.
Then I installed Dialogue System, followed the integration steps for both AC and UCC carefully, and unfortunately, the same issues appeared again:
So the main problem stills:
After a DS conversation triggered through an AC ActionList, the FreeLook camera is never recovered.
This time I tried different ways to lock and unlock the cursor — using the AC Bridge component, "Player Constrain" and "Engine: Manage Systems" actions in the ActionList, etc. — and while I was able to properly hide and lock the cursor and even switch cameras during the conversation, the FreeLook camera is never recovered after the conversation ends.
I tried enabling number key selection for dialogue options, but due to input conflicts with UCC, I didn't insist on that for now.
Even when I manage to hide and lock the cursor from the beginning to the end of the DS conversation, once it ends, the FreeLook camera is never recovered. The player never regains control, even though the cursor was never visible during the entire dialogue.
To reproduce the problem, in a new and clean project:
Install AC with Direct movement and context-sensitive interaction.
Install Dialogue System with AC integration following the manual.
Set up a DS conversation triggered through an AC ActionList.
Switch cameras at the beginning and end of the conversation. You should lock the cursor at the end of the action list with the action type: "Player".
Note: if you install the DS-UCC integration at this point, everything breaks completely. Check error messages at the bottom of this post.
Note: Yes, the options to lock the cursor to the center and to hide it when locked are properly enabled in the AC settings.
The DS-UCC integration seems to interfere with AC and UCC working together. In fact, I strongly recommend NOT installing that integration for this kind of setup, because it worsens the situation instead of solving anything.
Console errors after installing UCC and DS integration:
NullReferenceException: Object reference not set to an instance of an object
AC.ActionDialogueSystemConversation.Run () (at Assets/Pixel Crushers/Dialogue System/Third Party Support/Adventure Creator Support/Scripts/AdventureCreatorActions/ActionDialogueSystemConversation.cs:75)
AC.ActionList+d__47.MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:471)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at :0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:413)
AC.ActionList:ProcessActionEnd(ActionEnd, Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:618)
AC.ActionList:EndAction(Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:577)
AC.d__47:MoveNext() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:541)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.ActionList:ProcessAction(Int32) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:413)
AC.ActionList:BeginActionList(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:382)
AC.ActionList:Interact(Int32, Boolean) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:283)
AC.ActionList:Interact() (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:246)
AC.d__42:MoveNext() (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:1644)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
AC.PlayerInteraction:UseObject(InvInstance, Button) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:1245)
AC.PlayerInteraction:ClickButton(InteractionType, Int32, InvInstance, Hotspot) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:1149)
AC.PlayerInteraction:HandleInteraction(MouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:812)
AC.PlayerInteraction:ContextSensitiveClick(MouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:677)
AC.PlayerInteraction:HandleInteractionMenu(MouseState) (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:234)
AC.PlayerInteraction:UpdateInteraction() (at Assets/AdventureCreator/Scripts/Controls/PlayerInteraction.cs:159)
AC.StateHandler:Update() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:250)
After writing the previous post, I restored the project to the version before installing the DS-UCC integration. Then I deleted one of the cameras and tried to fix a small issue I had:
The player was rotating to follow the cursor when answering dialogue options with the mouse. This was causing a strange behaviour, because since FreeLook wasn’t disabled, both the camera and the player ended up looking at the ground.
I managed to solve that issue and, to my surprise, I realised that fixing this is basically the same as solving the FreeLook camera problem.
Now, when selecting an answer, the player still rotates to look down, but the camera stays stable, so I decided to try once more — and effectively, I solved the main issue.
How did I solve it?
With the only option I hadn't touched:
Engine -> Manage Systems -> Camera: Disabled
This prevents the camera from moving when selecting an option, the same way it behaves with a first-person camera setup. In practice, it's like disabling FreeLook.
Then I realised this option isn’t really about "camera switching", it’s basically a FreeLook control. So I added one last step before switching the camera back:
Engine -> Manage Systems -> Camera: Enabled
And… it works!
New problem:
When I select an answer, the head of the Atlas player shows up inside the camera view. I tried to fix this by moving the Atlas meshes to a different layer and adjusting the culling mask of the camera, but it doesn't seem to work — maybe because that camera doesn’t render the scene in the usual way?
I augmented the clipping planes near to 0.6 and it seems it works fine for the moment. Anyway the shadows are visible so it isn't ideal but acceptable for the moment
Thanks in advance!
Glad you figured the camera issue out. What with 3 assets at play, it's not always easy to see where the issue lies.
The error message, however, is coming from the DS integration's Conversation Action. I would recommend getting in touch with DS's author about that.
For the camera culling issue: it's the AC MainCamera that performs rendering at runtime - other cameras are just references for it. The MainCamera will copy over its "attached" camera's clipping planes, but not the culling mask. You'll need to set the culling mask on the MainCamera itself.