We have an object whose material is changed during runtime. We don't use highlighters at all, but since VRTK adds one by default, it causes the material on this specific object to misbehave (see link below). As a workaround we have to add a highlighter and set it as not active.
An interactable object without a highlighter shouldn't glitch like that.
Arguably it's a bug with highlighter since I don't remember that happening the first time I added VRTK to the project, but nevertheless I'd find it cleaner if VRTK didn't add highlighter if it wasn't told to.
VRTK only adds a default highlighter if you specify a highlight colour
Just specify the colour as Color.clear or #00000000 and you won't get a highlighter.
If you're on 3.3.0-alpha then you need to add a VRTK_InteractObjectHighlighter to get highlighting anyway.
If you're automatically getting one of those it means the deprecated Touch Highlight Color paramter on your intereactable object is still set to something that isn't Color.clear
Uncomment the [HideInInspector] bit in the Interactable Object script and check to see if you have a colour set.
[Tooltip("The Color to highlight the object when it is touched.")]
[HideInInspector]
public Color touchHighlightColor = Color.clear;
The documentation does not say a highlighter will be created all the time, the highlighter is listed as an optional component, not a required component.
I'm adding the component from code, but I've double-checked - it's clear.
Add an interactable object to any game object, run the scene you don't get a highlighter by default
It's because it's removed in OnDisable, and it has disableWhenIdle = true by default. If you reach with the controller the Material Highlighter component appears.
Yeah i see it now, that's why it's always good to follow the issue template and create steps to reproduce.
PR with fix: https://github.com/thestonefox/VRTK/pull/1548