Forum rules - please read before posting.

Problems with hotspot over GUI and within screen boundaries

edited September 2019 in Technical Q&A

Hi,
I've got two problems with hotspots, and can't seem to find a solution.

1) I have a map screen in the game, and I want to display a hotspot over each of the buttons (or essentially over location icon). To achieve this, I thought I can use Hotspot label override: in the button options, but the effect is that the hotspot only appears in one static place, for all buttons on this GUI. Instead, I would like it to appear over each button.

The GUI I'm using is a Unity prefab and it is linked to AC Menus.

2) I recently realised that my Hotspots can appear off screen. Especially when hovering over inventory items (items close to screen edge have their hotspot name partially off screen). Again, I'm using Unity prefab for this GUI which is linked to the AC menu. I also have used and set RectTransform boundary: which is a Unity UI Panel of the size of the screen. I hoped that the hotspots would stay within this boundary, but that's not the case.

I'm not sure what I'm missing in both cases. Any ideas or pointers greatly appreciated! Thank you!

AC Version: 1.68.4
Unity: 2018.2.18f1

Comments

  • I thought I can use Hotspot label override: in the button options, but the effect is that the hotspot only appears in one static place, for all buttons on this GUI. Instead, I would like it to appear over each button.

    The Hotspot label override only affects the text within your Hotspot label element - not where it's position is. To have this follow the cursor, set the Menu's Position type field to Follow Cursor.

    If this is different to the way you normally have your Hotspot menu positioned, you can either set this through script (right-click the field's label to get an API reference to it), or lock/unlock a pair of Hotspot menus with different position types accordingly. It may be worth considering use of regular scene Hotspots for your map screen, however.

    I recently realised that my Hotspots can appear off screen.

    You're referring to the Hotspot label menu, not actual Hotspots themselves? Check Always fit within screen? in the Menu's properties, and assign a RectTransform boundary that covers the area of the label itself - not the screen.

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.