Forum rules - please read before posting.

World Space Canvas to simulate an interactive touchscreen display

Hi Chris!

I am trying to implement a Unity UI In Scene to have a computer screen displayed in world space and interact with it. I am developing a first person point and click adventure.

The canvas contains an InputField where you have to type in and then you have to click a button (also in the canvas) to accept that input.

I successfully created a menu from the Menu Manager with Source to Unity UI Prefab, this works correctly and everything links correctly with a Unity Canvas Render Mode set to "Screen Space - Overlay", and the option: "Enabled on start?" checked, in this case I can click on the InputField, write with the keyboard (I constrain Player Movement and Free-aiming when this menu is turned on) and then click on the "Accept" button to close the menu and call other actions.

But this is not working with World Space Canvas and Unity UI in Scene.

I've tried both with the Canvas enabled and disabled from the beginning, it links the UI elements correctly because the label and button text entered in the AC Menu Manager are updated correctly on the Unity UI In Scene, but the InputField is not responding, the Accept button does not work and consequently no actions after the OnClick are executed (like the Player constraints and other actions from the ActionList linked to the ActionList to run).

I am using TextMeshPro elements.

Not sure if I am approaching this correctly, I’ve read the manual and searched here in the forum but not found a related topic.

Thanks in advance Chris, great work!

Captura-de-pantalla-2024-02-02-123237

Comments

  • edited February 5

    I can't recreate such an issue on my end - what are your AC/Unity versions, and does the Button at least change colour when clicked?

    Check that you've assigned the MainCamera as the Canvas component's "Render Camera", and try removing the EventSystem from the scene.

  • edited February 12

    Hi Chris, thanks for the quick response.

    I kept trying and yes, I was setting it up incorrectly.

    I did what you said about the camera and EventSystem but also triggered the canvas to appear after entering a trigger so it correctly called the "ActionList when turn on", and with that all the rest works (so I guess the canvas can't be activated from the beginning for a World Space Canvas).

    Thanks again.

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.