Forum rules - please read before posting.

Inventory aspect ratio

Hello,

I have a question, because I couldn't figure out how to do it myself.
How can I keep the aspect ratio for the inventory items icon? It changes depending on the appearance and positioning of the inventory menu, I would like it to remain fixed, just like the original image.

Thanks in advance.

Comments

  • Can you share some screenshots to illustrate the problem? In what way are you changing the appearance/position of your Menu, and what is the Menu's Source set to?

    You'll typically want to make sure the menu relies on Unity UI for its source, as you can then use Unity's Canvas Scaler and other UI components to make sure your UI elements scale correctly. AC's default Inventory menu has a UI counterpart + prefab (InventoryUI) that you can use as a starting point to tweak to your own needs.

  • I forgot to say that my game is for Android :D and the menus change depending on the screen, including the inventory (items). I would like the items in the inventory to maintain their ration. I activated "Force aspect ration" but this does not affect the item in the inventory too much when the screen is in landscape mode.

    https://ibb.co/MCz5Cxr
    https://ibb.co/5c0XKn1
    https://ibb.co/sQPJKq8

  • edited November 2020

    Your screens show the menu, but not the way it's set up.

    What is its Source set to? In order to mainting their aspect ratio, you'll want to make sure you're using Unity UI - as you can then configure the Canvas Scaler and other Unity UI components to react in your intended way to different screens.

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.