Hi Chris, been a while since I've played with AC. Wondering if it's possible to always show the interaction options, as opposed to the hotspot icon. EG persistant "talk/look at".
I'm thinking of a hack where I cycle through the enabled hotspots on scene load and send enable interaction menus, but feel like there might be a simpler way.
Thanks
Sam
Comments
However, such menus are still intended to be open for one Hotspot at a time - since menus aren't necessary for all methods, there's a separation between the active interaction data and the menu that actually displays it. To prevent errors, calling the method above will automatically close any other Interaction menu that is currently open.
There's a couple of ways you could go about it:
1) Create a new instance of your Interaction menu, run its MatchInteractions method to sync it to your given Hotspot, and turn it on manually. This can be done with:
Menu originalMenu = PlayerMenus.GetMenuWithName ("Interaction");
Menu newMenu = ScriptableObject.CreateInstance <Menu>();
newMenu.Copy (originalMenu, false);
newMenu.LoadUnityUI ();
newMenu.Recalculate ();
newMenu.Initalise ();
newMenu.MatchInteractions (myHotspot);
newMenu.TurnOn ();
2) Write a totally custom system for showing Interactions in a UI, and pull from the Hotspot's useButtons List directly to determine what icons to show. This'd be more complicated, but would ensure you have full control.
In both cases, you'd want to hook into the OnHotspotSelect custom event, which runs every time a new Hotspot is selected and gives you access to that Hotspot. An example of this can be found here.