Set Particle System Use Auto Random Seed#
Effects / Particle System / Set Particle System Use Auto Random Seed
Description#
Sets the Use Auto Random Seed property of Particle System component
Parameters#
| Name | Description |
|---|---|
| Particle System | |
| 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("Set Particle System Use Auto Random Seed")]
[Category("Effects/Particle System/Use Auto Random Seed")]
[Description("Sets the Use Auto Random Seed property of Particle System component")]
[Image(typeof(IconParticleSystem), ColorTheme.Type.Blue)]
[Keywords("Effect")]
[Parameter("Particle System")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_ParticleSystem_SetUseAutoRandomSeed : Instruction
{
[SerializeField] private GetGameObject m_ParticleSystem = new GetGameObject(
new GenTypeGameObject_ParticleSystem()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Use Auto Random Seed");
return $"{this.m_ParticleSystem} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
ParticleSystem component = this.m_ParticleSystem.Get<ParticleSystem>(args);
if (component == null) return Done;
component.useAutoRandomSeed = (bool) this.m_Value.Get(args);
return Done;
}
}
}