Rigidbody Publish Transform#
Physics 3D / Rigidbody / Rigidbody Publish Transform
Description#
Executes the Publish Transform method on the Rigidbody 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
{
[Title("Rigidbody Publish Transform")]
[Category("Physics 3D/Rigidbody/Publish Transform")]
[Description("Executes the Publish Transform method on the Rigidbody component")]
[Image(typeof(IconPhysics), ColorTheme.Type.Lime)]
[Keywords("Physics, 3D")]
[Serializable]
public class GenInstructionRigidbody_PublishTransform_0 : Instruction
{
[SerializeField] private GetGameObject m_Rigidbody = new GetGameObject(
new GenTypeGameObject_Rigidbody()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Publish Transform");
return $"{this.m_Rigidbody} {method}";
}
protected override Awaitable Run(Args args)
{
Rigidbody component = this.m_Rigidbody.Get<Rigidbody>(args);
if (component == null) return Done;
component.PublishTransform();
return Done;
}
}
}