---
tags:
    - "Effect"
---

# Particle System Play

[Effects](../index.md) / [Particle System](index.md) / **Particle System Play** WithChildren

## Description

Executes the Play method on the Particle System component

## Parameters

| Name | Description |
| :--- | :---------- |
| With Children |  |

## Code

```cs
// <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 Play")]
    [Category("Effects/Particle System/Play", "WithChildren")]
    [Description("Executes the Play method on the Particle System component")]
    
    [Image(typeof(IconParticleSystem), ColorTheme.Type.Blue)]
    [Keywords("Effect")]
    
    [Parameter("With Children")]
    
    [Serializable]
    public class GenInstructionParticleSystem_Play_1_BoolWithChildren : Instruction
    {
        [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("Play");
            return $"{this.m_ParticleSystem} {method} ({this.m_WithChildren})";
        }
        
        protected override Awaitable Run(Args args)
        {
            ParticleSystem component = this.m_ParticleSystem.Get<ParticleSystem>(args);
            if (component == null) return Done;
            
            component.Play(
                (bool) this.m_WithChildren.Get(args)
            );
            
            return Done;
        }
    }
}


```

