Contact Modify Event#
Physics 3D / Physics / Contact Modify Event
Description#
Executes whenever the static Contact Modify Event event of Physics class is invoked
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("Contact Modify Event")]
[Category("Physics 3D/Physics/Contact Modify Event")]
[Description("Executes whenever the static Contact Modify Event event of Physics class is invoked")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Serializable]
public class GenTriggerPhysics_ContactModifyEvent : Trigger
{
protected override string GetTitle(GameObject source)
{
string className = TextUtils.ThemeAsKeyword("Physics");
string member = TextUtils.ThemeAsKeyword("Contact Modify Event");
return $"{className} {member}";
}
public override void OnDisable()
{
base.OnDisable();
Physics.ContactModifyEvent -= this.Run;
}
public override void OnEnable()
{
base.OnEnable();
Physics.ContactModifyEvent += this.Run;
}
private void Run(PhysicsScene value1, Unity.Collections.NativeArray<ModifiableContactPair> value2)
{
using Args args = Args.Get(
this.Component,
this.Component
);
this.Run(args);
}
}
}