Hi,
I would like to be able to press a button and then have all the interaction modes of my hotspots change to single click options rather than the click then select interaction I'm using.
I thought about maybe hiding all current hotspots and having a seperate set appear with the "single use interaction" option checked. Having looked into this though it seems like I'd have to have an action list that hides every single hotspot in the scene by name and then shows the second set individually by name.
I was wondering if there's either a way to hide/unhide hotspots based on a layer tag or if there's just a better way to do this in general?
I would also like to change the cursor icon while in the 2nd mode, is there a way to do this?
Thanks.
Comments
but you could call a script with a for loop that goes through each of the hotspots and sets it via code.
Im not into all the AC scripting, so cant help with that, but would be something like AC.Kickstarter.something at a guess...
public void SwitchHotspots (bool state)
{
AC.Hotspot[] hotspots = FindObjectsOfType (typeof (AC.Hotspot)) as AC.Hotspot[];
foreach (AC.Hotspot hotspot in hotspots)
{
if (hotspot.oneClick == state)
{
hotspot.TurnOff ();
}
else
{
hotspot.TurnOn ();
}
}
}
The icon over Hotspots can be set in the Hotspot settings near the bottom of the Settings Manager.
Hotspot cursor icons are stored in CursorManager's cursorIcons List:
AC.KickStarter.cursorManager.cursorIcons;
Each CursorIcon has a texture variable, that you can set through script, eg:
AC.KickStarter.cursorManager.cursorIcons[0].texture = myTexture;
using AC;
public Texture2D AimTexture;
You'll then be able to assign it in your scripts Inspector.
Bear in mind, though, that you should ask general scripting questions on the official Unity forum - they're better equipped to help.