Composite Collider 2D Get Path Point Count#
Physics 2D / Collider 2D / Composite Collider 2D / Composite Collider 2D Get Path Point Count
Can Read
Cannot Write
Description#
Returns the execution of Get Path Point Count method on the Composite Collider 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]
[Title("Composite Collider 2D Get Path Point Count")]
[Category("Physics 2D/Collider 2D/Composite Collider 2D/Get Path Point Count")]
[Description("Returns the execution of Get Path Point Count method on the Composite Collider 2D component")]
[Image(typeof(IconComposition), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Serializable]
public class GenTypeInteger_CompositeCollider2D_GetPathPointCount_1 : TypeNumber
{
[SerializeField] private GetGameObject m_CompositeCollider2D = new GetGameObject(
new GenTypeGameObject_CompositeCollider2D()
);
[SerializeField] private GetInteger m_Index = new GetInteger();
public override double Get(Args args)
{
CompositeCollider2D component = this.m_CompositeCollider2D.Get<CompositeCollider2D>(args);
if (component == null) return default;
double value = (double) component.GetPathPointCount(
(int) this.m_Index.Get(args)
);
return value;
}
public override string ToString()
{
return $"{this.m_CompositeCollider2D} Get Path Point Count ({this.m_Index})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}