Hi guys,
I know that there is a way to have the Hotspots always shown in a "soft" way, where they are always there but kind of transparent, as the default. But now, I would like that when holding the finger on the screen the HS Icons are changed to a stronger, brighter, bigger version that are easier to spot. Is there a way to implement this for mobile?
Thanks for any suggestions. If I have missed an already existing topic i'm sorry!
Robert
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
For the input side of the issue, this script on the AC wiki can be adapted to work with touch-screen input.
Try this:
This will cause the Hotspot "flash" effect to kick in while holding a finger down, but you'll need to assign a Highlight component to each Hotspot. What effect this has visually can be altered (through scripting if necessary), but see if this sorts out the input side of things first.
Oof, I'm still kind of hestitant to get into the actual scripting/coding stuff but I'll try to figure it out the basics in the next days and then work with your suggestions and get back if I still have any questions!
Thank you very much!
Hi Chris,
I managed to get the Hotspots to flash on a specific button press with the method described in the AC Wiki, defining "FlashHold" Input in the (old) Input Manager, however, if I change the script to your suggestion, nothing happens anymore :-(.
I did change mouse input to simulate touch input, but it still does nothing.
Do you think I could use the script from the AC Wiki, and then in the new Input Manager System define a "FlashHold" Input?
Because I know that there I can easily define the touch inputs... I just don't know how to tell Unity/AC that it's supposed to be the "FlashHold" Input.
Any suggestions?
The script on the wiki uses Input.GetButtonDown/Up - if you're on touch-screen, you don't need to use that and can instead use Input.touchCount:
That's essentially what the modified script above does - but it'll only take effect when built to mobile. You can incorporate both - so that you can test in the Editor with FlashHold by replacing the above's Update function with:
This assumes you're using Unity's Input Manager system, however. By "new Input Manager System" are you referring to Input System?
Try switching back to the old input manager - or at least allowing "Both" in Unity's Player settings - before incorporating Input System, to check that the script's behaviour is as you want first. Is it giving the proper intended behaviour otherwise?
Hmm so with the new script I can get the button that I defined in the input manager to flash the Hotspots but when I click with the mouse on the screen it still doesnt do anything. Am I doing something wrong? Does the mouseclick not simulate a touchpress? I activated the option to simulate touch in the debugger and also changed to build to IOS, still not working...
Is this an issue in builds, or only the Editor?
In the Input Manager, you can set the input's Positive Button field to mouse 0 to have left-clicks trigger the input.
The code above separates the inputs, so that only touches are recognised in the build. This version should allow both types at all times: