Hi there,
Is there a way for the hotspot detection method "Player Vicinity" to display not just the use icon or a fixed texture at the hotspot, but a different icon? I would like to set different icons for different hotspots.
Long version:
I'm working on a mobile game with input method "Touch Screen", interaction method "Context Sensitive" and hotspot detection method "Player Vicinity" and Highlight at the hotspot. Everything is working great so far, when the player comes to a hotspot, the use icon or a texture is displayed.
But I want to display a different icon at some hotspots. For example: the default is the use icon, but at some hotspots I want the "talk to" icon or the "look at" icon.
Under Settings > Hotspots > Hotspot icon type you can only choose between the "use icon" or a fixed texture. If I have selected something other than "use" as the hotspot interaction, no icon is displayed.
I've already tried using a custom script. However, I can assign a cursor icon to the hotspot button, but if it is not "Use", it is not displayed for the reason above.
And this replaces the use icon globally for all hotspots:
AC.KickStarter.cursorManager.cursorIcons[0].ReplaceTexture(newIconTexture);
I can't find the right object where I can just change the texture on the highlighted hotspot.
Does anyone have an idea how to do this?
AC Version: 1.79.3
Unity: 2022.3.18
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Gou.
A custom script should not be necessary - the "Use Icon" refers to the icon of each Hotspot's first-enabled "Use interaction", which should be "Look at" in your provided screenshot.
Try opening AC's Hotspot script and look for the GenerateMainIcon function (around line 1464). Inside that, remove the code block:
If that makes no difference, share your uncropped Settings Manager and I'll try to see what's what.
Hello Chris, thank you for the quick reply.
It works as you described. Without any changes to the source code. The icon of the first interaction is displayed. Thanks for the explanation.
My look icon was set to the wrong size in the cursor manager. It was too small to see. My mistake, big sorry.
And thank you for the warm welcome.