Transform Rotate#
Transform / Rotation / Transform Rotate Eulers, RelativeTo
Description#
Changes the rotation of the transform in multiple ways
Parameters#
| Name | Description |
|---|---|
| Eulers | |
| Relative To |
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("Transform Rotate")]
[Category("Transform/Rotation/Rotate", "Eulers, RelativeTo")]
[Description("Changes the rotation of the transform in multiple ways")]
[Image(typeof(IconRotation), ColorTheme.Type.Lime)]
[Keywords("Transform")]
[Parameter("Eulers")]
[Parameter("Relative To")]
[Serializable]
public class GenInstructionTransform_Rotate_2_Vector3Eulers_SpaceRelativeTo : Instruction
{
[SerializeField] private GetGameObject m_Transform = new GetGameObject(
new GenTypeGameObject_Transform()
);
[SerializeField] private GetVector3 m_Eulers = new GetVector3();
[SerializeField] private Space m_RelativeTo = default;
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Rotate");
return $"{this.m_Transform} {method} ({this.m_Eulers}, {this.m_RelativeTo})";
}
protected override Awaitable Run(Args args)
{
Transform component = this.m_Transform.Get<Transform>(args);
if (component == null) return Done;
component.Rotate(
(Vector3) this.m_Eulers.Get(args),
this.m_RelativeTo
);
return Done;
}
}
}