Forum rules - please read before posting.

White Empty Boxes in UI Inventory

Hi, I have followed the tutorial and linked my canvas objects to the linked images in the menu for my UI inventory, but once in game play mode I only see white boxes instead of my images. Anything obvious I am doing wrong?

Comments

  • I would need to see the way you've linked your Menu and InventoryBox element slots - check that the Constant IDs match for each slot.

    The default interface has Unity UI counterparts for each menu, however. If you set your Menu Manager asset file to Default_MenuManager, you can copy the default Inventory menu, paste it into your own and set its Source to Unity UI Prefab to make use of it.

    Be sure to also link the Linked Canvas to a duplicate of the original InventoryUI prefab, though - otherwise any changes you make will get overwritten upon updating AC.

  • Is it your "Briefcase" graphic element that's the problem, or the inventory slots?

    You have no texture assigned in the element's "Texture" field, which will clear the Image component's Sprite field at runtime. Assign the same texture that's used in the Image component.

  • So it is both, but if we focus on Briefcase, I need to put an image in the element's texture even if the image is linked ? I want to anmate the briefcase, which is why I have chosen the Unity UI route

  • You don't need to connect each element in your Unity UI prefab - you can still animate it without it being connected to the Menu Manager.

    You only need to connect it to an element if you want AC to handle its display or interactivity.

  • edited September 2021

    I also want the inventory to be a unity ui as a want it to scale correctly when in 4:3 for ipad and other displays/

    I didm; have the elements linked before, kust the canvases, but as mentioned in the beginning of the thread, I was just getting white boxes in play mode.

    I will try again

  • I got it working by copying the left arrow button and replacing and renaming rather than using a canvas image

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.