Particle System Emit#
Effects / Particle System / Particle System Emit Count
Description#
Executes the Emit method on the Particle System component
Parameters#
| Name | Description |
|---|---|
| Count |
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 Emit")]
[Category("Effects/Particle System/Emit", "Count")]
[Description("Executes the Emit method on the Particle System component")]
[Image(typeof(IconParticleSystem), ColorTheme.Type.Blue)]
[Keywords("Effect")]
[Parameter("Count")]
[Serializable]
public class GenInstructionParticleSystem_Emit_1_IntCount : Instruction
{
[SerializeField] private GetGameObject m_ParticleSystem = new GetGameObject(
new GenTypeGameObject_ParticleSystem()
);
[SerializeField] private GetInteger m_Count = new GetInteger();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Emit");
return $"{this.m_ParticleSystem} {method} ({this.m_Count})";
}
protected override Awaitable Run(Args args)
{
ParticleSystem component = this.m_ParticleSystem.Get<ParticleSystem>(args);
if (component == null) return Done;
component.Emit(
(int) this.m_Count.Get(args)
);
return Done;
}
}
}