# GetFixedBufferElementAtIndex(int)

> Returns the element at the specified index in the fixed buffer.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

```csharp
public SerializedProperty GetFixedBufferElementAtIndex(int index)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Returns

| Type                                                                                    | Description |
| --------------------------------------------------------------------------------------- | ----------- |
| [SerializedProperty](/engine/6000.0/script-reference/unityeditor/serializedproperty.md) |             |

### Remarks

Additional Resources: [SerializedProperty.isFixedBuffer](/engine/6000.0/script-reference/unityeditor/serializedproperty/isfixedbuffer.md), [SerializedProperty.fixedBufferSize](/engine/6000.0/script-reference/unityeditor/serializedproperty/fixedbuffersize.md).

### Examples

```csharp
using UnityEngine;
using UnityEditor;

[System.Serializable]
public unsafe struct TestStruct
{
    public fixed int intBuffer[7];
}

public unsafe class TestScript : MonoBehaviour
{
    public TestStruct testStruct;

    void Start()
    {
        fixed(int* buffer = testStruct.intBuffer)
        {
            for (int i = 0; i < 7; ++i)
                buffer[i] = 3 + i;
        }

        var so = new SerializedObject(this);
        var prop = so.FindProperty("testStruct.intBuffer");

        Debug.Log("isFixedBuffer = " + prop.isFixedBuffer);
        Debug.Log("fixedBufferSize = " + prop.fixedBufferSize);

        var elemProp = prop.GetFixedBufferElementAtIndex(2);

        Debug.Log("GetFixedBufferElementAtIndex(2) = " + elemProp.intValue);

        elemProp.intValue = 42;

        so.ApplyModifiedProperties();

        fixed(int* buffer = testStruct.intBuffer)
        {
            Debug.Log("intBuffer[2] = " + buffer[2]);
        }
    }
}
```
