Forum rules - please read before posting.

Android hotspot/layer issue

Latest unity, AC1.64 and AC1.65b I have a close-up scene of a toaster with a hotspot that covers the bottom half of the screen to allow you to return to the previous view. There is an inventory bar that appears at the bottom of the screen, over the top of the Hotspot. On Android, when I try to choose an item from the inventory, the click is also captured by the Hotspot, so changes the view, instead of allowing me to select an item and interact with the scene. On the Windows build, the click on the inventory is not captured by the Hotspot, and works as expected. Is there something I should be doing with Raycast or Layers for Android, that isn't necessary on Windows? If you need any visuals from the inspector etc, let me know what's needed and I'll attach them. Thanks in advance.


  • It looks like a very similar issue to issue number 1 in this post from 2014: Do you know if this was ever resolved?
  • edited October 2018
    So far as I can recall - but that was for a much older version of Unity.

    Please be specific about your Unity version - with patch/beta releases etc, "latest" can take multiple meanings.

    What's your Menu's Source set to?  If set to Unity Ui Prefab, does it occur if temporarily set to Adventure Creator?  Let's also see screenshots of everything.
  • Apologies, I should know better!
    Unity 2018.2.10f1
    AC 1.65b & AC 1.64

    Below is an image of the Hotspot setup, and its related action list...

    I have also created two builds. One for Windows and one for Android. There were no  changes made to the project between the builds.

    Launch the game, and "Look At" the toaster in the corner.
    Open the Inventory (small arrow at bottom right) then place the slice of bread in the toaster. To test the hotspot interaction more, try clicking the bread then right-clicking to cancel.

    On the Windows build you can keep doing this consistently without any  issues.

    On the Android build you pickup the bread AND run the "Use" action of the "Back" Hotspot (changing your view and making it impossible to toast the bread).

    Android Build

    Windows Build

    The Inventory is a Unity UI. Is the above enough to explain the issue? I'd like to avoid recreating an AC inventory or importing one if possible.

    Many thanks
  • Let's see some images of the Menu's entry in the Menu Manager, as well as the Canvas itself when placed in the scene.  You will need to ensure that the RectTransform boundary covers it's "clickable area" to prevent taps on it going through.

    Regardless of whether or not the final Menu will use Unity UI, it's important to know if that's the cause of the issue.  If the boundary is correctly set, you must switch back to Adventure Creator *temporarily* to see if the issue persists.  The result of which will help determine where to focus debug efforts.
  • I've just done the snapshots of the Canvas / Rect transform setup. Also the inspector for the Menu Manager.
    I'll be dropping in an AC Inventory next and will update soon.

  • So i replaced the Unity UI Inventory with the 9 Verb demo UI (AC version) and the problem disappears. So it does seem to be Unity UI related. Is there anything else I can provide to assist with debugging?

  • The Nine Verbs demo has a Unity UI variant included (in the latest release, download it again if you don't have it) - what is the result of that?

    Let's also see the Inspector for the Canvas - seeing the Hierarchy is not enough.
  • I've just dropped in the 9verb UI and run a build to Android. It does the same thing. Clicking anywhere on the verb UI activates the hotspot action. Whereas within Windows and the Editor it doesn't. One curious thing I haven't mentioned is if I hold my finger on screen and move it between the verb UI and the hotspot, the verb text only displays the hotspot name when I'm NOT over the verb UI. As soon as my finger crosses into the verb UI, the verb text disappears, as it should. Does the same thing with my Unity UI too. I could add a screenshot of the Inspector for the canvas, but as it's doing it on the 9verb UI, I'm thinking it's not a problem with my canvas? I could maybe package up a version of the game so you can have a fiddle with it? Or if there is anything else I can test? Thanks again Kev
  • edited October 2018
    When changing platform, are you also changing the input method (i.e. to Touch Screen for Android)?

    I don't experience any such issue with the NineVerbs UI template.  The more information you provide, the better chance I have of solving it for you - please don't wait to double-check I need what I ask for.

    If you can provide a cut-down version of your project (one scene, no unnecessary audio/animation assets, etc), by all means PM it to me for me to look at.
  • Honestly Chris, you are an absolute genius!
    I was building it with "Mouse and Keyboard" Input... changed to touchscreen and it worked.

    I don't know how you have time to answer all our questions, but really glad you do.
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.