Forum rules - please read before posting.

Hilight icons of different sizes?

Hi is it possible to have the icon for hilight hotspot as either 3 different sizes or use 3 different sprites? I can only see one place to add the graphic in the hotspot settings and there is only one size setting, I tried scaling the hotspot itself (I am using a separate one just for the hilight icon itself) and that didn't change anything, I also tried creating three different sprites and dropping them into the 'object to hilight' box of each hotspot but it seems to always only be using the one from the settings. If I change the hotspot icon type to 'Use Icon' it changes to the wrong one completely, in my case 'walk' any suggestions would be great.

Comments

  • edited June 25

    "Use Icon" will cause it to refer to the icon mapped to the first "Use interaction" defined in each Hotspot's Inspector.

    What would be the "rule" that determines what icon/size shows for a given Hotspot? Would each Hotspot have their own fixed icon that gets shown, or would the same Hotspot be able to show a different icon based on e.g. distance from camera?

  • edited June 26

    Thanks for the reply Chris, I think in my case the best thing would be to have each hotspot be linked to it's own hilight icon individually, they wouldn't ever need to change. Quick explanation of my scene..I have hotspots on items in the room that have their own interactions, and then I have completely separate hotspots that are not clickable and they are the ones that display the hilight icon, but I wanted to maybe somehow have each one display the same icon (a question mark) at three different sizes. My game is 2D but when I press space to hilight, all the magnifying glasses are the same size, if some are in the foreground they look tiny compared to the ones in the back even though they are the exact same size, optical illusion kind of thing but looks bad :( So ideally I would like to have a background version a midground and a foreground so that they look like they are closer or further away in the scene

  • Hotspot icons can optionally be set to render in World Space - so if you use a Perspective camera then ones further away will be drawn smaller.

    However, if you set the icon type to "Use Icon", you can attach a custom script to a Hotspot to override which texture is shown:

    using UnityEngine;
    using AC;
    
    public class OverrideHotspotIcon : MonoBehaviour
    {
    
        public Texture overrideTexture;
    
        private void Start ()
        {
            GetComponent<Hotspot> ().GetMainIcon ().ReplaceTexture (overrideTexture);
        }
    
    }
    
  • Perfect, thank you Chris!

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.