Trail Renderer Texture Scale#
Effects / Trail Renderer / Trail Renderer Texture Scale
Description#
Compares the Texture Scale property of Trail Renderer component to another value
Parameters#
| Name | Description |
|---|---|
| Trail Renderer | |
| 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("Trail Renderer Texture Scale")]
[Category("Effects/Trail Renderer/Texture Scale")]
[Description("Compares the Texture Scale property of Trail Renderer component to another value")]
[Image(typeof(IconTrailRenderer), ColorTheme.Type.Blue, typeof(BadgeEye))]
[Keywords("Effect")]
[Parameter("Trail Renderer")]
[Parameter("Value")]
[Serializable]
public class GenConditionVector2_TrailRenderer_CheckTextureScale : Condition
{
[SerializeField] private GetGameObject m_TrailRenderer = new GetGameObject(
new GenTypeGameObject_TrailRenderer()
);
[SerializeField] private GetVector2 m_Value = new GetVector2();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Texture Scale");
return $"{this.m_TrailRenderer} {member} = {this.m_Value}";
}
protected override bool Run(Args args)
{
TrailRenderer component = this.m_TrailRenderer.Get<TrailRenderer>(args);
if (component == null) return false;
return component.textureScale == (Vector2) this.m_Value.Get(args);
}
}
}