Polygon Collider 2D Auto Tiling#
Physics 2D / Collider 2D / Polygon Collider 2D / Polygon Collider 2D Auto Tiling
Can Read
Can Write
Description#
The Auto Tiling property of the Polygon 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]
[Set]
[Title("Polygon Collider 2D Auto Tiling")]
[Category("Physics 2D/Collider 2D/Polygon Collider 2D/Auto Tiling")]
[Description("The Auto Tiling property of the Polygon Collider 2D component")]
[Image(typeof(IconPentagonOutline), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Serializable]
public class GenTypeBool_PolygonCollider2D_AutoTiling : TypeBool
{
[SerializeField] private GetGameObject m_PolygonCollider2D = new GetGameObject(
new GenTypeGameObject_PolygonCollider2D()
);
public override bool GetPreview(GameObject source)
{
GameObject instance = this.m_PolygonCollider2D.GetPreview(source);
if (instance == null) return default;
PolygonCollider2D component = instance.GetComponent<PolygonCollider2D>();
return component != null ? component.autoTiling : default;
}
public override bool Get(Args args)
{
PolygonCollider2D instance = this.m_PolygonCollider2D.Get<PolygonCollider2D>(args);
return instance != null
? instance.autoTiling
: default;
}
public override void Set(bool value, Args args)
{
PolygonCollider2D component = this.m_PolygonCollider2D.Get<PolygonCollider2D>(args);
if (component != null) component.autoTiling = (bool) value;
}
public override string ToString()
{
return $"{this.m_PolygonCollider2D} Auto Tiling";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}