Set Box Collider 2D Auto Tiling#
Physics 2D / Collider 2D / Box Collider 2D / Set Box Collider 2D Auto Tiling
Description#
Sets the Auto Tiling property of Box Collider 2D component
Parameters#
| Name | Description |
|---|---|
| Box 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 Box Collider 2D Auto Tiling")]
[Category("Physics 2D/Collider 2D/Box Collider 2D/Auto Tiling")]
[Description("Sets the Auto Tiling property of Box Collider 2D component")]
[Image(typeof(IconSquareOutline), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Parameter("Box Collider 2D")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_BoxCollider2D_SetAutoTiling : Instruction
{
[SerializeField] private GetGameObject m_BoxCollider2D = new GetGameObject(
new GenTypeGameObject_BoxCollider2D()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Auto Tiling");
return $"{this.m_BoxCollider2D} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
BoxCollider2D component = this.m_BoxCollider2D.Get<BoxCollider2D>(args);
if (component == null) return Done;
component.autoTiling = (bool) this.m_Value.Get(args);
return Done;
}
}
}