How to get name of animator controller

Hello I am just trying to get the name of the animator controller on a model but this code just returns the avatar name instead.
For instance if I wanted to be able to slot in a animator controller through public expose in code;

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

public class crawl : MonoBehaviour
{ public Animator anim;
    // Start is called before the first frame update
 
    void Start()
    {
        anim=GetComponent<Animator>();
    Debug.Log(anim );
  
    }

    // Update is called once per frame
    void Update()
    {
      
    }
}

anim.runtimeAnimatorController.name

1 Like

Aha thx.