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

# Particle System Allocate Mesh Index Attribute

[Effects](../index.md) / [Particle System](index.md) / **Particle System Allocate Mesh Index Attribute**

## Description

Executes the Allocate Mesh Index Attribute method on the Particle System component

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


```

