Forum rules - please read before posting.

Alpha Channel Textures In Menu

I am trying to use the "Graphic" Element in a menu, but it appears the texture's alpha transparency is not rendering - the image is displayed with a white background. All my inventory items display properly, but for some reason this is not.


  • I would need more details - can you provide screenshots?

    I get no such issue when creating a new AC menu Graphic element with AC's "Fade" texture.

  • It seems the Fade texture does not work for me either (see imgur screenshot).
    What I am doing is turning on an extra menu when the inventory is opened - the menu is just this graphic.

    AC 1.73.2
    Unity 2018.3

  • Is that with a background texture for the menu itself underneath? I can't glean much from the screenshot - is this an AC or a Unity UI menu?

    What's your render pipeline? If using AC, is it the same for Unity UI?

  • edited May 2021

    It does have a background texture in the screenshot, yes, though I also tried without and the issue is the same.

    I can confirm however that it displays properly as Unity UI, but not as an Adventure Creator menu. I would prefer to use AC though, as it is only a very simple menu and AC menus are much easier to setup - Unity UI can be a bit convoluted.

    I am using the built-in renderer with Deferred Rendering and Linear Colour Space.

  • I can't recreate this with those values alone. It may be some other rendering setting unique to your project.

    Are you getting this behaviour in a fresh AC project with those rendering settings?

  • Sorry for the delay, I have returned to try and solve this issue.

    It still occurs in a fresh project, yes.

    So, I have rebuilt my inventory using Unity UI Prefab instead, but now I cannot get the inventory to work - as in, I cannot select any items when it opens.

    I have marked the First Selected Element as Slot 1, I have also tried just selecting Auto-select first visible element but it will not work either.

    _Prevent Selection_s is not checked in the inventory box menu.

    One thing to note though: I had a warning about an event system already being present in the scene, and I could actually select items when that warning was present - but only using the mouse (this is a direct controlled game and should rely on an Interaction A input - this was working with the old AC inventory) I deleted that event system, I get no warning, but now I am unable to select items.

    Let me know if there is some specific detail or image I could share to help shed light on things.

    AC 1.73.8
    Unity 2018.3.14

  • AC's own Event System is configured to allow for direct navigation of Menus - you'll need to make use of it rather than the default one Unity spawns in the scene.

    Is your Inventory menu available during gameplay? If so, you'll need to enable direct-navigation of menus during this time with the Engine: Manage systems Action. You can also use the Menu: Select Action to force the selection of a specific menu element.

    See the Manual's "Navigating menus directly" chapter for details on this topic.

  • The inventory is accessed via a button pressed and the game is paused when it is open.

    I have tried both
    Engine: Manage Systems > enable navigation of menus
    Menu: select element
    actions as part of an action list for when the inventory opens, but it didn't get me anywhere unfortunately.

    I have take some screenshots of some of the inventory menu details, maybe it'll point to something dumb I've done.

  • If the Menu pauses the game, you won't need to use the Engine: Manage systems Action.

    The Menu's First selected Element, however, needs to be given the name of an Element listed in the elements panel beneath, e.g. "InventoryBox". If the supplied element has multiple slots, the first slot will be selected.

    If this still has no effect, temporarily try the effect of unsetting the ActionList when turn on asset. It may be that you need to configure its settings to not interrupt gameplay.

  • edited June 2021

    Okay, setting InventoryBox as the First Selected Element is working in regards to something being selected - I know that's working because I set a "hover" sound to play.

    However, for some reason I still can't actually select / use anything like I could (with the mouse) before I deleted that rogue Event System.

    I have removed the Inventory's TurnOn action list.

    In Global Settings, the Event System prefab is empty. I assume this is normal though?

  • Some more details:

    Interaction B (Examine) action lists are working on the first inventory object, but I can't Use it or move to another item slot.

  • for some reason I still can't actually select / use anything like I could (with the mouse) before I deleted that rogue Event System.

    To clarify: AC's Event System limits menu control to either direct navigation or the mouse, based on your settings. It should be the case that the mouse cannot be used to control the UI, since AC should be preventing this. You can use your own EventSystem prefab if this is not desired behaviour.

    So far as directly-navigating the menu goes, is your UI set to be both navigable and interactable, and are you making use of the Horizontal/Vertical inputs to attempt navigation? You can see which Button is currently selected by checking the bottom of the EventSystem Inspector at runtime.

    The default interface's Inventory menu should be able to work with direct navigation. It'd be worth temporarily switching your Menu Manager asset to Default_MenuManager, tweaking its Inventory menu properties to match your own, and see if that's working with direct navigation.

  • Yes it's okay, that's the intended behaviour: direct navigation only. When I mentioned the mouse, it was because I accidentally created that event system which took over and allowed the mouse to be used with the unity ui, even though it's not supposed to.

    About the navigable UI: are you referring to the button elements? They are the only things I can find that have any kind of Navigation setting, which is currently set to Automatic. I also kept the Text objects despite the tutorial saying delete them, because I assumed they were necessary for the Icon And Text Display type (on the InventoryBox). Viewing the Event System at runtime, it never leaves Slot 1 when pressing Horizontal / Vertical inputs.

    Oh, the default AC interface works perfectly well with direct navigation - it always did. Both the Default Manager version & my own earlier version work. It is only Unity UI that I've having bother with.

  • Navigation settings can be a bit more wide-ranging: the Interactable toggle on both Button and Canvas Group components will have an impact on things.

    With Unity UI, AC, and Unity input all factoring in here, it's hard to know which one is causing the issue.

    Try loading up the 3D Demo (scene + Managers), and go to the Menu Manager. Check Directly-navigate Menus when paused?, then select the Pause menu, and set its Source to Unity Ui Prefab, and check Auto-select first visible Element?. Does running the scene and opening the Pause menu then allow you to navigate it directly?

  • Okay, so I tried this in my own project and menu navigation wouldn't work. I then tried it in a brand new project and it works fine, so this suggests to me that it is Rewired (sorry I didn't mention that) causing an issue somewhere along the lines.

    But why? I use the very same Horizontal and Vertical inputs during gameplay as well as AC Menus and it works perfectly well, but for some reason the input is not recognised by Unity UI? Also it recognises Interaction B (examine) - which brings up a separate menu describing inventory objects - then this is closed with Interaction A - this works too. So strange.

  • so this suggests to me that it is Rewired (sorry I didn't mention that) causing an issue somewhere along the lines.

    That is certainly a major factor. When it comes to navigating Unity UI menus, AC doesn't actually handle input beyond auto-selecting the first element when a menu turns on. The behaviour you're seeing may be more down to Rewired and the Event System.

    There are a few special-cases where AC will react to Unity UI input, such as the use of InteractionB and inventory items. That's separate from the ability to navigate between buttons, though.

  • Ah, I feared as much. No idea how to fix that, so I suppose I'll have to go back to an AC inventory.

    Functionally perfect, but I am back to my original issue of Alpha Textures (that are not inventory objects) not rendering properly. This screenshot shows the issue:

    As you can see, the actual inventory objects are displayed no problem, but the additional "Danger" graphic to the right has this white background and the transparency is not used.

    All these images are PNGs.

  • This, too, is a Unity issue - AC isn't performing any custom rendering duties. It's also an issue I cannot recreate either.

    I'd recommend getting a test UI working with just Rewired and Unity UI in a fresh scene, with no AC involvement. That way, it'll be easier to isolate where any issue lies.

  • Yeah that sounds sensible. I'll chime back in if I find something.

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.