Unity Mesh Renderer wird nicht vollständig transparent sein

Ich erstelle ein Skript, mit dem Objekte in einem bestimmten Zeitraum ausgeblendet werden können.

Das Skript funktioniert sehr gut, aber wenn ein Objekt ausgeblendet ist, ist es im Inspektor UND im Build immer noch gut sichtbar.

Kann mir jemand erklären warum und wie man ein Objekt komplett unsichtbar macht? (Ich weiß, dass ich das Objekt "aktivieren" kann, aber verbraucht es nicht mehr Ressourcen als Fading? Ich weiß nicht :()

Hier ist der Code, wenn ich einen Fehler gemacht habe (Code inspiriert von einem Thema im Forum von unity)

// Update is called once per frame
void Update () 
{
    MyTime = Time.deltaTime;
    AccumulatedTime += MyTime;
    if (this.name == "Cube (1)")
    {
        Debug.Log(AccumulatedTime);
    }
    if (SwitchVisibility == 1)
    {

        if (AccumulatedTime >= Interval && AccumulatedTime<= 2*Interval || AccumulatedTime >= 3*Interval && AccumulatedTime<= 4*Interval)
        {
            StartCoroutine(FadeTo(0.0f, 1.0f));
            SwitchVisibility = 0;
        }
    }
    if (SwitchVisibility == 0)
    {
        if (AccumulatedTime >= 0 && AccumulatedTime <= Interval || AccumulatedTime >= 2*Interval && AccumulatedTime <= 3*Interval)
        {
            StartCoroutine(FadeTo(1.0f, 1.0f));
            SwitchVisibility = 1;
        }
    }
    if (AccumulatedTime >= Interval * 4.5f)
    {
        AccumulatedTime = 0;
    }
}

IEnumerator FadeTo(float aValue, float aTime)
{
    float alpha = MyRenderer.material.color.a;
    for (float t = 0.0f; t < 1.0f; t += Time.deltaTime / aTime)
    {
        OriginalColor.a = Mathf.Lerp(alpha, aValue, t);
        Color newColor = OriginalColor;
        MyRenderer.material.color = newColor;  
        yield return null;
    }
}

Hier sehen Objekte aus:

Antworten auf die Frage(2)

Ihre Antwort auf die Frage