'Unity AR Animation doesn't convert to GameObject

Hello i'm coding an AR application but i have this type of error in Unity so i'm confused what i'm need to change. May you explain me how to solve this problem?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WatchSelect : MonoBehaviour
{

    public GameObject watchModel1;
    public GameObject watchModel2;
    public GameObject watchModel3;

    public GameObject w1Window;
    public GameObject w2Window;
    public GameObject w3Window;

    
    Animation w1WindowAnimation;
    Animation w2WindowAnimation;
    Animation w3WindowAnimation;


    // Start is called before the first frame update
    void Start()
    {
       w1Window = w1Window.GetComponent<Animation>();
       w2Window = w1Window.GetComponent<Animation>();
       w3Window = w1Window.GetComponent<Animation>();
    }


    public void WatchOneButtonClicked()
    {
        // Showing watch 1 model on user's wrist
        watchModel1.SetActive(true);
        watchModel2.SetActive(false);
        watchModel3.SetActive(false);

        // Animating watch 1 window
        w1WindowAnimation["w1animation"].speed = 1;
        w1WindowAnimation.Play();
    }

    public void WatchTwoButtonClicked()
    {
        // Showing watch 2 model on user's wrist
        watchModel1.SetActive(false);
        watchModel2.SetActive(true);
        watchModel3.SetActive(false);

        // Animating watch 2 window
        w2WindowAnimation["w2animation"].speed = 1;
        w2WindowAnimation.Play();
    }

    public void WatchThreeButtonClicked()
    {
        // Showing watch 3 model on user's wrist
        watchModel1.SetActive(false);
        watchModel2.SetActive(false);
        watchModel3.SetActive(true);

        // Animating watch 3 window
        w3WindowAnimation["w3animation"].speed = 1;
        w3WindowAnimation.Play();
    }

}

error messages



Solution 1:[1]

There are several ways to predefine and keep such test data.

  1. You can keep it in some external file. It can be JSON, XML or plain text formatted file.
  2. It may be kept in some resource C# class file inside the project.
  3. It can be kept in some kind of DB etc.
    Actual implementation of how to read this data will vary according to the way you decided to keep the test data, according to your project structure etc. There are several best practices how to do that, not only one way to do that.
    There are also several ways to run such tests. You can learn about these best practices on many online tutorials and other resources.

Solution 2:[2]

For that purpose you should use multiple different ways to keep test data.

1- Kept in the resources folder of the project for example in
   properties file. 
2- Kept data in DB and read from there while
   needed.  
3- Kept in some external sources and read/retrieve if from
   there.

Note: Should use that method which will be convenient for you later on.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Prophet
Solution 2 Muhammad Farooq