Forum rules - please read before posting.

Custom Hotspot Menu - How do I tell AC which Hotspot menu to use?

Hi everyone,

Apologies if this is really obvious and dumb. But if I want to make a custom Hotspot menu yet keep the original just in case (and I copy it and then make some design changes like font and background texture), how and where do I tell AC to reference the new hotspot menu instead of the original?

Thanks for your help!

Comments

  • Locking a menu will prevent it from showing when it does normally given its Appear type property. A menu can be locked by default by checking Start game locked off?.

    Of course, you can always delete the original Hotspot menu and bring it back later by copying it over from the Default_MenuManager asset file. To do that, just set your Menu Manager asset file to that, copy the Hotspot menu, set the asset file back to your own, and paste it back in.

  • edited August 2019

    Alright, so, same principle but with Inventories:

    I made a custom Unity UI Inventory menu (Inventory_New) and I** started game locked off** with the original Inventory, but when I add an item to Inventory and click yes, Carry on start? it doesn't appear in my new Inventory, it appears in the original.

    Even when I delete the original and rename my new inventory "Inventory" it doesn't register any Inventory items.

    But as soon as I copy the default back in, even as Inventory_Copy, it will carry the item on start.

    What am I missing about how menus work in AC? Does the order in the Menu Manager matter? The manual says "Draw ordering between menus can only be set for those that use the same drawing mode. AC menus are drawn in order of their listing in the Menu Manager, while Unity UI menus rely on the Sort Order values in their Canvas components. AC menus will always appear above Unity UI ones." (333).

  • Inventory items aren't added to menus, exactly - it's just that menus are used to display them. It should be the case that both inventory menus display the added item.

    It sounds like the Inventory_New menu hasn't been correctly configured, but we'll need to see screenshots showing both it's Menu Manager properties, and the UI Canvas prefab itself, to see what's wrong.

    Bear in mind that AC's default Inventory menu also has a Unity UI counterpart, which can be enabled by changing its Source to Unity UI Prefab. It may be easier to modify that instead of creating one from scratch.

    A tutorial on converting an "AC" Inventory menu to Unity UI can be found here.

  • I've followed the tutorial (several times) and now I got the Carry on Start item to show in both inventories. However, the individual slots in the new Inventory aren't visible (which I'm starting to suspect they aren't supposed to be). Couple questions come to mind --

    1. Is it necessary to make UI prefabs in a new scene, or can they be created in an open scene? Further, the inventories (default or otherwise) only work after I've chosen With or Without folders in the new scene, I noticed.

    2. How could I make the slot buttons visible against a transparent panel/rect? Like in this screenshot, for instance, if I wanted to have individual boxes for items instead of a bar.

    Thanks, Chris et al. Learning now means less posting later!

  • Oh, and re: modding the AC default, that's something I want to try. But when I change the source from Adventure Creator to Unity UI Prefab, it just disappears from my Game window. How can I access the prefab to modify it?

    "Bear in mind that AC's default Inventory menu also has a Unity UI counterpart, which can be enabled by changing its Source to Unity UI Prefab. It may be easier to modify that instead of creating one from scratch."

  • the individual slots in the new Inventory aren't visible (which I'm starting to suspect they aren't supposed to be).

    You're referring to empty slots, i.e. those without items in them? You can configure the element's When slot is empty field to have it clear the slot's content as opposed to hiding it completely.

    Is it necessary to make UI prefabs in a new scene, or can they be created in an open scene? Further, the inventories (default or otherwise) only work after I've chosen With or Without folders in the new scene, I noticed.

    Where you make a UI prefab should have no bearing on its behaviour, since the prefab itself is ultimately removed from the scene so that it can be spawned in at runtime. The menu itself will only show at runtime if the scene is an "AC scene".

    How could I make the slot buttons visible against a transparent panel/rect? Like in this screenshot, for instance, if I wanted to have individual boxes for items instead of a bar.

    You can add such boxes as separate Image components to your UI Canvas and not connect them to AC's Menu Manager.

    The last screenshot doesn't show any "save" icons in the Hierarchy, so it doesn't look like anything there is connected to the Menu Manager. However, AC will replace the "white box" image with inventory item graphics, so any additional background art has to be added on as a separate GameObject.

    Oh, and re: modding the AC default, that's something I want to try. But when I change the source from Adventure Creator to Unity UI Prefab, it just disappears from my Game window. How can I access the prefab to modify it?

    Default Canvas prefabs are found in the 'UI' directory of the game folder that was created by the New Game Wizard. You can also access it via the Linked Canvas Menu property that appears when you switch the Source to Unity UI.

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.