Ignore Collision#
Physics 3D / Physics / Ignore Collision Collider1, Collider2, Ignore
Description#
Executes the Ignore Collision static method of the Physics class
Parameters#
| Name | Description |
|---|---|
| Collider 1 | |
| Collider 2 | |
| Ignore |
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("Ignore Collision")]
[Category("Physics 3D/Physics/Ignore Collision", "Collider1, Collider2, Ignore")]
[Description("Executes the Ignore Collision static method of the Physics class")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Parameter("Collider 1")]
[Parameter("Collider 2")]
[Parameter("Ignore")]
[Serializable]
public class GenInstructionPhysics_IgnoreCollision_3_ColliderCollider1_ColliderCollider2_BoolIgnore : Instruction
{
[SerializeField] private GetGameObject m_Collider1 = new GetGameObject();
[SerializeField] private GetGameObject m_Collider2 = new GetGameObject();
[SerializeField] private GetBool m_Ignore = new GetBool();
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Physics");
string method = TextUtils.ThemeAsKeyword("Ignore Collision");
return $"{className} {method} ({this.m_Collider1}, {this.m_Collider2}, {this.m_Ignore})";
}
protected override Awaitable Run(Args args)
{
Physics.IgnoreCollision(
(Collider) this.m_Collider1.Get<Collider>(args),
(Collider) this.m_Collider2.Get<Collider>(args),
(bool) this.m_Ignore.Get(args)
);
return Done;
}
}
}