Q:

How to glance at items and make them glow gradually and individually? (Unity3d c#)

Suppose maximum brightness of an item is 100% and vice versa. When I glance at one of them, the item should be gradually brightening up from 0% to 100%. So when I look away halfway of the brightening, the object will slowly dim back to 0%. When I glance back again, the brightening will just resume. I am using Color.Lerp for my brightening and dimming back down.
Each item has their own individual pace of brightening and dimming back down even when they are gathered in a very tight space.
Assume that Item A, B, C, D and E arranged tightly beside each other in order. Hence, I glance at Item A which its brightness has reached to 80% and I immediately shift through B,C and D then stop and glance at E to reach its maximum brightness. In this scenario, A should be dimming back down, while B, C and D brightens up a little bit. Then E will be brightening to the max. How do I achieve this no matter how many items I have on the spot? I am having problem with updating the info of current item and keeping the info of previous item.
The code works well on a single item AND ALSO glancing back and forth between two items. But when there are three or more objects involved, the codes just doesn't work anymore. 
Scripts are as below:

Raycast to detect items

public class RaycastSelection : MonoBehaviour
{

    RaycastHit hit;

    Ray ray;

    public GameObject currentObject;
    public GameObject previousObject;
    public GameObject lastPreviousObject;
    public GameObject lastObject;

    private bool saveObjectOnce = false;
    private bool isFading = false;
    private bool fadeOnce = false;

    private ColorFade colorFading;
    private ColorFade colorFading1;
    private ColorFade colorFading2;

    public void Start()
    {
        colorFading = GameObject.FindWithTag("Puzzle").GetComponent<ColorFade>();
        colorFading1 = GameObject.FindWithTag("Clue").GetComponent<ColorFade>();
        colorFading2 = GameObject.FindWithTag("Selectable").GetComponent<ColorFade>();

    }

    public void Update()
    {
        ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        Vector3 forward = Camera.main.transform.TransformDirection(Vector3.forward) * 10;
        Debug.DrawRay(Camera.main.transform.position, forward, Color.red);

        //if player is looking
        if (Physics.Raycast(ray, out hit))
        {
            var selection = hit.transform;
            if (selection.CompareTag("Puzzle") || selection.CompareTag("Clue") || selection.CompareTag("Selectable"))
            {
                //if it is first time looking at object
                if(currentObject == null)
                {
                    currentObject = hit.transform.gameObject;
                }
                //if it is second time looking at object
                else
                {
                    if (saveObjectOnce == false)
                    {
                        previousObject = currentObject;
                        saveObjectOnce = true;
                    }
                    currentObject = hit.transform.gameObject;
                }

                //if previous and current object are same
                if(string.Equals(currentObject, previousObject))
                {
                        isFading = true;

                        ColorFade fadingColor = currentObject.GetComponent<ColorFade>();
                        fadingColor.FadeCheck(isFading);

                    if (lastPreviousObject != null)
                    {
                        isFading = false;
                        ColorFade fadingcolor = lastPreviousObject.GetComponent<ColorFade>();
                        fadingcolor.FadeCheck(isFading);
                    }

                }
                //if previous and current object are different
                else
                {
                    lastPreviousObject = previousObject;
                    previousObject = currentObject;
                }
            }
            //if detects other objects than the items
            else
            {
                lastObject = currentObject;

                isFading = false;

                if (lastObject != null)
                {
                    ColorFade fadingColor = lastObject.GetComponent<ColorFade>();
                    fadingColor.FadeCheck(isFading);
                }

            }
        }
        //if the player is not looking 
        else
        {
            lastObject = currentObject;
            if (lastObject != null)
            {
                ColorFade fadingColor = lastObject.GetComponent<ColorFade>();
                fadingColor.FadeCheck(isFading);
            }

        }
    }
}

Changing brightness of the item (This script is attached to each item individually)

public class ColorFade : MonoBehaviour
{

    [SerializeField] private bool saveColorOnce = false;
    [SerializeField] private Transform thisObject;

    [SerializeField] private Color startColor;
    [SerializeField] private Color EndColor;

    [SerializeField] private float lerpFadeTime = 0f;

    private void Start()
    {
        startColor = this.transform.GetComponent<Renderer>().material.color;
        thisObject = this.transform;
    }

    public void Update()
    {

    }

    public void FadeCheck(bool fadingStatus)
    {
        if(fadingStatus == true)
        {
            FadeIn();
        }
        else
        {
            FadeOut();
        }

    }

    private void FadeIn()
    { 
            Debug.Log(this.transform.gameObject.name);
            Debug.Log("FadeIn");

            lerpFadeTime += Time.deltaTime / 3f;

            thisObject.GetComponent<Renderer>().material.color = Color.Lerp(startColor, EndColor, lerpFadeTime);

            if(lerpFadeTime >= 1f)
            {
                lerpFadeTime = 1f;
            }
    }

    private void FadeOut()
    {
            Debug.Log(this.transform.gameObject.name);
            Debug.Log("FadeOut");

            lerpFadeTime -= Time.deltaTime / 3f;

            thisObject.GetComponent<Renderer>().material.color = Color.Lerp(startColor, EndColor, lerpFadeTime);

            if (lerpFadeTime <= 0f)
            {
                lerpFadeTime = 0f;
            }
    }
}

A:

I would suggest Coroutines which are most of the times better to control than using complex Update methods with timers, states and bools.
public class RaycastSelection : MonoBehaviour
{
    [Header("Components")]

    // reference this via the Inspector already if possible
    [SerializeField] private Camera camera;

    [Header("Debug")]

    [SerializeField] private ColorFade lastFaderHit;

    private void Awake()
    {
        if (!camera) camera = Camera.main;
    }

    private void Update()
    {
        RaycastHit hit;
        if (Physics.Raycast(camera.ScreenPointToRay(Input.mousePosition), out hit))
        {
            // if hitting same object do nothing
            if (lastFaderHit && hit.transform == lastFaderHit.transform) return;

            // if looking on different object start fade out previous if exists
            lastFaderHit?.FadeOut();

            // start fade in current
            var current = hit.transform.GetComponent<ColorFade>();
            current?.FadeIn();

            // update previous hit
            lastFaderHit = current;
        }
        else
        {
            // if looking at nothing start fadeout previous hit if exists
            lastFaderHit?.FadeOut();

            // reset previous hit
            lastFaderHit = null;
        }
    }
}

and in ColorFade use coroutines like
public class ColorFade : MonoBehaviour
{
    [Header("Components")]
    // reference this in the Inspector if possible
    [SerializeField] private Renderer renderer;

    [Header("Settings")]

    [SerializeField] private Color startColor;
    [SerializeField] private Color EndColor;

    // fade duration for a complete 0-100 fade
    // fading will be shorter if only fading parts
    [SerializeField] private float fadeDuration = 1f;

    [Header("Debug")]

    [SerializeField] [Range(0f, 1f)] private float currentFade;

    private void Awake()
    {
        if (!renderer) renderer = GetComponent<Renderer>();
        startColor = renderer.material.color;
    }

    public void FadeIn()
    {
        // avoid concurrent routines
        StopAllCoroutines();

        StartCoroutine(FadeTowards(1));
    }

    public void FadeOut()
    {
        // avoid concurrent routines
        StopAllCoroutines();

        StartCoroutine(FadeTowards(0));
    }

    private IEnumerator FadeTowards(float targetFade)
    {
        while (!Mathf.Approximately(currentFade, targetFade))
        {
            // increase or decrease the currentFade according to the fade speed
            if (currentFade < targetFade)
                currentFade += Time.deltaTime / fadeDuration;
            else
                currentFade -= Time.deltaTime / fadeDuration;

            // if you like you could even add some ease-in and ease-out here
            //var lerpFactor = Mathf.SmoothStep(0, 1, currentFade);

            renderer.material.color = Color.Lerp(startColor, EndColor, currentFade /*or lerpFactor for eased fading*/);

            // let this frame be rendered and continue from this point
            // in the next frame
            yield return null;
        }
    }
}

