---
tags:
    - "Animation, Clip, Play, Animate"
---

# Animator Get Current Animator Clip Info Count

[Animation](../index.md) / [Animator](index.md) / **Animator Get Current Animator Clip Info Count**

## Description

Compares the Get Current Animator Clip Info Count method of Animator component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Animator |  |
| Layer Index |  |
| Compare |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Title("Animator Get Current Animator Clip Info Count")]
    [Category("Animation/Animator/Get Current Animator Clip Info Count")]
    [Description("Compares the Get Current Animator Clip Info Count method of Animator component to another value")]
    
    [Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
    [Keywords("Animation, Clip, Play, Animate")]
    
    [Parameter("Animator")]
    [Parameter("Layer Index")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionInteger_Animator_CheckGetCurrentAnimatorClipInfoCount_1 : Condition
    {
        [SerializeField] private GetGameObject m_Animator = new GetGameObject(
            new GenTypeGameObject_Animator()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetInteger m_Value = new GetInteger();
        
        [SerializeField] private GetInteger m_LayerIndex = new GetInteger();
        
        protected override string GetTitle(GameObject source)
        {
            string method = TextUtils.ThemeAsKeyword("Get Current Animator Clip Info Count");
            string parameters = $"({this.m_LayerIndex})";
            return $"{this.m_Animator} {method} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            Animator component = this.m_Animator.Get<Animator>(args);
            if (component == null) return false;
            
            int value = component.GetCurrentAnimatorClipInfoCount(
                (int) this.m_LayerIndex.Get(args)
            );
            
            return this.m_Compare.Compare(value, (int) this.m_Value.Get(args));
        }
    }
}


```

