Set Platform Effector 2D Use One Way Grouping#
Physics 2D / Effectors / Platform Effector 2D / Set Platform Effector 2D Use One Way Grouping
Description#
Sets the Use One Way Grouping property of Platform Effector 2D component
Parameters#
| Name | Description |
|---|---|
| Platform Effector 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 Platform Effector 2D Use One Way Grouping")]
[Category("Physics 2D/Effectors/Platform Effector 2D/Use One Way Grouping")]
[Description("Sets the Use One Way Grouping property of Platform Effector 2D component")]
[Image(typeof(IconPlatformEffector), ColorTheme.Type.Lime, typeof(Badge2D))]
[Keywords("Physics, 2D")]
[Parameter("Platform Effector 2D")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_PlatformEffector2D_SetUseOneWayGrouping : Instruction
{
[SerializeField] private GetGameObject m_PlatformEffector2D = new GetGameObject(
new GenTypeGameObject_PlatformEffector2D()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Use One Way Grouping");
return $"{this.m_PlatformEffector2D} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
PlatformEffector2D component = this.m_PlatformEffector2D.Get<PlatformEffector2D>(args);
if (component == null) return Done;
component.useOneWayGrouping = (bool) this.m_Value.Get(args);
return Done;
}
}
}