Forum rules - please read before posting.

InGame PfreabUI

edited January 22 in Technical Q&A

Implemented "InGame" via prefabUI but ran into two problems:
1. This prefab works but it doesn't get clicked through in the game.

  1. Missing images that are not buttons or something else, do they need to be declared for "AC" somehow?

Comments

  • This prefab works but it doesn't get clicked through in the game.

    As in, clicks on the rest of the screen don't register?

    The Menu's assigned "RectTransform boundary" (by default, the Panel GameObject) will block clicks to the game. This boundary should only span the visible portion of the Menu. Your Panel has been stretched to cover the full-bounds of the screen.

    You should reduce this to only cover the top edge of the screen - though ideally you should separate this to two Menus so that each boundary only takes up a corner.

    Missing images that are not buttons or something else, do they need to be declared for "AC" somehow?

    If you do not register a UI object as an Element in the Menu, then AC will not control it. Pause the Editor when they go missing and select the objects in the Hierarchy / Scene window to see what happened to them.

  • If you do not register a UI object as an Element in the Menu, then AC will not control it. Pause the Editor when they go missing and select the objects in the Hierarchy / Scene window to see what happened to them.

    How exactly should they be declared in AC as just graphics? Sorry, I don't quite understand.

  • It's possible to use the Graphic element type to have AC control an Image or RawImage component., but if you don't need AC to control them, you don't need to declare them in the Menu Manager. The Menu Manager only needs to be aware of aspects of your UI that you want it to be able to control.


  • It does not allow you to simply drag a wire rod to anything other than "image" or "raw image" These images will not interact in any way in the game. But they need to be displayed.


    There are none in "Game" mode.

    But if you switch to the "Scene" mode, they are in the right place.

    How can I make them visible in game mode?

  • These images will not interact in any way in the game.

    Then they do not need to be linked to the Menu Manager. The "black-left" element you've defined in the Menu can be removed.

    But if you switch to the "Scene" mode, they are in the right place.

    If they aren't linked, then it's not an AC issue. Check that they are on a Layer that's included in the MainCamera's "Culling Mask", which is necessary for an object to be rendered in-game.

  • edited January 30

    Thanks, it helped!

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.