using UnityEngine; public class HomeTestScript : MonoBehaviour { // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { GameObject dog = GameObject.Find("dog"); Animator animator = dog.GetComponent(); animator.Play("sleep2"); //animator.SetBool("isSleep", true); } // Update is called once per frame void Update() { } }