Set Edge Collider 2D Use Adjacent End Point#
Physics 2D / Collider 2D / Edge Collider 2D / Set Edge Collider 2D Use Adjacent End Point
Description#
Sets the Use Adjacent End Point property of Edge Collider 2D component
Parameters#
| Name | Description |
|---|---|
| Edge Collider 2D | |
| Value |
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("Set Edge Collider 2D Use Adjacent End Point")]
[Category("Physics 2D/Collider 2D/Edge Collider 2D/Use Adjacent End Point")]
[Description("Sets the Use Adjacent End Point property of Edge Collider 2D component")]
[Image(typeof(IconLineStartEnd), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Parameter("Edge Collider 2D")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_EdgeCollider2D_SetUseAdjacentEndPoint : Instruction
{
[SerializeField] private GetGameObject m_EdgeCollider2D = new GetGameObject(
new GenTypeGameObject_EdgeCollider2D()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Use Adjacent End Point");
return $"{this.m_EdgeCollider2D} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
EdgeCollider2D component = this.m_EdgeCollider2D.Get<EdgeCollider2D>(args);
if (component == null) return Done;
component.useAdjacentEndPoint = (bool) this.m_Value.Get(args);
return Done;
}
}
}