# GUIDs and parameters GUIDs

**URL:** https://qa.fmod.com/t/guids-and-parameters-guids/16624
**Category:** FMOD Engine
**Created:** [January 11, 2021, 2:20pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624 "2021-01-11T14:20:46Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![AlexM](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@AlexM](https://qa.fmod.com/u/AlexM)
#### Post date: [January 11, 2021, 2:20pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/1 "2021-01-11T14:20:46Z")

</div>

Hello,

For the sake of having a more robust code, I suggested to the developer to use GUIDs instead of names, so that I could reorganize my FMOD project names and folder without consequences. However, it seem that parameters GUIDs has no use. Parameter value can only be set from the parameter’s name or the parameter’s ID (which has to be retrieved… by the parameter’s name). So what’s the point in having GUIDs for parameters if there’s no use for them? Am I missing something?

The developer found the GUID format a bit… heavy (3 number and an array). What’s the point in having the possibility to define 3.4\*10^38 (32 hexa digits) different events/snapshots/parameters within the same FMOD project?

By the way, the doc says something ambiguous:

> Objects can only be identified by path if the project’s [strings bank](https://fmod.com/resources/documentation-api?version=2.0&page=glossary.html#studio-strings-bank) is loaded.

Does that mean that if the strings bank is loaded, we can’t anymore use GUIDs? But because parameters seem to be accessible only by name, we must load the strings bank (are we?). So… we can’t use GUIDs at all, if I understand well. This doesn’t make really sense, I’m probably missing something. Could someone explain?

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [January 14, 2021, 4:12am UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/2 "2021-01-14T04:12:26Z")

</div>

Firstly, everything in FMOD has GUIDs, it’s part of the foundation of how the Studio project format works. GUIDs were chosen to allow remote teams to build content in isolation and minimize collisions when merging everything back together again.

Regarding the strings bank, it is simply a mapping from Event path to GUID, without the strings bank loaded the Engine does not know how to map the provided event:/path/to/event to its internal GUID (which is how it is stored). The idea here is you use paths within your level editor because they are human readable, then serialize the corresponding GUID for use at runtime (faster lookup) and not load the strings bank in game. Conceptually you can bind your game objects to your Studio project by either using GUID or path depending on your desired behavior when things are renamed, regardless, seeing the paths in your editor helps.

Parameters work in a similar fashion, you can enumerate them within your editor using names for user friendliness, then use the IDs at runtime for speed. Previously (before we had parameter IDs) we used indices instead, nice and small, quick to lookup at runtime, however horrible if you use LiveUpdate because the parameter order would shuffle. This is why we switched to IDs, which are stable and always work regardless of live update changes.

Now finally, why IDs and not GUIDs? As you say GUIDs are heavy and we were deprecating the index method which was really light. It wasn’t reasonable to switch a 4 byte lookup to a 16 byte one, we compromised at 8 bytes. Additionally this is a trial run, we believe we can transition all GUIDs to IDs reducing the overall bulkiness of the memory footprint considerably, parameter IDs is the first step.

This is probably more than you wanted to know about how the sausage is made, but that’s the current rational, I hope that answers your questions.

---

<div class="post-metadata">

### Author: ![tlconflict](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@tlconflict](https://qa.fmod.com/u/tlconflict)
#### Post date: [December 14, 2022, 5:44pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/3 "2022-12-14T17:44:28Z")

</div>

I have a similar problem, are GUIDs still the way to go? They’re a bit big so currently I store all the GUIDs inside an array and then just use 32bit indexes to put in my entity structs.

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [December 14, 2022, 9:52pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/4 "2022-12-14T21:52:21Z")

</div>

GUIDs are still the way to go for the benefits I mentioned above, however if you want to manage your own lookup table in front of those, then that could be good for reducing the bulk.

---

<div class="post-metadata">

### Author: ![kamyk49](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/kamyk49/32/4567_2.png) [@kamyk49](https://qa.fmod.com/u/kamyk49)
#### Post date: [February 1, 2023, 7:59pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/6 "2023-02-01T19:59:32Z")

</div>

How are GUIDs way to go as there’s no way to get PARAMETER\_ID using them?? There’s only getParameterDescriptionByName and getParameterDescriptionByID. Even when using getParameterDescriptionList, descriptions have no GUIDs so there’s no way to get Parameter using GUID.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [February 7, 2023, 12:57am UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/7 "2023-02-07T00:57:21Z")

</div>

Hi,

The lack of any easy way to get a Parameter ID from a GUID is frustrating, so thanks for pointing it out - I’ve added it to our internal feature/improvement tracker. That said, here’s an example C# function that does a Parameter GUID to ID lookup:

```auto
FMOD.Studio.PARAMETER_ID ParamGUIDToID(FMOD.GUID guid)
{
    FMOD.Studio.PARAMETER_ID paramID = new FMOD.Studio.PARAMETER_ID();
    studioSystem.lookupPath(guid, out string path);
    studioSystem.getBankList(out FMOD.Studio.Bank[] banks);
    foreach (FMOD.Studio.Bank bank in banks)
    {
        bank.getEventList(out FMOD.Studio.EventDescription[] eventsDescs);
        foreach (FMOD.Studio.EventDescription eventDesc in eventsDescs)
        {
            eventDesc.getParameterDescriptionCount(out int count);
            for (int i = 0; i < count; i++)
            {
                eventDesc.getParameterDescriptionByIndex(i, out FMOD.Studio.PARAMETER_DESCRIPTION paramDesc);
                if (paramDesc.guid == guid)
                {
                    paramID = paramDesc.id;
                }
            }
        }
    }
    return paramID;
}

```

I’d advise against using this lookup function repeatedly however, especially if your Studio project and banks are quite large. If you do use the script, or rewrite it in whatever language you’re using, let me know whether you run into any issues with it.

---

<div class="post-metadata">

### Author: ![deHaan](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/dehaan/32/68_2.png) [@deHaan](https://qa.fmod.com/u/deHaan)
#### Post date: [February 23, 2024, 2:08pm UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/8 "2024-02-23T14:08:14Z")

</div>

Just to make sure I understand you correctly: Would you advice not to use GUIDs for parameters for large projects, snd thus having to rely on (fragile) strings for parameters?

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [February 27, 2024, 1:07am UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/9 "2024-02-27T01:07:27Z")

</div>

There’s nothing specifically bad about using parameter IDs vs string paths, besides the weak vs strong link to your FMOD Studio project. What works best for you will depend on your project/game and workflow.

My advice specifically relates to the code snippet I posted - since it iterates over banks and events in order to perform the Parameter GUID to ID lookup, it’s computationally expensive at runtime, especially if your project is large/complex. This could be reduced by optimizing the code, caching the results, etc.

---

<div class="post-metadata">

### Author: ![OwenCooperSFX](https://avatars.discourse-cdn.com/v4/letter/o/7ab992/32.png) [@OwenCooperSFX](https://qa.fmod.com/u/OwenCooperSFX)
#### Post date: [January 28, 2025, 12:50am UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/10 "2025-01-28T00:50:47Z")

</div>

Here in 2025. Is there not a simpler way to get a PARAMETER\_ID from a GUID? It does feel like having parameters treated so differently throws a wrench into things.

I see we can get a GUID from a PARAMETER\_ID but not the other way around. It’d be lovely to have that functionality.

---

<div class="post-metadata">

### Author: ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)
#### Post date: [January 31, 2025, 3:11am UTC](https://qa.fmod.com/t/guids-and-parameters-guids/16624/11 "2025-01-31T03:11:02Z")

</div>

> [@OwenCooperSFX](#):
>
> Is there not a simpler way to get a PARAMETER\_ID from a GUID?

At the time of writing, no - the code snippet I posted above is the simplest way of doing so. That said, I’ve noted your interest in the functionality in our internal improvement tracker.
