Forum rules - please read before posting.

Disabled interaction icons are also always visible (using Unity UI)

Hi

I finally switched to Unity controlled UI (from prefab) and I have the same issues as described in this post: https://adventurecreator.org/forum/discussion/6985/disable-interaction-icon-text-when-interaction-is...

Mainly, earlier if a hotspot had only the Use interaction defined, only that icon would show up. But now all icons show up even if they've not been defined.

I tried all the solutions in the above mentioned post (setting the buttons' "Disabled Color"'s alpha to 0 etc) but its made no difference.
I use direct control method (not the mouse) - if that makes any difference

Here's my menu:





I've duplicated and edited the WD_InteractionUI UI canvas:

image

image

Thanks!
«1

Comments

  • Please post your Settings and Cursor Managers, and a sample Hotspot Inspector for which the issue occurs, and I'll attempt a recreation.
  • Also:
    1) What are the contents of the ActionList that run when it turns on?  Best to temporarily remove it while the problem is solved
    2) In what way does the Animator control the UI?  Again, best to remove it for the moment.
  • edited October 2018
    Here are the settings and cursor managers, and a hotspot inspector: https://imgur.com/a/7r960LX

    image

    image

    image

    image

    image

    image




  • Thank you.  I'll need the Hotspot Inspector and other questions answered, too.
  • edited October 2018
    Hi, just edited the response and added the hotspot inspector as well.
  • edited October 2018
    1) The action list runs Variable: check -> sound play one shot. (To check if a pop sound should play for the interaction or not) Nothing else is in that action list. 

    2) The animator is set up with the 4 states as recommended (On -> OnInstant and Off -> OffInstant)

    I'll try disabling both.
    Edit: The issue persists after disabling them.
  • You have no textures assigned in your Cursor Manager.

    I can't recreate the issue with or without textures, however.  You will need to create a duplicate, cut-down project that shows off the issue in a single scene for me to experience for myself.
  • I had them assigned in the cursor manager as well, and then tried it without just to make sure (had the same issue both ways) Alright, I'll PM a file as requested. 
  • edited October 2018
    So I created a new project in order to send it to you - but the issue doesn't exist in this anymore. I guess I'll try to see why that's the case. [This at least means that there's no issue with the menu prefab, but there's an issue with my managers, probably - but I am using duplicates of the same managers here as well]

    At the same time, is there any way for me to send you a slimmer version of my original project? I'm not sure if duplicating the project and deleting unnecessary files would work.

    Edit: Also noticed that if I left my cursor manager blank here, no icons show up in the game (they're replaced by white boxes) but if I leave the cursor manager blank in my actual project, the icons show up regardless.
  • Alright, sorry - turns out I made a dumb mistake. There were two prefabs of the same menu. The menu canvas was linked to the newer prefab, while the elements were still linked to the older buttons. Making a new project helped me spot that. Sorry for wasting time and thanks anyway! :)
  • edited October 2018
    Ok, there is an issue after all - the inventory icon fails to show up when using Unity UI. Here's the settings using an AC menu, when it used to work correctly. (Assigning it as Background texture did the trick)



    Here's the new Unity UI menu. I've tried all settings for "When slot is empty", "Link graphics to" and "Change cursor when over", with no difference.



    Cursor manager


  • What is it you're trying to do, exactly?   There's no need for an "Inventory" icon in your Cursor Manager, as the InventoryBox element you're showing will display an actual item, not a button/icon.

    Unlike an Interaction icon, which relies on the Cursor Manager icon for its graphic, an InventoryBox will rely solely on the Inventory item graphics held by the player.  Other than that, it's down to the way you configure your Canvas to determine what gets displayed e.g. behind the items.

    Are you actually carrying items that are useable on the associated Hotspot at the time?
  • edited November 2018
    So, this is a specific type of inventory system you'd helped me create a while back. It's essentially, as you described it: "I'll look into allowing the "Alternative input button" field showing for the special case of single-slot hotspot-based inventory elements,"
    In this thread - https://adventurecreator.org/forum/discussion/6889/trying-to-setup-inventory-action-to-work-with-pla...

    The inventory function works as described in the post above, but only the icon doesn't show up.

    And yeah, I'm carrying the item at the time. If I switch back to my AC menu which has an exact copy of the Inventory element in the interaction menu (as shown in the first two pics) the icon shows up at the correct time.
  • edited November 2018
    And the linked button (ID = 4402982) is in the Canvas' Hierarchy?  What's it's state at the time it doesn't display?

    I can't recreate any such issue with the default Inventory menu / InventoryUI canvas.
  • Interesting - I checked the state of the UI during runtime, and the inventory button is enabled, correctly. But its "Source Image" in the Image, in the inspector of the button automatically changes to "EmptySlot". Here's a screenshot (during runtime on left, original/ correct on right)

    image
  • The ID of the component does not match that listed in the Menu Manager.
  • edited November 2018
    Actually that picture is an older one (I recreated the button after that) the ID in the Menu Manager is the same now (45622712) Is there no other obvious issue visible in the later picture? Is the "source image" supposed to automatically change to "EmptySlot"?
  • It is - if no items are supposed to be listed, and you've set the When slots is empty? field to Clear Content.

    That makes sense - since your Hotspot has no Inventory interactions defined.  As you've got Only show items referenced in Interactions? checked in your InventoryBox, only items associated with the Hotspot should be displayed, but the Hotspot you've posted has none.
  • edited November 2018
    I'm sorry - I have no idea how I ended up posting an image of that hotspot. This is the correct hotspot inspector's photo:



    Edit: I also tried adding an inventory option in the "Use Interactions" section (below Look at and above Inventory Interactions) wondering if that would make it work, but that did nothing either.

    As an experiment, I tried switching the "Curson/ icon" option of Look at and Talk to to Inventory, with the object in the player's inventory, and this caused all icons to disappear and interactions to become disabled.
  • I think you're getting confused about the role of cursor icons - there's no need to have an "Inventory" icon defined so far as I can tell.

    I have no such issue on my end.  Here's an example package to demonstrate how this should work.  Double-click the Manager Package and open the scene.
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.