# SetVectorComponentCount(ParticleSystemCustomData, int)

> Specify how many curves are used to generate custom data for this stream.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.5/script-reference/unityengine.md)
* **Assembly:** UnityEngine.ParticleSystemModule

```csharp
public void SetVectorComponentCount(ParticleSystemCustomData stream, int count)
```

### Parameters

**** (\[ParticleSystemCustomData]\(/engine/6000.5/script-reference/unityengine/particlesystemcustomdata)): The name of the custom data stream to apply the curve to.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Remarks

Additional Resources: [ParticleSystem.CustomDataModule.GetVectorComponentCount](/engine/6000.5/script-reference/unityengine/particlesystem/customdatamodule/getvectorcomponentcount.md), [ParticleSystem.MinMaxCurve](/engine/6000.5/script-reference/unityengine/particlesystem/minmaxcurve.md), [ParticleSystem.GetCustomParticleData](/engine/6000.5/script-reference/unityengine/particlesystem/getcustomparticledata.md).

### Examples

```csharp
using UnityEngine;
using System.Collections;

[RequireComponent(typeof(ParticleSystem))]
public class ExampleClass : MonoBehaviour
{
    void Start()
    {
        ParticleSystem ps = GetComponent<ParticleSystem>();
        var customData = ps.customData;
        customData.enabled = true;

        AnimationCurve curve = new AnimationCurve();
        curve.AddKey(0.0f, 0.0f);
        curve.AddKey(1.0f, 1.0f);

        customData.SetMode(ParticleSystemCustomData.Custom1, ParticleSystemCustomDataMode.Vector);
        customData.SetVectorComponentCount(ParticleSystemCustomData.Custom1, 1);
        customData.SetVector(ParticleSystemCustomData.Custom1, 0, new ParticleSystem.MinMaxCurve(1.0f, curve));
    }
}
```
