# Why does ParamRef serialize the name and not the ID?

**URL:** https://qa.fmod.com/t/why-does-paramref-serialize-the-name-and-not-the-id/19891
**Category:** Unity
**Tags:** csharp
**Created:** [February 19, 2023, 8:33pm UTC](https://qa.fmod.com/t/why-does-paramref-serialize-the-name-and-not-the-id/19891 "2023-02-19T20:33:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lgarczyn](https://avatars.discourse-cdn.com/v4/letter/l/6f9a4e/32.png) [@lgarczyn](https://qa.fmod.com/u/lgarczyn)
#### Post date: [February 19, 2023, 8:33pm UTC](https://qa.fmod.com/t/why-does-paramref-serialize-the-name-and-not-the-id/19891/1 "2023-02-19T20:33:21Z")

</div>

So ParamRef has this structure

```auto
[Serializable]
    public class ParamRef
    {
        public string Name;
        public float Value;
        public FMOD.Studio.PARAMETER_ID ID;
    }

```

And PARAMETER\_ID has this

```auto
    [StructLayout(LayoutKind.Sequential)]
    public struct PARAMETER_ID
    {
        public uint data1;
        public uint data2;
    }

```

You can note that PARAMETER\_ID is not serializable nor serialized. In fact, in StudioEventEmitter, the id is mostly ignored, or used as a cache.

But why? Why not just serialize the PARAMETER\_ID itself ? It fits in a long, it’s quick to store and retrieve, it’s faster when actually running the game.

Even EventRefeference discards most of its info on build (even the useful method IsNull, which does not technically depend on the name of the event)

I’ve been reduced to implementing my own ParameterId struct out of self-destructive perfectionism.

---

<div class="post-metadata">

### Author: ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)
#### Post date: [February 19, 2023, 11:06pm UTC](https://qa.fmod.com/t/why-does-paramref-serialize-the-name-and-not-the-id/19891/2 "2023-02-19T23:06:43Z")

</div>

Thanks for the feedback. We may have some improvements around this in a future release.
