---
tags:
    - "Physics, 2D"
---

# Wheel Joint 2D Use Motor

[Physics 2D](../../index.md) / [Joint](../index.md) / [Wheel Joint 2D](index.md) / **Wheel Joint 2D Use Motor**

## Description

Compares the Use Motor property of Wheel Joint 2D component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Wheel Joint 2D |  |

## 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("Wheel Joint 2D Use Motor")]
    [Category("Physics 2D/Joint/Wheel Joint 2D/Use Motor")]
    [Description("Compares the Use Motor property of Wheel Joint 2D component to another value")]
    
    [Image(typeof(IconWheel), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]
    
    [Parameter("Wheel Joint 2D")]
    
    [Serializable]
    public class GenConditionBool_WheelJoint2D_CheckUseMotor : Condition
    {
        [SerializeField] private GetGameObject m_WheelJoint2D = new GetGameObject(
            new GenTypeGameObject_WheelJoint2D()
        );
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Use Motor");
            return $"{this.m_WheelJoint2D} {member}";
        }
        
        protected override bool Run(Args args)
        {
            WheelJoint2D component = this.m_WheelJoint2D.Get<WheelJoint2D>(args);
            if (component == null) return false;
            
            return component.useMotor;
        }
    }
}


```

