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

# Animator Gravity Weight

[Animation](../index.md) / [Animator](index.md) / **Animator Gravity Weight**

## Description

Compares the Gravity Weight property of Animator component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Animator |  |
| 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 Gravity Weight")]
    [Category("Animation/Animator/Gravity Weight")]
    [Description("Compares the Gravity Weight property of Animator component to another value")]
    
    [Image(typeof(IconAnimator), ColorTheme.Type.Teal)]
    [Keywords("Animation, Clip, Play, Animate")]
    
    [Parameter("Animator")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionNumber_Animator_CheckGravityWeight : Condition
    {
        [SerializeField] private GetGameObject m_Animator = new GetGameObject(
            new GenTypeGameObject_Animator()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Gravity Weight");
            return $"{this.m_Animator} {member} {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;
            
            return this.m_Compare.Compare(component.gravityWeight, (float) this.m_Value.Get(args));
        }
    }
}


```

