Forum rules - please read before posting.

UI not interactable after scene switch

Hi there I have a quick question.
My game starts with a main menu (a simple 3d scene with a canvas) then you transition to the main world which is First Person and is set up using different elements of AC. Then however when the playable character interacts with a computer, we have a scene switch again to a 3D scene which chonsists only on UI Elements. However this time I cannot choose anything, so I assume that the problem here lays within AC config- as I could not see why this otherwise should be difficult. Does anyone have an idea what I might oversee? The scene switch should be so easy that the playable character can easily switch between working on the pc and walking around in the room.

Comments

  • Welcome to the community, @The_Miuuri.

    I'll need a few more details to better understand your situation.

    Are the UI elements you refer to part of AC's Menu system, and is the scene itself an "AC" scene, i.e. one that's been set up using the Scene Manager?

    Do interactions work as intended if you begin the game from this scene?

    Any screenshots you can share to help illustrate the problem would be welcome. Please let me know your AC and Unity versions as well.

    When it comes to UI interactivity (assuming you're not referring to Unity's UI Toolkit package), then input is handled by the EventSystem. AC will spawn its own default one automatically into the scene if none is found - is this occuring, or is there already an EventSystem present in the scene?

    You can view the bottom of the EventSystem's Inspector at runtime to get a readout of the currently-selected object - does this show elements are you mouse-over them?

  • Hello Chris

    First of all thanks a lot for your quick reply.

    It took me a while to reproduce the problem on a computer with more performance and it seems that the problem might be coming from the fact that in the previous scene where you are supposed to walk around, the mouse cursor is locked in the middle of the screen. So I would need to unlock it - without deactivating AC for that scene, the reason for that is, that I would like to uphold the speech stuff even within that UI scene.

    You asked for details about what I mean with UI. And so please allow me to explain; this is a game for my masterthesis and it deals about cybersecurity awareness. So what I try to do using UI canvas and UI elements as a form of „using a computer“ within the game. Meaning that you walk around and you can talk to one NPC, but of course lots of magic will happen when you interact with the computer and it switches Scene to this UI scene, where I more or less work with buttons on printscreens etc. Sorry I know you are not the one to talk to about my game design but it is easier for me as a noob to explain. ;-)

    So unlock the mouse without losing the option to let the character talk or go into the AC menu would be great. Maybe you can hint me how I could do that.

    Best regards
  • You can unlock the cursor with the Engine: Manage systems Action's Cursor option. You can run this when you enter/exit your "computer" scenes to have the cursor be unlocked during them, and locked again when leaving them.

    The cursor's default state is determined by the Settings Manager's Start game locked off? option under the "Interaction settings" panel.

    If your Movement method is set to First Person, then AC will automatically switch the camera to your Player character's "First Person Camera" whenever you're in gameplay.

    If you want to avoid this behaviour during your "computer" scenes, you can switch the Movement method to None for their duration. This too can be done with the Engine: Manage systems Action, via its Change movement method? option.

    One caveat to bear in mind, however, is that this option changes the Settings Manager's "Movement method" option, which means it won't be reset after exiting the game. The best way to counter this is to assign an ActionList asset in its ActionList on start game field that uses the Action to set the "Movement method" to your intended starting state.

  • Hi Chris

    I now understood that for every scene I should make a click in the Scene Manager, this was probably he reason why Ic ouldn't pull off any action lists. Thanks for your support! BR Marcel

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.