Particle System Is Alive#
Effects / Particle System / Particle System Is Alive WithChildren
Description#
Compares the Is Alive method of Particle System component to another value
Parameters#
| Name | Description |
|---|---|
| Particle System | |
| With Children |
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("Particle System Is Alive")]
[Category("Effects/Particle System/Is Alive", "WithChildren")]
[Description("Compares the Is Alive method of Particle System component to another value")]
[Image(typeof(IconParticleSystem), ColorTheme.Type.Blue)]
[Keywords("Effect")]
[Parameter("Particle System")]
[Parameter("With Children")]
[Serializable]
public class GenConditionBool_ParticleSystem_CheckIsAlive_1_BoolWithChildren : Condition
{
[SerializeField] private GetGameObject m_ParticleSystem = new GetGameObject(
new GenTypeGameObject_ParticleSystem()
);
[SerializeField] private GetBool m_WithChildren = new GetBool();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Is Alive");
string parameters = $"({this.m_WithChildren})";
return $"{this.m_ParticleSystem} {method}";
}
protected override bool Run(Args args)
{
ParticleSystem component = this.m_ParticleSystem.Get<ParticleSystem>(args);
if (component == null) return false;
bool value = component.IsAlive(
(bool) this.m_WithChildren.Get(args)
);
return value;
}
}
}