The author uses the V4.0 version, which is very convenient to use.
1. Add highlighter script to objects that need to produce a highlight effect
2. Add a Highlightingrenderer script to the camera
3. Write your own control script and call the corresponding function in the highlighter script.
If you want to set the color yourself, you just need to add the parameters using the overload
Here is the script I wrote, hanging on the target object
Need to add physics Raycaster components to the camera
When the camera is seen, the target object is highlighted
Using Unityengine;
Using System.Collections;
Using Unityengine.eventsystems;
Using System;
namespace Highlightingsystem//must have, namespace
{
public class Eaychoose:monobehaviour, Ipointerenterhandler, Ipointerexithandler
{
public highlighter m_highlighter;
void Start ()
{
M_transform = This.transform;
M_highlighter = M_transform. Getcomponent}
public void Onpointerenter (Pointereventdata eventData)
{
Starthighlight ();
}
public void Onpointerexit (Pointereventdata eventData)
{
Endhighlight ();
}
void Starthighlight ()
{
M_highlighter. Flashingon ();//Call the start Highlight function of the Highlighte script
}
void Endhighlight ()
{
M_highlighter. Flashingoff ();//Call the end highlight function of the Highlighte script
}
}
}
When using this plugin, it is found that some machines need to set Edit/graphics emulations to No Emulation
Otherwise, the overall highlighting error will occur.
However, this may not be possible with Android2.0 below
There is another problem the author did not solve: split screen when, sometimes only a camera to produce a highlight effect, do not know how to solve
I hope the comrades can enlighten me.
The problem is solved, the previous call is the Flashingon () function, instead of calling Constanton (), no highlighting effect, but also barely able to achieve the desired effect
Also found a "solution" scenario, which reduces the chance of single rendering, and sometimes the single-screen rendering, but retains the expected shiny effect:
method is to set the highlighting render method of the camera to true when needed, and set to False when it is not required.