Forum rules - please read before posting.

Unity UI menu with render mode world space

I created different AC menus in my game and started to make them into Unity UI menus. Linking the different menu elements works fine and the menus update correctly.

There is however a problem when moving within my first-person mode 3D environment. As my Unity menus render in World Space, I would need to set the corresponding AC menu source to "Unity UI in Scene" and set the menu's position manually. When I do this however, the menu's don't appear (they are shown however, at their original position, if I use the "Unity UI in prefab" option).

To manually position my menus, I tried creating a marker with X=0, Y=2 and Z=-4 (to have the menu displayed above and slightly in front of player) and in the ActionList which activates my menu, I use Object - Teleport, relative to player with the in scene Unity UI canvas as the object to impact. If I understand properly, this should move my menu in front of my player, wherever I am in the scene.

Am I missing something or do you have any idea why this problem is occurring?

Comments

  • I solved the problem by changing the rendering mode to Screen Space - camera, selecting the First person camera and making a few other changes to the canvas.

    After changing the AC menu source back to "Unity UI Prefab", the menu does now display properly. There's one remaining issue: If I've moved around in the 3D environment, displaying the menu brings me back to my start (initial) position in the game.

    Hope your can help me understand the issue here. 
  • You mean your player is moving to the PlayerStart?  Please give more detail, it's not something I can give advice for without knowing more.

    If you move the PlayerStart in between starting the scene and displaying the menu, does the player snap back to the original location of the PlayerStart, or where you moved it to since?

    At what point does this movement occur?  When opening the menu, or interacting with it?  Does the menu have any associated ActionLists when it turns on or off?
  • Hi Chris,

    Just checked and the issue was due to something in a Playmaker FSM which was called by the menu's "turn on" ActionList. Shouldn't have been testing using that menu...

    Did some tests with a basic blank menu and all works fine. Thanks for your help.
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.