Distance Joint 2D#
Components / Physics 2D / Joint / Distance Joint 2D
Can Read
Cannot Write
Description#
A direct reference to a Distance Joint 2D component
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
{
[Get]
[Inline(nameof(m_Value), typeof(DistanceJoint2D), true)]
[Title("Distance Joint 2D")]
[Category("Components/Physics 2D/Joint/Distance Joint 2D")]
[Description("A direct reference to a Distance Joint 2D component")]
[Image(typeof(IconCompass), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Serializable]
public class GenTypeGameObject_DistanceJoint2D : TypeGameObject
{
[SerializeField] private DistanceJoint2D m_Value;
public override GameObject GetPreview(GameObject source)
{{
return this.m_Value != null
? this.m_Value.gameObject
: null;
}}
public GenTypeGameObject_DistanceJoint2D()
{ }
public GenTypeGameObject_DistanceJoint2D(DistanceJoint2D component)
{
this.m_Value = component;
}
public override GameObject Get(Args args)
{
return this.m_Value != null
? this.m_Value.gameObject
: null;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(DistanceJoint2D))
{
return this.m_Value != null
? this.m_Value as U
: null;
}
return base.Get<U>(args);
}
public override string ToString()
{
return TextUtils.Name(this.m_Value);
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnEditorChange;
}
}