Distance Joint 2D Auto Configure Distance#
Physics 2D / Joint / Distance Joint 2D / Distance Joint 2D Auto Configure Distance
Description#
Compares the Auto Configure Distance property of Distance Joint 2D component to another value
Parameters#
| Name | Description |
|---|---|
| Distance Joint 2D |
Code#
// <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("Distance Joint 2D Auto Configure Distance")]
[Category("Physics 2D/Joint/Distance Joint 2D/Auto Configure Distance")]
[Description("Compares the Auto Configure Distance property of Distance Joint 2D component to another value")]
[Image(typeof(IconCompass), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Parameter("Distance Joint 2D")]
[Serializable]
public class GenConditionBool_DistanceJoint2D_CheckAutoConfigureDistance : Condition
{
[SerializeField] private GetGameObject m_DistanceJoint2D = new GetGameObject(
new GenTypeGameObject_DistanceJoint2D()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Auto Configure Distance");
return $"{this.m_DistanceJoint2D} {member}";
}
protected override bool Run(Args args)
{
DistanceJoint2D component = this.m_DistanceJoint2D.Get<DistanceJoint2D>(args);
if (component == null) return false;
return component.autoConfigureDistance;
}
}
}