The Highlight component's built-in brightness effect occurs by it controlling the "_Color" property of its associated Material. If the sprite involved doesn't have this property, there'll be no visible effect.
To get around this in URP, you can either use Shader Graph to create a new Material that has such a property (and is used to control the sprite's brightness), or use the Highlight component's event hooks to trigger a separate custom effect. For example, this script on the AC wiki provides integration with the Easy Performant Outline asset.
I have another question regarding the highlight, I would like that the FlashHotspots function would highlight every interactable object in the scene without worrying about the interactive boundary. How would I go around this?
To try and investigate this, I had a test 2D project with the highlights working on unity version 2020.3.23f1 and AC version 1.74.5 (using the both the workaround shader and default materials.)
They stopped working when I updated AC to 1.75.3
I made multiple attempts with different materials on different projects and the demos.
This problem only seems to appear on 2D projects. 3D Works fine with all my tests.
I changed the script and it works for the custom shader and both default sprite material and urp unlit-sprite material, but not urp lit materials for sprites or 3D objects.
How does that compare with your encountered behaviour from AC v1.74.5 and v1.75.3?
The issue really comes down to AC trying to predict what material property needs to be controlled - in SRP this is "_Color", while often in HDRP/URP it's "_BaseColor".
I'm considering reverting this back to "_Color" by default, with an override field you can set in the Settings Manager which - if set - will be used instead. Does that sound like a workable approach to you?
I'm considering reverting this back to "_Color" by default, with an override field you can set in the Settings Manager which - if set - will be used instead. Does that sound like a workable approach to you?
Hey Chris - this worked perfectly, but wasn't documented anywhere so it took me a while to track down. I am using the Universal Render Pipeline/Lit Shader. I set the AC Game Creator Settings -> Hotspot Settings -> "Highlight material override" to "_BaseColor", and this worked. Thank you!
My apologies for the hassle. It is covered in the Manual's "Highlight" chapter, but I agree that it should be made more prominent - thanks for bringing it to my attention.
Hi, I'm struggling with the highlight in most of my 3d props. Would it be possible to add a guide in the wiki to know how to add this effect? I saw some tutorials, but they are mainly based on sprites. When I tried to change it to 3D didn't work.
For instance, one of my objects has 5 different materials. I have no clue about what to do next...
Hi Chris, thanks for your help. This is one of the props I'm using.
As I mentioned I'm not sure what should I do. Also, those materials are grayed out, like I cannot tweak them.
Comments
The Highlight component's built-in brightness effect occurs by it controlling the "_Color" property of its associated Material. If the sprite involved doesn't have this property, there'll be no visible effect.
To get around this in URP, you can either use Shader Graph to create a new Material that has such a property (and is used to control the sprite's brightness), or use the Highlight component's event hooks to trigger a separate custom effect. For example, this script on the AC wiki provides integration with the Easy Performant Outline asset.
I'm not a master in coding but for a 3D project I just changed the highlight script line 61
private string colorProperty = "_Color";
to
private string colorProperty = "_BaseColor";
And it works.
I don't know if this:
#if UNITY_2019_3_OR_NEWER if (GraphicsSettings.currentRenderPipeline && GraphicsSettings.currentRenderPipeline.GetType ().ToString ().Contains ("HighDefinition")) { colorProperty = "_BaseColor"; } #endif
Could be modified to include the URP?
I'm not sure how to have similar change for the 2D.
Unsure - IIRC 2D URP is technically separate to "regular" URP. I shall look into it, however.
Ok so I got the Shader Graph material working, does this look correct? I'm not familiar with the subject.
The highlight works as intended with this.
I have another question regarding the highlight, I would like that the FlashHotspots function would highlight every interactable object in the scene without worrying about the interactive boundary. How would I go around this?
Looks good to me.
You can use a custom script that handles the effect manually based on a separate input:
Ah, Thank you!
@Kisuarts unity2021.3.2 The highlight script failed again.
Which script are you referring to - CustomFlashHotspots or the discussed changes to AC's Highlight component?
In AC 1.75.2 and later, URP's Lit shader should react to AC's Highlight effects.
To try and investigate this, I had a test 2D project with the highlights working on unity version 2020.3.23f1 and AC version 1.74.5 (using the both the workaround shader and default materials.)
They stopped working when I updated AC to 1.75.3
I made multiple attempts with different materials on different projects and the demos.
This problem only seems to appear on 2D projects. 3D Works fine with all my tests.
Thanks for the details, @Kisuarts, I will attempt a recreation.
What URP version are you testing with?
As a test, open up AC's Highlight.cs component, and find the line block 88-97:
Replace it with:
Does that resolve it?
I'm using URP version 10.7.0
I changed the script and it works for the custom shader and both default sprite material and urp unlit-sprite material, but not urp lit materials for sprites or 3D objects.
How does that compare with your encountered behaviour from AC v1.74.5 and v1.75.3?
The issue really comes down to AC trying to predict what material property needs to be controlled - in SRP this is "_Color", while often in HDRP/URP it's "_BaseColor".
I'm considering reverting this back to "_Color" by default, with an override field you can set in the Settings Manager which - if set - will be used instead. Does that sound like a workable approach to you?
I think the behavior is pretty much the same if I recall correctly. I believe the approach you suggested is a good way to go.
Hey Chris - this worked perfectly, but wasn't documented anywhere so it took me a while to track down. I am using the Universal Render Pipeline/Lit Shader. I set the AC Game Creator Settings -> Hotspot Settings -> "Highlight material override" to "_BaseColor", and this worked. Thank you!
Welcome to the community, @JakeT.
My apologies for the hassle. It is covered in the Manual's "Highlight" chapter, but I agree that it should be made more prominent - thanks for bringing it to my attention.
Hi, I'm struggling with the highlight in most of my 3d props. Would it be possible to add a guide in the wiki to know how to add this effect? I saw some tutorials, but they are mainly based on sprites. When I tried to change it to 3D didn't work.
For instance, one of my objects has 5 different materials. I have no clue about what to do next...
It's a bit open-ended, as the default effect is based on your render pipeline and material.
What are your AC/Unity versions, what render pipeline are you currently using, and what shader do your Materials use?
If you can also share screenshots of the Highlight component and the Hotspot it's linked to, I'll see if I can spot the issue.
Hi Chris, thanks for your help. This is one of the props I'm using.
![](https://i.imgur.com/l1AmlVP.jpg)
![](https://i.imgur.com/4bcybit.jpg)
![](https://i.imgur.com/MZRKRt8.jpg)
As I mentioned I'm not sure what should I do. Also, those materials are grayed out, like I cannot tweak them.